Skip to content
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

bar graph with nan values leads to "No current point in closepath" in evince #7154

Closed
e-dschungel opened this issue Sep 21, 2016 · 8 comments

Comments

@e-dschungel
Copy link

e-dschungel commented Sep 21, 2016

I want to plot a bar graph which contain some nan values and save it to PDF. If I open the file in evince it shows several errors like "Syntax Error (596): No current point in closepath" on the console but plot is shown as expected. This only happens with the pdf backend, cairo pdf backend works. I think this is related to #3654.

I'm on Matplotlib 1.5.1 (installed via pip), python 2.7.6, Linux

Example code:

#!/usr/bin/env python

import matplotlib.pyplot as mpl

fig = mpl.figure()
ax = fig.add_subplot(111)
bars = ax.bar([1], [float("NaN")], 0.2)
mpl.savefig("test.pdf")
@Kojoley
Copy link
Member

Kojoley commented Sep 21, 2016

Cannot reproduce it with mpl 1.5.1 and Foxit Reader.

@QuLogic
Copy link
Member

QuLogic commented Sep 21, 2016

Also tried with mpl 1.5.2 and evince 3.20.1 and there are no warnings using this code.

@e-dschungel
Copy link
Author

@QuLogic did you start evince in foreground/nondetached?
BTW: My evince is 3.10.3.

@tacaswell
Copy link
Member

This may be fixed by #5911 ?

@tacaswell
Copy link
Member

@e-dschungel 1.5.3 is available via pip, can you try updating?

@QuLogic
Copy link
Member

QuLogic commented Sep 21, 2016

I just tried with 1.5.1 and even 1.4.3 and also see no warnings. There is just an empty plot, as expected.

@e-dschungel I think the only course might be to update your system; evince 3.10.3 and Python 2.7.6 are fairly old at this point.

@tacaswell
Copy link
Member

I also can not reproduce this (but also with evince 3.20.1) either with mpl2.x + py3.5 or mpl1.5.1+py2.7.6 (from conda).

Closing as not reproducible.

@e-dschungel Thank you for reporting this, sorry we can not reproduce it to provide a fix!

@e-dschungel
Copy link
Author

Thanks for the quick responses.
Some more information for the record: upgrading to mpl 1.5.3 does not help.
Upgrading to a more recent system with Python 2.7.12, mpl 1.5.2rc2 and evince 3.20.1 does.

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

4 participants