SourceForge logo
SourceForge logo
Menu

matplotlib-devel

From: Rachel A. <ra...@st...> - 2011年10月31日 15:54:02
Hello,
I've noticed a bug with matplotlib.pyplot.imsave. Say I have an array that is 1000*1000. This works perfectly:
pylab.imsave(outfile,data,format='png',origin='lower')
and I get image1.png.
However, if the array is not a square, say 1000*1500, then the output image is rotated 90 degrees compared to the image it prints out. Example, image2.png.
I tried numpy.rot90(frame) to rotate my data, and though my data did rotate, so did the output frame. Example, image3.png.
If there is a way around this, please let me know. Otherwise, it should be fixed ;)
Cheers,
Rachel
From: Michael D. <md...@st...> - 2011年11月01日 16:08:24
What version of matplotlib are you using? This appears to be fixed in 
the latest 1.1. If you can let me know what version you're using, 
perhaps it will be easy to provide a patch if you're not able to upgrade 
wholesale.
Mike
On 10/31/2011 11:53 AM, Rachel Anderson wrote:
> Hello,
>
> I've noticed a bug with matplotlib.pyplot.imsave. Say I have an array 
> that is 1000*1000. This works perfectly:
>
> pylab.imsave(outfile,data,format='png',origin='lower')
>
> and I get image1.png.
>
> However, if the array is not a square, say 1000*1500, then the output 
> image is rotated 90 degrees compared to the image it prints out. 
> Example, image2.png.
>
> I tried numpy.rot90(frame) to rotate my data, and though my data did 
> rotate, so did the output frame. Example, image3.png.
>
> If there is a way around this, please let me know. Otherwise, it 
> should be fixed ;)
>
> Cheers,
> Rachel
>
>
> ------------------------------------------------------------------------------
> Get your Android app more play: Bring it to the BlackBerry PlayBook
> in minutes. BlackBerry App World&#153; now supports Android&#153; Apps
> for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple
> it is! http://p.sf.net/sfu/android-dev2dev
>
>
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA
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 によって変換されたページ (->オリジナル) /