From: magnus_p <ma...@sn...> - 2010-07-01 05:20:51
|
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.clf() ax_kms = fig.add_subplot(111) ax_kms.step(velocity, spect) ax_hz = ax_kms.twiny() x_1, x_2 = ax_kms.get_xlim() ax_hz.set_xlim(calc_frequency(x_1,data.restfreq/1e9), calc_frequency(x_2,data.restfreq/1e9)) Great! -- View this message in context: http://old.nabble.com/Twiny-and-affine-transform-for-xlim-tp29032627p29041680.html Sent from the matplotlib - users mailing list archive at Nabble.com. |