Pylab example (gradient_bar.py) only works for png

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

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
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

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 :slight_smile:

Thanks,

Arnar

···

On Tue, Oct 28, 2008 at 4:20 PM, Michael Droettboom <mdroe@…31…> 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

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 <mdroe@...31... > <mailto:mdroe@…31…>> 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&gt;

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 :slight_smile:

Thanks,

Arnar

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA