Re: [Matplotlib-users] How to change tick labels?

2010-07-02 Thread magnus_p
If the plots share the same x and y axis, look at creating an axisGrid with share_all=True, label_mode = "L", see http://http://matplotlib.sourceforge.net/examples/axes_grid/simple_axesgrid.html http://matplotlib.sourceforge.net/examples/axes_grid/simple_axesgrid.html for a simple example Che

[Matplotlib-users] Formatted ticklabels going haywire?

2010-07-02 Thread magnus_p
Hello I am trying to change the font of the ticklabels, this does not work the 'normal' rc-way, so what I did was (example): import matplotlib.pyplot as pl ffont={'family' : 'sans-serif', 'sans-serif' : ['Arial'], 'size' : 15, 'weight' : 'bold'} fig = pl.figure(1) ax = fig.add_subplot(111) ax.se

Re: [Matplotlib-users] Twiny and affine transform for xlim

2010-06-30 Thread magnus_p
I finally solved it my self, after half a day of headbanging. This did the trick for me, it is really good since it uses the values of the lower x axis, so you do not have to go in fiddle with ticklabels etc, it also changes values when you pan/zoom etc. fig = pl.figure(1,figsize=(10.5,8)) fig.cl

[Matplotlib-users] Twiny and affine transform for xlim

2010-06-30 Thread magnus_p
I am trying to plot a spectrum, with lower x axis = velocity, on the upper = frequency The relationship between them (doppler formula) is f = (1-v/c)*f_0 where f is the resulting frequency, v the velocity, c the speed of light, and f_0 the frequency at v=0, ie. the v_lsr. I have tried to solv

Re: [Matplotlib-users] quiver with angles

2009-09-13 Thread magnus_p
I tried the code you supplied and I didn't get it to work with the *angles* keyword, I got: "ValueError: shape mismatch: objects cannot be broadcast to a single shape" I have matplotlib.__version__ = '0.98.5.2'. Although after thinking about it for a while I did: from scipy import * import matpl