On Sat, Sep 26, 2009 at 9:50 PM, Jae-Joon Lee <lee.j.j...@gmail.com> wrote:

> On Fri, Sep 25, 2009 at 1:14 AM, Gökhan Sever <gokhanse...@gmail.com>
> wrote:
> > With twin and proper Affine2D transformation I could not make the
> secondary
> > y-axis data being shown on the figure.
>
> Please post a simple, complete code that does not work.
> Just saying "it didn't work" does not help.
>
> I think the following change (or something like this) in you code
> (dccn_plot.py) seems to work to my eyes. If this is not what you want,
> you have to describe why it is not.
>
> import matplotlib.transforms as mtransforms
> aux_trans = mtransforms.Affine2D().translate(0., -0.5).scale(1., 3500/0.45)
> #pary = host.twinx()
> pary = host.twin(aux_trans)
>
> Regards,
>
> -JJ
>


OK JJ, trying to be more descriptive.

To run the code, you have to get nasafile.py and add this into your
PYTHONPATH, later get dccn_plot.py and 09_03_26_11_36_15.dmtccnc.combined.raw
file. nasafile.py has the NasaFile class to read this ascii file.

run as ./dccn_plot.py 09_03_26_11_36_15.dmtccnc.combined.raw

I have changed the code as you suggested. Here is the result:
http://img44.imageshack.us/img44/1075/newsso.png

Two things I notice, right y-axis label is gone, and latter the top x-axis
nicely added there but it a replicate of bottom x-axis. Doing this:

from matplotlib.dates import DateFormatter, HourLocator
locator    = HourLocator()
pary.xaxis.set_major_locator(locator)
formatter = DateFormatter(r'$%H^h$')
ax2.xaxis.set_major_formatter(formatter)

results with my IPython session crashed:

RuntimeError: Locator attempting to generate 216001 ticks from 41000.0 to
50000.0: exceeds Locator.MAXTICKS


I want to be able see in this fashion:

I[3]: current_axis = gca()
I[4]: current_axis.xaxis.set_major_formatter(DateFormatter('%H:%M:%S'))

but this returns the bottom x-axis and changes them to all 00:00:00.


-- 
Gökhan
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to