[gradsusr] Two gxout shaded value in one plot

Arlindo da Silva dasilva at alum.mit.edu
Sun Nov 20 17:12:49 EST 2011


On Sat, Nov 19, 2011 at 1:12 PM, Joe Moore <joe at wxjoe.com> wrote:

> Hello!
>
> Can you provide the code you are trying to use? I'm having trouble
> understanding exactly what you mean.
>
> Overlaying two shaded displays will result in the first being covered by
> the second unless you specify to only shade certain values of the second.
> While it is possible to set a shaded value to transparent using the latest
> GrADS version (use set gxout shade2 and set the color to -1 to be
> transparent), it is not possible (not my knowledge) to do any kind of
> partial transparency.
>
>
Yes, youn can, with the the "set_rgba" command in opengrads. It works just
like "set rgb" but in addition to the red/green/blue values you specify an
"alpha" value that controls the opacity of that color, see below. The
caveat is that you do not see the transparency on the screen, only when you
create the output with gxyat (png, svg, pdf or ps). (When Grads 2.1 is
released I believe we will be able to extend this feature to screen output
as well.)

    Arlindo


*NAME*
     set_rgba - define color including alpha channel

*SYNOPSIS*
     set_rgba color red green blue alpha [mask]

*DESCRIPTION*
     This User Defined Command (UDC) defines *color* given its
     RGB triplet along with its *alpha* channel.

     color   integer in the range [16-255]
     red,
     green,
     blue    integers in the range [0-255]
     alpha   float, with alpha ranging from 0.0 (fully transparent)
             to 1.0 (fully opaque).

    The optional parameter *mask* determines whether the color below
    it is visible or not.

    mask=0  --- if alpha<1, *color* will be semi-transparent and the
                colors below it will be visible (default)
    mask=1  --- if alpha<1, *color* will be semi-transparent but the
                colors below it will *not* be visible

*EXAMPLE*
    In order to emulate the -t option in printim

       ga-> set rgb 60 125 125 125
       ga-> printim img.png -t 60

       Specify alpha=0 and mask=1

       ga-> set_rgba 60 125 125 125 0 1
       ga-> gxyat img.png

-Joe
>
>
> On Sat, Nov 19, 2011 at 3:21 AM, Cuba <jakubguzikowski at o2.pl> wrote:
>
>> Hellow Gradsuser,
>> I try make two gxout shaded value in one plot, but this not go.
>> I know as make shaded value and countur in one plot, but in this time i
>> needs two shaded value.
>> Please for help.
>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20111120/bee1049d/attachment-0003.html 


More information about the gradsusr mailing list