Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
The PGF backend of MPL 1.4.3 causes a "Dimension too large" LaTeX error when processing a log-scale plot with a point at zero. The error is
[...]! Dimension too large.<to be read again> \pgf@y l.69 ...\pgfqpoint{-2148537.332542in}{0.600000in}} %No pages of output.Transcript written on figure.log.
Obviously, thex coordinate of the point is way out of bounds. The script triggering the error is
importmatplotlibasmplmpl.use('pgf')importmatplotlib.pyplotaspltfig,ax=plt.subplots()ax.plot([0,1], [.5,1])ax.set_xscale('log')fig.savefig('fig.pdf')
Addingnonposx='mask'
to the call toset_xscale
prevents the error but produces a plot consisting of only a single point. The PGF version installed is 2.10 but the error also occurs with PGF 3.00.