|
From: Phil E. <pel...@gm...> - 2012-12-05 17:47:09
|
As of matplotlib v1.2.0 you can hatch a contour set directly. There is an example in the gallery: http://matplotlib.org/examples/pylab_examples/contourf_hatching.html Hope that helps, Phil On 5 December 2012 17:28, spencerahill <spe...@gm...> wrote: > Jae-Joon Lee wrote > > On Thu, Sep 15, 2011 at 10:33 PM, Jonathan Slavin > > < > > > jslavin@.harvard > > > > wrote: > >> I'm wondering if there is some way to do cross hatching as a way to fill > >> contours rather than colors (using contourf). The only references to > >> cross hatching I see in the documentation are for patches type objects. > >> As far as I can tell, contour and contourf return objects of their own > >> type (contour.QuadContourSet) that do not have hatch as an attribute. > >> > > > > Yes, it seems that hatching is only supported in patches. > > You may workaround this by converting contours to multiple patches. > > See the attachment. > > > > Matplotlib-users mailing list > > > Matplotlib-users@.sourceforge > > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > contour_to_hatched_patches.py (1K) > > < > http://matplotlib.1069221.n5.nabble.com/attachment/23/0/contour_to_hatched_patches.py> > ; > > Hi Jae-Joon, > > Your contour_to_hatched_patches.py script works excellently. Is there a way > to suppress the contour lines and filling, leaving only stippling? I have > been experimenting with it but no luck. > > I have a contourf of a 2D variable and a separate 2D array indicating > regions of statistical significance (i.e. a mask, which equals 1 in cells > where the variable is significant and equals 0 else), and I want to put > black hatching over the contourf where it is significant. I can get this to > work, but still with a black contour line surrounding the hatched region. > I'd like to remove the line, leaving just the hatching. Thanks! > > Best, > Spencer > > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/cross-hatching-in-contours-tp22p39945.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |