Re: opacity in scatter plot?

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 17 2014 - 13:53:16 MDT

I see the issue now, as elaborated by Kyle and Alan. Here's a way around it: convert your list of named colors into rgba-tuples, and then set the alpha-channel directly as appropriate:

 colors = (/ "black", "red", "blue", "green" /)
 rgbacolors = namedcolor2rgba(colors) ;; new function in 6.2.0
…..
 rgbacolors(:,3) = 0.7 ; setting all alpha values to "0.7"
 res@xyMarkerColors = rgbacolors
 plot = gsn_csm_xy (wks, x, y, res)

I hope that helps…
Rick

On Apr 17, 2014, at 11:54 AM, Ufuk Utku turuncoglu <uturunco@ictp.it> wrote:

> Sorry. It is the latest version - 6.2.0.
>
> --ufuk
>
> On 17/04/14 19:28, Rick Brownrigg wrote:
>> Hi,
>>
>> As Alan asked -- what version of NCL are you using? That resource is valid for versions >= 6.1.0
>>
>> ncl -V
>>
>>
>> On Apr 17, 2014, at 10:22 AM, Ufuk Utku turuncoglu <uturunco@ictp.it> wrote:
>>
>>> Thanks for your help. Actually, i am getting following message when i try to use it,
>>>
>>> warning:gsMarkerOpacityF is not a valid resource in ...
>>>
>>> you can find the script as attachment (look at around line 264).
>>>
>>> --ufuk
>>>
>>>
>>> On 17/04/14 17:24, Brammer, Alan P wrote:
>>>> What version of NCL are you using? ncl -V to find out. If it’s older than 6.1.0 then the functionality won’t work.
>>>>
>>>> I just tested it in the script I had open and it worked as expected with a gsn_csm_xy plot using 6.2.0.
>>>>
>>>> If you have 6.1 or later, send your script to the list and further details can be explored.
>>>>
>>>>
>>>>
>>>> Alan.
>>>>
>>>>
>>>>
>>>> ##############################
>>>> Alan Brammer,
>>>> PhD Student,
>>>>
>>>> Department of Atmospheric and Environmental Sciences,
>>>> University at Albany, State University of New York, Albany, NY, 12222
>>>> abrammer@albany.edu
>>>> ##############################
>>>>
>>>>
>>>> On Apr 17, 2014, at 8:56 AM, Ufuk Utku turuncoglu <uturunco@ictp.it> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I just wonder that is it possible to change the opacity of the markers
>>>>> in scatter plots which is created by using gsn_csm_xy function. I tried
>>>>> to use gsMarkerOpacityF resource but it is not working with gsn_csm_xy.
>>>>>
>>>>> Regards,
>>>>>
>>>>> --ufuk
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>> <plot_pre-flx_scatter.ncl>_______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 17 13:53:25 2014

This archive was generated by hypermail 2.1.8 : Fri Apr 18 2014 - 17:37:58 MDT