Christian, The answer to your second question is a little more involved and I think there are a few posts regarding custom colormaps on the mailing list that may be of interest...I'd try searching through those. I may not be the best person to answer that question.
Also you may be interested in exploring the *kwargs vmin and vmax of the imshow command. They may do what you need as well: http://matplotlib.sourceforge.net/api/axes_api.html?highlight=imshow#matplotlib.axes.Axes.imshow As for your first question try the following in ipython with the -pylab flag: import numpy as N a = N.random.rand(50) a*=100 plot(a) ax = gca() ax.set_xlim(0,25) # The set_xlim and set_ylim may be what you're looking for... ax.set_ylim(0,50) show() --- On Mon, 12/29/08, Christian Lerrahn <li...@penpal4u.net> wrote: From: Christian Lerrahn <li...@penpal4u.net> Subject: [Matplotlib-users] Manually limiting value ranges To: matplotlib-users@lists.sourceforge.net Date: Monday, December 29, 2008, 11:19 PM Hi, I've been trying to do this for a while but just can't get it to work. :( There are 2 things I want to do. 1. I want to limit the value range in a line plot from matplotlib.pyplot.plot(). I thought that clip_box would do exactly that but setting something like [[-1,1],[-5,5]] or the like doesn't seem to have any effect. 2. In a 2D map plot from matplotlib.pyplot.imshow(), I would like to set the limits for the colour bar manually. I.e. I want the colours to be equally distributed over a fixed range. In both cases, the background to my attempt of using fixed values is that I'm producing a time series of plots via script and want all the plots to be directly comparable. Did I overlook this in the examples (or the documentation) or is there really no simple way of doing this? Cheers, Christian ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users