On Fri, Dec 11, 2009 at 2:34 PM, Ryan Neve <ryan.n...@gmail.com> wrote:
> Thank you for your help. I found the problem. It was caused by using > pyplot.title(). It is working better now. > I next have to figure out how to do the following within AxesGrid: > > 1. How to convert the x axis labels from an integer value representing > epoch seconds to a nicely formatted date. I think this has something to do > with matplotlib.dates.DateFormatter. I hope that this will remove the > 1.25325e9 from the plot. > > 2. How to minimize or eliminate the white bands on the right and bottom > of each axes caused by the axis scale exceeding the data values. > > 3. How to eliminate (or hide) the first major tic label on the y axis > (always 0) so it doesn't overlap with the last tick from the previous y > axis. > > It seems like there may be a different way to approach this than with > subplot() > While there are certain differences, most of the usual matplotlib command supposed to work. So, I recommend you to read the matplotlib documentation first. 1. There are lots of examples in the gallery. Please take a look. 2. see the code below. 3. this kind of thing is difficult to do with axes_grid toolkit. but see below. First, you need to change the x-values to date (not seconds). Then, add the code below inside your for loop. Other than ax.axis["bottom"].. thing, these are just normal matplotlib command. Also, I should have mentioned it earlier, but I don't see any need of axes_grid toolkit in your code. You'd better simply use subplot, which is recommended if you're not familiar with matplotlib. Regards, -JJ ax = my_grid[i] ax.autoscale_view(tight=True) # adjust xlim and ylim # you can manually call ax.set_xlim and ax.set_ylim. ax.xaxis_date() # tick format as date and time ax.axis["bottom"].major_ticklabels.set_rotation(30) ax.axis["bottom"].major_ticklabels.set_ha("right") ax.axis["bottom"].major_ticklabels.set_va("top") # with axes_grid toolkit, it is difficult to make a certain # ticklabel invisible (without disabling the tick line). The # below line of code slightly adjust the ylim so that y=0 ticks # are not shown ax.set_ylim(ymax=-0.001)
------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users