Ah, sorry for the duplicate message!
Cheers,
G
On 15/03/2011 11:30, Giovanni Luca Ciampaglia wrote:
> Hi all,
> I call savefig by passing to it a file-like object but it appears to not
> get the graphics format right:
>
> f = open('not_a_pdf.pdf', 'w')
> plot([1,2,3])
> savefig(f)
>
> but it pro
Le mardi 15 mars 2011 à 11:30 +0100, Giovanni Luca Ciampaglia a écrit :
> Hi all,
> I call savefig by passing to it a file-like object but it appears to not
> get the graphics format right:
>
> f = open('not_a_pdf.pdf', 'w')
> plot([1,2,3])
> savefig(f)
>
> but it produces a PNG image. Can anybo
Hi all,
I call savefig by passing to it a file-like object but it appears to not
get the graphics format right:
f = open('not_a_pdf.pdf', 'w')
plot([1,2,3])
savefig(f)
but it produces a PNG image. Can anybody confirm this? I am on
matplotlib 0.99.3
Cheers,
--
Giovanni L. Ciampaglia
PhD Studen
On 3/15/2011 8:51 AM, Michael Droettboom wrote:
> It has no way of deducing the file format from the file object.
Inspect f.name?
Alan Isaac
--
Colocation vs. Managed Hosting
A question and answer guide to determining t
My fault, I didn't read the docstring properly. Thanks for both replies.
Best,
G
On 15/03/2011 13:51, Michael Droettboom wrote:
> It has no way of deducing the file format from the file object.
>
> You need to explicitly pass the format keyword to savefig, e.g.:
>
> savefig(f, format='pdf')
It has no way of deducing the file format from the file object.
You need to explicitly pass the format keyword to savefig, e.g.:
savefig(f, format='pdf')
Mike
On 03/15/2011 07:11 AM, Giovanni Luca Ciampaglia wrote:
> Hi all,
> I call savefig by passing to it a file-like object but it appears
Hi all,
I call savefig by passing to it a file-like object but it appears to not
get the graphics format right:
f = open('not_a_pdf.pdf', 'w')
plot([1,2,3])
savefig(f)
but it produces a PNG image. Can anybody confirm this? I am on
matplotlib 0.99.3
Cheers,
Giovanni
--