On Sat, Sep 26, 2009 at 11:10 PM, Gökhan Sever <gokhanse...@gmail.com> wrote:
> 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
>

Please note that your entire application is hardly a "small, complete example".
While I did download your code from the svn  and ran it, but
understand that it makes the job difficult and reduces your chance of
getting help from the developers (or other users).


> 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:

For the diappearing label,
unfortunately, the axes_grid toolkits has slightly different behavior
from mainline mpl.

http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#id5

http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/axislines.html

Adding

pary.axis["right"].label.set_visible(True)

in your code will work.

At second thought, this might be a bug in the axes_grid toolkit.

For your second point.
There is a reason that I used a factor 3600 in my first example.

aux_trans = mtransforms.Affine2D().scale(3600., y_max) # transform
from ax2 to ax1

You need to try to understand the units for date-time display and then
figure out the correct transform for your need.
If you try 3600, the unit will show as hours. But you may need some
more work to make it fit  your need.

-JJ


>
> 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.

------------------------------------------------------------------------------
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