Re: [Matplotlib-users] Rotate legend ?

2009-02-28 Thread Jae-Joon Lee
I don' think these is a straight forward way to rotate the legend as a whole. As a matter of fact, it is hardly possible with the current implementation of the legend class. Could you explain why do you want to have a rotated legend? An example figure (from other plotting package) will be very help

Re: [Matplotlib-users] setting font of axes ticklabels and making labels not overlap

2009-02-28 Thread Jae-Joon Lee
On Sat, Feb 28, 2009 at 9:59 PM, per freem wrote: > hi Jae-Joon, > > thanks again, that makes sense. > > final question on this plot - i am trying to plot what we discussed but am > getting very strange results. > > all i am trying to do is produce a scatter plot like: > > http://www2.warwick.ac.u

Re: [Matplotlib-users] removing leading zeros in ticklabels

2009-02-28 Thread Jae-Joon Lee
FormatStrFormatter (and other formatters) rely on Python's string interpolation, and It does not seem to be possible to get rid of the leading zero (http://docs.python.org/library/stdtypes.html). I think what you can do is to replace "0." with "." after the interpolation. Something like below work

Re: [Matplotlib-users] setting font of axes ticklabels and making labels not overlap

2009-02-28 Thread Jae-Joon Lee
On Sat, Feb 28, 2009 at 5:31 PM, per freem wrote: > thank you for your reply. when i try either of the first suggestions about > changing the fonts, i get the error: > > AttributeError: 'FontProperties' object has no attribute 'get_slant' > > any idea what this means? It seems that you're using v

Re: [Matplotlib-users] setting font of axes ticklabels and making labels not overlap

2009-02-28 Thread per freem
thank you for your reply. when i try either of the first suggestions about changing the fonts, i get the error: AttributeError: 'FontProperties' object has no attribute 'get_slant' any idea what this means? also, i do not mind setting the position of each tickmark individually but i cannot find

Re: [Matplotlib-users] setting font of axes ticklabels and making labels not overlap

2009-02-28 Thread Jae-Joon Lee
> but it does not work. i tried similarly setting the font size (with > set_size() or through rcParams) but it did not work either. how can i do > this? i'd like to do this either on per axes basis, or for the entire > figure. It seems that changing rcParams is not effective because of the way how

[Matplotlib-users] removing leading zeros in ticklabels

2009-02-28 Thread per freem
hi all, when i make any numeric scatter plot containing floats, the formatted tick labels always have leading zeros, e.g "0.5" as opposed to ".5" in the labels. for example: x = rand(10) scatter(x,x) is there any way to change this to remove the leading zeros? i have tried: s = subplot(111) ma

Re: [Matplotlib-users] xticklabels printed twice when using twinx

2009-02-28 Thread Eric Firing
Jae-Joon Lee wrote: > Hi Erick, > > Is there any particular reason to introduce _xaxison and _yaxison, > instead of using set_visible(False) on the xaxis and yaxis? Just > wondering.. Good catch--I just didn't think of it. That is a much better solution. I'll do it shortly. Thank you. Eric

Re: [Matplotlib-users] Adapt plot- or font-size to avoid xlabel cutting

2009-02-28 Thread Eric Firing
Sandro Tosi wrote: > Hi! > I have this configuration file: > > $ cat matplotlibrc > figure.figsize : 4, 3 > figure.dpi : 300 > savefig.dpi: 300 > font.size : 9.0 > > and using this code > > import matplotlib.pyplot as plt > plt.plot([1, 2, 3]) > plt.xlabel('This is the X axis') >

Re: [Matplotlib-users] xticklabels printed twice when using twinx

2009-02-28 Thread Jae-Joon Lee
Hi Erick, Is there any particular reason to introduce _xaxison and _yaxison, instead of using set_visible(False) on the xaxis and yaxis? Just wondering.. -JJ On Sat, Feb 28, 2009 at 1:52 PM, Eric Firing wrote: > Christoffer Aberg wrote: >> Hi all, >> >> I have noticed a funny behaviour when u

[Matplotlib-users] setting font of axes ticklabels and making labels not overlap

2009-02-28 Thread per freem
hi all, two quick questions about plotting: i am trying to very simply reset the font family to be 'helvetica' for my figure, in particular for the ticklabels. i have tried using the following: def axes_square(plot_handle): plot_handle.axes.set_aspect(1/plot_handle.axes.get_data_ratio()) rcP

Re: [Matplotlib-users] xticklabels printed twice when using twinx

2009-02-28 Thread Eric Firing
Christoffer Aberg wrote: > Hi all, > > I have noticed a funny behaviour when using twinx to do two plots on the > same axes: the xticklabels are printed twice, once for each axes. This > shows up as slightly thicker labels than for a single axes. It is > particularly visible for ps or pdf output,

[Matplotlib-users] Why do I need to call show with ipython -pylab

2009-02-28 Thread Jonathan Taylor
Hi, I have a simple script that plots x,y vals in an animation called anim.py data = read('data.dat') for i in range(10): plot(data[:,0], data[:,1]) I am using ipython -pylab but when I do run anim.py it doesn't show anything until I say show(). On the other hand, if I do one of these plot

Re: [Matplotlib-users] xticklabels printed twice when using twinx

2009-02-28 Thread George Nurser
David, This seems to work for me: (here ax2 is the second axis) The only work around I can see is to add for tl in ax2.get_xticklabels(): tl.set_visible(False) To prevent the ticklines being drawn twice I guess we should also do for tline in ax2.get_xticklines(): tline.set_visible(False)

[Matplotlib-users] Rotate legend ?

2009-02-28 Thread Naoli
Hi guys, I was wondering if it's possible to rotate a legend ? Thanks for your help. Naoli -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: O