|
From: Arnar F. <arn...@gm...> - 2008-10-28 15:13:36
|
Hi
The gradient_bar example flips the bars using svg, pdf and eps backends.
Add
fig.savefig("gradient_bar.png")
fig.savefig("gradient_bar.pdf")
fig.savefig("gradient_bar.eps")
fig.savefig("gradient_bar.svg")
to gradient_bar.py to reproduce.
Tested with TkAgg backend (pylab: 1.3.0.dev5867 on python 2.5.2).
Arnar
|
|
From: Michael D. <md...@st...> - 2008-10-28 15:20:32
|
There's a bug filed for this. I've looked at it a few times, but I'm not sure how the image flipping parameters are "supposed" to work. Anyone else want to have a look at this? https://sourceforge.net/tracker2/?func=detail&aid=2160909&group_id=80706&atid=560720 Mike Arnar Flatberg wrote: > Hi > > The gradient_bar example flips the bars using svg, pdf and eps backends. > > Add > fig.savefig("gradient_bar.png") > fig.savefig("gradient_bar.pdf") > fig.savefig("gradient_bar.eps") > fig.savefig("gradient_bar.svg") > > to gradient_bar.py to reproduce. > > Tested with TkAgg backend (pylab: 1.3.0.dev5867 on python 2.5.2). > > Arnar > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Arnar F. <arn...@gm...> - 2008-10-28 18:42:55
|
On Tue, Oct 28, 2008 at 4:20 PM, Michael Droettboom <md...@st...> wrote: > There's a bug filed for this. I've looked at it a few times, but I'm not > sure how the image flipping parameters are "supposed" to work. Anyone else > want to have a look at this? > > > https://sourceforge.net/tracker2/?func=detail&aid=2160909&group_id=80706&atid=560720 > I was not aware of that, thanks Michael. Just to be clear, (in relation to the filed ticket), the screen image is just fine for my part, its *only* after saving in any vector graphic format I get a "flipped" image as a result. In other words, I have an issue with savefig, while the ticket is concerned with imshow. Perhaps they are obviously related ... then Im sorry for the noise :-) Thanks, Arnar |
|
From: Michael D. <md...@st...> - 2008-10-28 19:13:58
|
No problem. I didn't mean to imply that you should have known you bug was a duplicate. I was mainly pointing it out for other developers to keep track of the issue, since I suspect your issue and the one in the bug are the same, but that's probably not obvious to most users. I suspect the fix is as simple as twiddling a single line of code, it's just not obvious to me how the image flipping is supposed to work to have consistent behavior across backends -- and I hope another developer here has a clue... Thanks for your report, Mike Arnar Flatberg wrote: > > > On Tue, Oct 28, 2008 at 4:20 PM, Michael Droettboom <md...@st... > <mailto:md...@st...>> wrote: > > There's a bug filed for this. I've looked at it a few times, but > I'm not sure how the image flipping parameters are "supposed" to > work. Anyone else want to have a look at this? > > https://sourceforge.net/tracker2/?func=detail&aid=2160909&group_id=80706&atid=560720 > <https://sourceforge.net/tracker2/?func=detail&aid=2160909&group_id=80706&atid=560720> > > > I was not aware of that, thanks Michael. Just to be clear, (in > relation to the filed ticket), the screen image is just fine for my > part, its *only* after saving in any vector graphic format I get a > "flipped" image as a result. In other words, I have an issue with > savefig, while the ticket is concerned with imshow. Perhaps they are > obviously related ... then Im sorry for the noise :-) > > Thanks, > > Arnar > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Jouni K. S. <jk...@ik...> - 2008-10-28 20:52:09
|
> I suspect the fix is as simple as twiddling a single line of code, it's > just not obvious to me how the image flipping is supposed to work to > have consistent behavior across backends -- and I hope another developer > here has a clue... I suspect this is related to the problem described at http://thread.gmane.org/gmane.comp.python.matplotlib.general/14420 The problem does not seem to be alignment but that the image is rendered upside down. The PDF backend does img.flipud_out() # get rgba data of image and write it in the output file img.flipud_out() and if I comment out the flipud_out calls, I get that particular case right but then the image_origin example is wrong. Revision 5618 added a flipud_out call to Axes.draw: if self.images[0].origin=='upper': im.flipud_out() The log message is: ------------------------------------------------------------------------ r5618 | jdh2358 | 2008-06-20 20:09:12 +0300 (Pe, 20 Kes 2008) | 1 line Changed paths: M /trunk/matplotlib/examples/api/mathtext_asarray.py M /trunk/matplotlib/examples/pylab_examples/figimage_demo.py M /trunk/matplotlib/lib/matplotlib/axes.py M /trunk/matplotlib/lib/matplotlib/backends/backend_gtkagg.py M /trunk/matplotlib/lib/matplotlib/figure.py M /trunk/matplotlib/src/_gtkagg.cpp M /trunk/matplotlib/src/_image.cpp added origin support for composite images ------------------------------------------------------------------------ I think this was discussed further in some emails between me, Haibao Tang, and John Hunter, but at least I have been too busy to spend much time on matplotlib lately. I hope this helps somebody track the bug down. Jouni |