Skip to content

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

Closed

Description

@e-dschungel

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")

Activity

  1. Kojoley commented on Sep 21, 2016

    @Kojoley
    Member

    Cannot reproduce it with mpl 1.5.1 and Foxit Reader.

  2. QuLogic commented on Sep 21, 2016

    @QuLogic
    Member

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

  3. e-dschungel commented on Sep 21, 2016

    @e-dschungel
    Author

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

  4. tacaswell commented on Sep 21, 2016

    @tacaswell
    Member

    This may be fixed by #5911 ?

  5. tacaswell commented on Sep 21, 2016

    @tacaswell
    Member

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

  6. QuLogic commented on Sep 21, 2016

    @QuLogic
    Member

    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.

  7. tacaswell commented on Sep 22, 2016

    @tacaswell
    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!

  8. e-dschungel commented on Sep 22, 2016

    @e-dschungel
    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

Metadata

Metadata

Assignees

No one assigned

    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