On Tue, Sep 2, 2008 at 5:04 AM, bernardo martins rocha <[EMAIL PROTECTED]> wrote: > Hi Guys, > > I have some questions: > > 1. How can I zoom in the horizontal axis and maintain the vertical axis > unchanged with the zoom tool provided by matplotlib?
Hold down the 'x' key while zooming to constrain the zoom to the x-axis -- ditto for 'y'. This is covered at http://matplotlib.sourceforge.net/doc/html/users/navigation_toolbar.html > 2. How can I change the xticks so that they do not overlap each other? > For instance, I have a plot in time, but since it's a huge simulation > the time ticks 2000 3000 are overlapping, so that I cannot understand. > Is it possible to change the units? Like 2 3 and then add 10^3 somewhere > else? I hope you can understand my question...sorry if it's not clear. You can set fewer ticks either by using your own date locator instance (see the user's guide' chapter on tick locating and formatting) or by setting the tick locations explicitly (eg, ax.set_xticks). Another thing that can help is to rotate the tick labels -- with date plots there is a helper function fig.autofmt_xdate() which does this automatically. The basic code is for label in ax.get_xticklabels(): label.set_horizontalalignment('right') label.set_rotation(30) JDH ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users