Skip to content

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

Closed

Description

@elenril

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.

Activity

  1. mdboom commented on Mar 26, 2013

    @mdboom
    Member

    @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.

  2. ghost assigned on Mar 26, 2013
  3. pwuertz commented on Mar 26, 2013

    @pwuertz
    Contributor

    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?

  4. elenril commented on Mar 28, 2013

    @elenril
    Author

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

  5. added a commit that references this issue on Apr 18, 2013
    6e94330
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions