<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div><div>Hi Rick,</div><div><br></div><div>Yes, I’m using xyLineColors and was using a combination of named colours and ones I’d created myself using NhlNewColor. I had tried adding a 4th component to NhlNewColor but see now we don’t need to use that at all and can just create the 4-tuple arrays. Thanks for the tips, it works well now.</div><div><br></div><div>Julie</div><div><div><div><br></div></div><div><span style="font-family: -webkit-standard; font-size: medium;"><br></span></div></div></div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Rick Brownrigg <<a href="mailto:brownrig@ucar.edu">brownrig@ucar.edu</a>><br><span style="font-weight:bold">Date: </span> Tuesday, 3 May 2016 at 12:27 PM<br><span style="font-weight:bold">To: </span> Julie Arblaster <<a href="mailto:julie.arblaster@monash.edu">julie.arblaster@monash.edu</a>><br><span style="font-weight:bold">Cc: </span> "<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>" <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>><br><span style="font-weight:bold">Subject: </span> Re: [ncl-talk] transparency in xy line plot<br></div><div><br></div><div dir="ltr"><div><br>Hi Julie,<br><br><br></div><div>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 xyLineColor<span style="background-color:rgb(255,0,0)"><span style="color:rgb(255,0,0)"><span style="background-color:rgb(255,255,255)">s<font color="#000000">, the you can do something like:<br><br></font></span></span></span></div><div><span style="background-color:rgb(255,0,0)"><span style="color:rgb(255,0,0)"><span style="background-color:rgb(255,255,255)"><font color="#000000"> dims = dimsizes(myColors)<br></font></span></span></span></div><div><span style="background-color:rgb(255,0,0)"><span style="color:rgb(255,0,0)"><span style="background-color:rgb(255,255,255)"><font color="#000000"> myColorsWithAlpha = new((/ dims(0), dims(1)+1/), float)<br></font></span></span></span></div><div><span style="background-color:rgb(255,0,0)"><span style="color:rgb(255,0,0)"><span style="background-color:rgb(255,255,255)"><font color="#000000"> myColorsWithAlpha(:, 0:2) = myColors<br></font></span></span></span></div><div><span style="background-color:rgb(255,0,0)"><span style="color:rgb(255,0,0)"><span style="background-color:rgb(255,255,255)"><font color="#000000"> myColorsWithAlpha(:, 3) = 0.25 ; sets all colors alpha/tranlucency to .25<br><br></font></span></span></span></div><div><span style="background-color:rgb(255,0,0)"><span style="color:rgb(255,0,0)"><span style="background-color:rgb(255,255,255)"><font color="#000000">If they are set via one or more named colors, there's the function </font></span></span></span>"namedcolor2rgba" that would give you an array of 4-tuples, from which you can set the alpha channel accordingly.<br><br></div><div><span style="background-color:rgb(255,0,0)"><span style="color:rgb(255,0,0)"><span style="background-color:rgb(255,255,255)"><font color="#000000">If none-of-the-above, please send me the relevant code fragments and I'll see if I can't help. <br><br></font></span></span></span></div><div><span style="background-color:rgb(255,0,0)"><span style="color:rgb(255,0,0)"><span style="background-color:rgb(255,255,255)"><font color="#000000">FWIW...the lack of a xyLineOpacityF resource seems like an omission, and may indeed be a bug ticket (if not, it will be!).<br><br></font></span></span></span></div><div><span style="background-color:rgb(255,0,0)"><span style="color:rgb(255,0,0)"><span style="background-color:rgb(255,255,255)"><font color="#000000">Rick<br><br></font></span></span></span></div><div><span style="background-color:rgb(255,0,0)"><span style="color:rgb(255,0,0)"><span style="background-color:rgb(255,255,255)"><span style=""></span></span></span><span style="background-color:rgb(244,204,204)"><span style=""></span></span><span style="background-color:rgb(243,243,243)"><span style=""><span style="background-color:rgb(255,255,255)"></span></span></span><span style="background-color:rgb(255,255,255)"><span style=""></span></span></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 2, 2016 at 7:21 PM, Julie Arblaster <span dir="ltr"><<a href="mailto:julie.arblaster@monash.edu" target="_blank">julie.arblaster@monash.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>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?
</div><div><br></div><div>Thanks,</div><div>Julie</div></div><br>_______________________________________________<br>
ncl-talk mailing list<br><a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br><br></blockquote></div><br></div></div></span></body></html>