Hi,

I've been generating many overlapping histograms with different hatch styles 
over the past month and a half. But now that I want to use them for a paper; I 
see that the hatch lines are illegibly faint in print. Is there a way to make 
them thicker? 

Any other suggestions for making overlapping histogram graphs legible for 
print? (I've got two classes that should each have its own legend, but they 
overlap). I've tried different hatching styles and also using transparency 
(hist(..,alpha=float)), but transparency has the undesired effect making the 
bar edges transparent and not just the fill.
for example:

"
if not(hatch):
        coudy_handle=hist(cloudy_data, cloudy_bins, facecolor = 
'1.0',alpha=0.2) #makes edges to light
        hold(True)
        clear_handle=hist(clear_data, clear_bins, facecolor = '0.8',  alpha=1.0)
    else:
        coudy_handle=hist(cloudy_data, cloudy_bins, hatch='||', fill=False) 
#fill lines are too faint
        hold(True)
        clear_handle=hist(clear_data, clear_bins, hatch='--', fill=False)

legend((clear_handle[2][0],coudy_handle[2][0]), ("Cloudy","Clear"), loc='best')
"

My current solution is to fill the back class (the one I plot first) and not 
fill the top one, but this is not general, i.e. I have to adjust it depending 
on how the classes overlap to ensure that the top class is never completely 
inside the back one. 

Thanks for the help,
Izak





----- Original Message ----
From: Michael Droettboom <[EMAIL PROTECTED]>
To: izak marais <[EMAIL PROTECTED]>
Cc: matplotlib-users@lists.sourceforge.net
Sent: Thursday, June 26, 2008 2:33:11 PM
Subject: Re: [Matplotlib-users] histogram hatching

Thanks for pointing this out.  This is now fixed in SVN.

Cheers,
Mike

izak marais wrote:
> The vertical and horizontal  hatch styles are swapped. According to 
> the docs:
>      |  - vertical
>      -  - horizontal
> but '|' gives horizontal and '-' vertical patterns. The reaming styles 
> appear to work correctly.
>
>
> ----- Original Message ----
> From: John Hunter <[EMAIL PROTECTED]>
> To: izak marais <[EMAIL PROTECTED]>
> Cc: matplotlib-users@lists.sourceforge.net
> Sent: Wednesday, June 25, 2008 3:49:56 PM
> Subject: Re: [Matplotlib-users] histogram hatching
>
> On Wed, Jun 25, 2008 at 6:05 AM, izak marais <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
> > Hi,
> >
> > I see there is a "hatch: unknown" kwarg mentioned in the hist()
> > documentation. Can anyone shed some light on how to use this please? I
> > assume it might be used to generate monochrome rectangles with
> > differentiating hatched fills?
>
> The rectangles generates by "hist" are matplotlib.patch.Rectangle
> instances, and the "hatch" property is controlled by the "set_hatch"
> method.  Here is the docstring which should tell you most everything
> you need to know.  Note the caveat at the end that it is only
> currently supported on postscript -- patches for other backends much
> obliged
>
>     def set_hatch(self, h):
>         """
>         Set the hatching pattern
>
>         hatch can be one of::
>
>           /  - diagonal hatching
>           \  - back diagonal
>           |  - vertical
>           -  - horizontal
>           #  - crossed
>           x  - crossed diagonal
>
>         Letters can be combined, in which case all the specified
>         hatchings are done.  If same letter repeats, it increases the
>         density of hatching in that direction.
>
>         CURRENT LIMITATIONS:
>
>         1. Hatching is supported in the PostScript backend only.
>
>         2. Hatching is done with solid black lines of width 0.
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>  

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


      
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to