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