On Fri, Aug 15, 2008 at 10:39 AM, CliftonH <[EMAIL PROTECTED]> wrote:

> I'm plotting data that I get out of a database, which works fine. The only
> thing that doesn't work, although it works with any other simple plot, is
> the xlim()- and ylim()-function.

> ylim(-9,13)
> xlim(-2,25)
> axhline(color='k')

Here is your problem -- all matplotlib plotting functions trigger the
autoscaling functionality, so your previous xlim/ylim setting is being
overridden.  To prevent this, either call xlim/ylim *after* the
plotting function, or turn autoscaling off

   gca().set_autoscale_on(False)

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

Reply via email to