From: John H. <jdh...@ac...> - 2004-12-13 15:26:20
|
>>>>> "seberino" == seberino <seb...@sp...> writes: seberino> The z-axis values that I want to denote with color on seberino> this plot range from something like 57000 to 66000. seberino> I think I somehow need to tell Matplotlib what these seberino> minimum and maximum values are so that my color spectrum seberino> can range over desired colors for my specific plotting seberino> range. seberino> How do this? (How make 57000 be one color extreme and seberino> make 66000 be my other color extreme?) What plotting function are you using, imshow, pcolor, scatter, etc? The matplotlib color mapping and scaling will handle this automatically. It assigns 57000 to the first color on your colormap and 66000 to the last color, with interpolation between. There are a variety of ways to customize this # vmin is 57000 but vmax is changed >>> imshow(X, vmax=70000) # vmin is 66000 but vmin is changed >>> imshow(X, vmin=50000) # vmin and vmax both customized >>> imshow(X, vmax=50000, vmax=70000) Once you've plotted your data, you can use the clim function to set the color limits >>> clim(55000, 60000) Should help, JDH |