[ncl-talk] gsn_contour_shade
Mary Haley
haley at ucar.edu
Mon Nov 7 10:24:36 MST 2016
Hi Jonathan,
I see that Adam already responded about one possible fix. I was also
working on a suggestion, which I'll go ahead and post since it allows you
to set other resources for fine-tuning your pattern fill.
Follow Adam's suggestion for copying the function to a new name, and then
in that new code, add these two lines right before the "return (plot)" call:
cnres = get_res_eq(opt,"cn")
attsetvalues_check(idstring,cnres)
What this does is look for any "cn" resources that you've attached to the
"opt" variable, and it will apply them to the existing plot before it exits
the function.
You have to be careful with this, because you don't want to use the same
resource list that you passed into the original gsn_csm_contour_xxx call.
If you do, then you will be applying *all* your original cnXXX resources to
the newly modified plot, which you don't want.
Instead, when you call gsn_contour_shade, make sure you are using a *new*
resource list, and then you should be able to set resource like
cnFillScaleF and cnFillDotSizeF.
I don't know yet if this is an ideal permanent solution. More testing is
needed for that!
--Mary
On Mon, Nov 7, 2016 at 8:33 AM, Buzan, Jonathan R <jbuzan at purdue.edu> wrote:
> Hi David,
>
> I see no change in the density or size of my stipple pattern. I’ve tried
> various combinations:
>
> opt = True
> opt at gsnShadeFillType = "pattern"
> opt at gsnShadeHigh = 17
> opt at cnMonoFillScale = True
> opt at cnFillScaleF = 0.1
> ; opt at cnMonoFillScale = False
> ; opt at cnFillScales = (/0,0,17/)
> ; opt at cnFillScaleF = 0.1
> ; opt at cnFillDotSizeF = 0.5
>
> plots1 = gsn_contour_shade(plots1,minshade,maxshade,opt)
>
> -Jonathan
>
>
>
>
>
> > On Nov 4, 2016, at 6:25 PM, David Brown <dbrown at ucar.edu> wrote:
> >
> > You may actually want to use cnFillScaleF, the scalar resource that
> > applies to all fill pattern instances in the plot when cnMonoFillScale
> > is set True (the default).
> > cnFillScales is the companion array resource that allows you to set
> > different fill scalings (densities) for each contour fill level. For
> > it to apply you need to set cnMonoFillScale to False.
> > For stipple fill in particular you might also want to be aware of
> > cnFillDotSizeF if you are not already.
> > -dave
> >
> >
> >
> > On Fri, Nov 4, 2016 at 4:02 PM, Buzan, Jonathan R <jbuzan at purdue.edu>
> wrote:
> >> Hello NCL-Talk,
> >>
> >> I am using the gsn_contour_shade command, with pattern 17 (stipple). I
> am attempting change the density of the stipple, however, the
> gsn_contour_shade page does not list any commands to do so.
> >>
> >> I tried, opt at cnFillScales = 0.5 but the command was not accepted
> and/or did not apply.
> >>
> >>
> >> -Jonathan
> >>
> >>
> >> _______________________________________________
> >> ncl-talk mailing list
> >> ncl-talk at ucar.edu
> >> List instructions, subscriber options, unsubscribe:
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >>
>
> _______________________________________________
> 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/20161107/16b5109d/attachment.html
More information about the ncl-talk
mailing list