SourceForge logo
SourceForge logo
Menu

matplotlib-users

Is it possible to set the extension .pdf as defaut when I save an
image using the matplotlib bar. My coworkers are always saving the
image in png and it's really ugly!
Thx,
Fab
On Tue, Feb 7, 2012 at 8:33 AM, Fabien Lafont <laf...@gm...>wrote:
> Is it possible to set the extension .pdf as defaut when I save an
> image using the matplotlib bar. My coworkers are always saving the
> image in png and it's really ugly!
>
> Thx,
>
> Fab
>
>
Interesting request. Looking through the backends, it appears that only
the Cairo backend currently supports a configurable rcParam for the default
filetype ('cairo.format'). All backends implement a
"get_default_filetype()" method for their canvases, but most of them have
that default hard-coded as "png". This really only makes sense for
backends like agg, pdf, ps and such.
Devs - Maybe we should consider fixing this for the non-fileformat specific
backends? Do we want an rcParam for each backend? Or a single rcParam for
default filetypes and deprecate 'cairo.format'?
Cheers!
Ben Root
On 02/07/2012 10:48 AM, Benjamin Root wrote:
>
>
> On Tue, Feb 7, 2012 at 8:33 AM, Fabien Lafont <laf...@gm... 
> <mailto:laf...@gm...>> wrote:
>
> Is it possible to set the extension .pdf as defaut when I save an
> image using the matplotlib bar. My coworkers are always saving the
> image in png and it's really ugly!
>
> Thx,
>
> Fab
>
>
> Interesting request. Looking through the backends, it appears that 
> only the Cairo backend currently supports a configurable rcParam for 
> the default filetype ('cairo.format'). All backends implement a 
> "get_default_filetype()" method for their canvases, but most of them 
> have that default hard-coded as "png". This really only makes sense 
> for backends like agg, pdf, ps and such.
>
> Devs - Maybe we should consider fixing this for the non-fileformat 
> specific backends? Do we want an rcParam for each backend? Or a 
> single rcParam for default filetypes and deprecate 'cairo.format'?
I would definitely lean toward the latter -- unify it under a single 
rcParam.
Mike
On 12-02-07 08:40 AM, Michael Droettboom wrote:
> On 02/07/2012 10:48 AM, Benjamin Root wrote:
>>
>>
>> On Tue, Feb 7, 2012 at 8:33 AM, Fabien Lafont
>> <laf...@gm...
>> <mailto:laf...@gm...>> wrote:
>>
>> Is it possible to set the extension .pdf as defaut when I save an
>> image using the matplotlib bar. My coworkers are always saving the
>> image in png and it's really ugly!
>>
>> Thx,
>>
>> Fab
>>
>>
>> Interesting request. Looking through the backends, it appears that only the
>> Cairo backend currently supports a configurable rcParam for the default
>> filetype ('cairo.format'). All backends implement a "get_default_filetype()"
>> method for their canvases, but most of them have that default hard-coded as
>> "png". This really only makes sense for backends like agg, pdf, ps and such.
>>
>> Devs - Maybe we should consider fixing this for the non-fileformat specific
>> backends? Do we want an rcParam for each backend? Or a single rcParam for
>> default filetypes and deprecate 'cairo.format'?
>
> I would definitely lean toward the latter -- unify it under a single rcParam.
>
> Mike
Sorry for posting to an old thread, but I just submitted a pull request that 
implements this, AFAICT:
https://github.com/matplotlib/matplotlib/pull/907
Martin
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /