[ncl-talk] transparency in xy line plot
Rick Brownrigg
brownrig at ucar.edu
Mon May 2 20:27:28 MDT 2016
Hi Julie,
How are you setting the color(s) of the 30 ensemble members? If they are
being set to one color via xyLineColor, and set with a 3-tuple, you can of
course make that a 4-tuple with the 4th component being translucency. If
they are set via an array of 3-tuple colors and xyLineColors, the you can
do something like:
dims = dimsizes(myColors)
myColorsWithAlpha = new((/ dims(0), dims(1)+1/), float)
myColorsWithAlpha(:, 0:2) = myColors
myColorsWithAlpha(:, 3) = 0.25 ; sets all colors alpha/tranlucency to
.25
If they are set via one or more named colors, there's the function
"namedcolor2rgba"
that would give you an array of 4-tuples, from which you can set the alpha
channel accordingly.
If none-of-the-above, please send me the relevant code fragments and I'll
see if I can't help.
FWIW...the lack of a xyLineOpacityF resource seems like an omission, and
may indeed be a bug ticket (if not, it will be!).
Rick
On Mon, May 2, 2016 at 7:21 PM, Julie Arblaster <julie.arblaster at monash.edu>
wrote:
> Hello,
>
> I am using gsn_csm_xy to plot 30 timeseries from 30 ensemble members on
> one XY plot. I would like to make these slightly transparent using the new
> color model so that when I overlay the ensemble mean it stands out but is
> in the same colour. But I can't find a xyLineOpacityF resource. Can I
> achieve this somehow with other resources easily?
>
> Thanks,
> Julie
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160502/bffb5f26/attachment.html
More information about the ncl-talk
mailing list