Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pgf backend doesn't work well with very large numbers #1857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
elenril opened this issue Mar 26, 2013 · 3 comments
Closed

pgf backend doesn't work well with very large numbers #1857

elenril opened this issue Mar 26, 2013 · 3 comments
Assignees

Comments

@elenril
Copy link

elenril commented Mar 26, 2013

When plotting data with very large values (in my use case I have around 10^55), the pgf backend produces files on which latex chokes saying:

! Number too big.
13653335517
866810233117889238902434402615404068235693260800.000000in
l.97 ...8902434402615404068235693260800.000000in}}
%
I can only go up to 2147483647='17777777777="7FFFFFFF,
so I'm using that number instead of yours.

From a quick look at the code, it apparrently just sets the clipping rectangle and just passes then numbers through otherwise. I suppose some clipping should happen in the backend itself.

@mdboom
Copy link
Member

mdboom commented Mar 26, 2013

@pwuertz : I haven't looked into this in depth, but thought I might provide a pointer: matplotlib does have algorithms to clip paths to a rectangle that may be useful here. See Path.iter_segments which has a clip kwarg.

@pwuertz
Copy link
Contributor

pwuertz commented Mar 26, 2013

Thanks for the hint mdboom!
@elenril: Does that patch fix the problem you are seeing or can you post an example that triggers the error?

@elenril
Copy link
Author

elenril commented Mar 28, 2013

@pwuertz thanks for the fix, it seems to work for me.

pelson added a commit that referenced this issue Apr 18, 2013
backend_pgf: clip paths within the backend (fixes #1857)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants