Re: @gsFillOpacityF does not work

From: H.Dang <danghy_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 26 2013 - 16:17:04 MST

Hi Mary,

Thanks for the message! So I'll wait for the release of v6.1.2. I've got
an alternative solution for this version, I'll explain it in the email to
Rick.

Best
Hongyan
On Tue, Feb 26, 2013 at 5:51 PM, Mary Haley <haley@ucar.edu> wrote:

> Dear Hongyan,
>
> Not too long ago I implemented a gsnXYFillOpacities resources, but I
> didn't get around to putting it in V6.1.2.
> See example newcolor_16.ncl at:
>
> http://www.ncl.ucar.edu/Applications/rgbacolor.shtml#ex16
>
> To get the code necessary for using this resource, see this posting:
>
> http://www.ncl.ucar.edu/Support/talk_archives/2012/1940.html
>
> The "fill.ncl" script is the main code, and the "gsn_csm_xy_mod.ncl" is
> the script
> you need to load that modifies gsn_csm_xy to recognize this resource.
>
> It will be available in V6.2.0.
>
> --Mary
>
> On Feb 26, 2013, at 3:38 PM, Rick Brownrigg wrote:
>
> > What about trying the following:
> >
> > rgba = new( (/1,4/), float)
> > rgba(:,0:2) = namedcolor2rgb("cornflowerblue") ; note lack of space in
> name!
> > rgba(:,3) = 0.5
> > res@gsnXYFillColors = rgba(0,:) ; or possibly just "… = rgba"
> >
> > Untested, but it might get you what you need -- please let us know.
> >
> > Rick
> >
> > On Feb 26, 2013, at 3:01 PM, "H.Dang" <danghy@gmail.com> wrote:
> >
> >> Hi dear NCL'er,
> >>
> >> I wanted to add shades besides the blue curve on the graph
> "Resolute_line.png" (please see attached). The way I plot this graph is
> through:
> >>
> >> data = new((/2,35/),float, -999.)
> >> data(0,:) = ozone_season
> >> data(1,:) = model_ozone_season
> >> plot=gsn_csm_xy(wks,data,pressure_sonde,res)
> >>
> >> When I tried to add shades, I added the following code:
> >>
> >> data_stddev = new((/2,35/),"float",-999.)
> >> data_stddev(0,:) = ozone_season - 5
> >> data_stddev(1,:) = ozone_season + 5
> >> delete(res@gsnXYFillColors)
> >> delete(res@xyLineColors)
> >> res@gsnXYFillColors = "cornflower blue"
> >> res@gsFillOpacityF = 0.5
> >> res@xyLineColor = -1 ; We don't want
> the line, so make it transparent.
> >> std_plot = gsn_csm_xy(wks,data_stddev(0:1,:),pressure_sonde,res) ;
> Create filled XY plot.
> >> overlay(std_plot,plot)
> >>
> >> But res@gsFillOpacityF doesn't work for me, so the blue curve in
> Resolute_line.png is totally covered by shades (please see attached
> Resolute_shade.png). The warning message is:
> >>
> >> warning:gsFillOpacityF is not a valid resource in
> /Fall_SON_modelEY_ozonesonde024_Resolute_xy at this time.
> >>
> >> The version of NCL that I'm using is 6.1.0-beta. Is there a way to add
> the blue line on the shade in this version? Thank you!
> >>
> >> Hongyan
> >>
> <Resolute_line.png><Resolute_shade.png>_______________________________________________
> >> 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 Tue Feb 26 16:17:52 2013

This archive was generated by hypermail 2.1.8 : Thu Feb 28 2013 - 14:47:31 MST