[yt-dev] [yt_analysis/yt] save figure with a given suffix (issue #487)

Suoqing Ji issues-reply at bitbucket.org
Wed Jan 16 01:21:10 PST 2013


--- you can reply above this line ---

New issue 487: save figure with a given suffix
https://bitbucket.org/yt_analysis/yt/issue/487/save-figure-with-a-given-suffix

Suoqing Ji:

Warning will appear if, say,

SlicePlot.save('1.pdf')

yt : [WARNING  ] 2013-01-16 04:12:20,035 Unknown suffix pdf, defaulting to Agg

One way to solve is change the last line:

def get_image_suffix(name):
    suffix = os.path.splitext(name)[1].lstrip('.')
    return suffix if suffix in ['png', 'eps', 'ps', 'pdf'] else ''

into

def get_image_suffix(name):
    suffix = os.path.splitext(name)[1].lstrip('.')
    return '.'+suffix if suffix in ['png', 'eps', 'ps', 'pdf'] else ''


--

This is an issue notification from bitbucket.org. You are receiving
this either because you are the owner of the issue, or you are
following the issue.



More information about the yt-dev mailing list