Use pylab's yticks command.

http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.yticks

Or Axes.set_yticklabels together with Axes.set_yticks.

http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.set_yticklabels

-JJ


On Fri, Jul 31, 2009 at 4:07 PM, Lukas Hetzenecker<l...@gmx.at> wrote:
> Hello,
>
> I have y values in the range of -100 to 100.
> I want that the negative values are shown as positive (the minus gets removed
> from the output).
>
> I tried a for loop over all self.ax.get_yticklabels() and call
> label.set_text("...") on each item but it didn't work - nothing got changed.
>
> If I print the label in the loop they seem to be empty:
> Text(0,0,'')
> Text(0,0,'')
> Text(0,0,'')
> ......
>
> Is there anything I do wrong?
>
> Thanks,
> Lukas
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to