suggestion for transparent colour in shaded-plots

Matt Alonso matt.alonso at GMAIL.COM
Tue Jan 27 19:03:54 EST 2009


Hi Ron,

I will second that suggestion.

In the meantime though what I typically end up doing is creating a rather
roundabout solution to the situation and making use of ImageMagick's (
http://www.imagemagick.org) transparency feature (
http://www.imagemagick.org/script/command-line-options.php#transparent).
You can draw the first variable and set the shading for the region you want
to be transparent to a specific RGB value and then print that image to a
file; clear the buffer and do the same for the other variable.  You can then
do something like the following:

mogrify -transparent rgb(<red value>,<green value>,<blue value>)
first_image.gif
mogrify -transparent rgb(<red value>,<green value>,<blue value>)
second_image.gif
composite atop first_image.gif second_image.gif combined_image.gif

I don't have any code samples in front of me but if anyone is in need of
them let me know and I can send them out.  Hope this helps.

Cheers,
Matt

On Tue, Jan 27, 2009 at 6:12 PM, Goodson,Ron [Edm] <Ron.Goodson at ec.gc.ca>wrote:

>  Just a suggestion -- any chance of adding the ability to designate a
> colour number as transparent when doing "gxout shaded" plots?
>
> I know you can set the lowest shade to the background colour so it "looks"
> like nothing is being drawn (even though it is).  But that doesn't help when
> you want to have two separately shaded parameters (each between some limits
> so that neither cover the entire graphic)... as drawing the
> 2nd parameter overwrite the first.
>
> I currently do this by using maskout() to control what is valid data to
> draw.  But that leaves big-jagged edges based upon the resolution of my grid
> so is neither accurate, nor visually appealing (understandable as I see
> maskout as being more for calculations/analysis than for display)
>
> If a colour could be marked as transparent - then I could use that for the
> colour of my lower/upper limits of my shaded area and be able to smoothly
> overlay 2 different shaded areas.  Perhaps it would simply set the operation
> to XOR or something like that?
>
> ron
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20090127/c9502e5c/attachment.html 


More information about the gradsusr mailing list