Jeff Whitaker wrote: > Jeff Whitaker wrote: >> Timothée Lecomte wrote: >>> Dear all, >>> >>> I am using matplotlib with a great pleasure, and I enjoy its >>> capabilities. >>> I have recently attended a conference where the invited speaker >>> showed great visualizations of arrays from both experiments and >>> simulations. His plots were basically looking like those produced by >>> imshow, that is a luminance array rendered as a colormap image, but >>> with the additionnal use of a shading, which gives a really great >>> feeling to the image. You can feel the height of each part of the >>> image. >>> >>> I have tried to find what software could have produced such a plot, >>> and found the ReliefPlot function of Mathematica, which has >>> precisely this purpose : rendering a colormap image from an array >>> with a shading to give the perception of relief. >>> >>> The documentation and its examples are self-explanatory : >>> http://reference.wolfram.com/mathematica/ref/ReliefPlot.html >>> (look in particular at the first "neat example" at the bottom of >>> that page) >>> >>> The two "live" demonstrations illustrate this plot style quite well >>> too : >>> http://demonstrations.wolfram.com/ReliefShadedElevationMap/ >>> http://demonstrations.wolfram.com/VoronoiImage/ >>> >>> So here are my questions : >>> Is there a trick to generate an image with such a shading in >>> matplotlib ? >>> If not, do you know of a python tool that could help ? >>> Where could I start if I want to code it myself in matplotlib ? >>> >>> Thanks for your help. >>> >>> Best regards, >>> >>> Timothée Lecomte >>> >>> >> >> Timothée: There is nothing built-in, but it would be a nice thing to >> have. Here's a proof-of-concept hack that follows the approach used >> in the Generic Mapping Tools (explained here >> http://www.seismo.ethz.ch/gmt/doc/html/tutorial/node70.html), with >> some code borrowed from http://www.langarson.com.au/blog/?p=14. It's >> very rough, but if it looks promising to you I can try to polish it. >> >> -Jeff > > Found a bug, here's a fixed version. > > -Jeff > Hi Jeff,
Sure it looks promising ! The example you provided is very nice. I will try on my own data on Monday, and I'll let you know if it gives a good result too. Thank you very much for that very fast hack ! Best regards, Timothée ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users