From: John H. <jdh...@ac...> - 2005-02-25 04:25:04
|
>>>>> "Yann" == Yann Le Du <yan...@no...> writes: Yann> Hello, Is there a simple argument to pass to matshow so that Yann> it'll print 0 as white and 1 as black, and not the opposite Yann> as it defaults to ? You can do this by passing a custom colormap to the matshow function. See the following threads on the mailing list archive for more information on creating custom colormaps http://sourceforge.net/mailarchive/message.php?msg_id=10482430 http://sourceforge.net/mailarchive/message.php?msg_id=10020116 See also the user's guide section 6.4.4 "Defining your own colormap" You might also want to spend a little time looking at the src code of the matplotlib modules cm and colors for inspiration on how to define your own. Hopefully we can improve the documentation and example code in this area in the not too distant future... Hope this helps, JDH |