## matplotlib-users

 [Matplotlib-users] How to get current value of xlim/ylim? From: Slackenerny - 2008-02-11 12:42:18 ```Hello List, assume I'm creating a plot via >f = Figure(figsize=(5,4), dpi=100) >graph = f.add_subplot(111, autoscale_on=False, xlim=[4,50], ybound=-2) >graph.plot(x,y,"g--o", ms=5) then the user zooms around a little does this and that. Now I want to draw a second plot, which uses the new xlim and ylim values from the old plot (i.e. has the same scaling). How can read out those values? best wishes heiko ```
 Re: [Matplotlib-users] How to get current value of xlim/ylim? From: Slackenerny - 2008-02-11 13:15:48 ```Hi, I could help myself with > graph.get_xlim() which I found after finally guessing the right expressions for Google, but I wonder how I could have found it in the help() output... I've been searching that for quite sometime and didn't come up with anything... So, how could I have helped myself, without annoying you? ;) best wishes > Hello List, > assume I'm creating a plot via >>f = Figure(figsize=(5,4), dpi=100) >>graph = f.add_subplot(111, autoscale_on=False, xlim=[4,50], ybound=-2) >>graph.plot(x,y,"g--o", ms=5) > then the user zooms around a little does this and that. > Now I want to draw a second plot, which uses the new xlim and ylim > values from the old plot (i.e. has the same scaling). How can read out > those values? > best wishes > heiko -- Mit freundlichen Grüßen Slackenerny mailto:slackenerny@... ```
 Re: [Matplotlib-users] How to get current value of xlim/ylim? From: Jouni K. Seppänen - 2008-02-11 15:13:22 ```Slackenerny writes: >>>graph = f.add_subplot(...) > I could help myself with >> graph.get_xlim() > So, how could I have helped myself, without annoying you? ;) The commands getp(graph) and setp(graph) might have helped. -- Jouni K. Seppänen http://www.iki.fi/jks ```