[ncl-talk] gsn_contour_shade

yang yang yang.yang816 at gmail.com
Tue Aug 21 22:01:47 MDT 2018


Hi Adam:

Thanks very much for your help!

I took your first suggestion and it works.

Regards
Ed

On Wed, Aug 22, 2018 at 3:38 PM Adam Phillips <asphilli at ucar.edu> wrote:

> Hello,
> gsn_contour_shade simply color fills contours of the existing contour
> field. If you call it twice for the same plot, it will replace the color
> filled contours from the 1st call to gsn_contour_shade with those specified
> in the second call.
>
> You have two options:
> 1) create two versions of wspeedfill, call gan_contour_shade for each, and
> then overlay.
> 2) Do not use gsn_contour_shade and specify the fill colors using the
> cnFillColors resource, setting most colors to transparent and two colors to
> grey.
> Hope that helps! If you have further questions let ncl-talk know.
> Adam
>
> On Aug 21, 2018, at 7:34 PM, Rick Brownrigg <brownrig at ucar.edu> wrote:
>
> Hi,
>
> Very hard to say with the information provided. The examples cited at the
> bottom of the description of gsn_contour_shade show how to do multiple
> shades:
>
>
> http://ncl.ucar.edu/Document/Graphics/Interfaces/gsn_contour_shade.shtml
>
> In general, they involve setting the resources gsnDraw and gsnFrame to
> False, doing your gsn_contour_shade() calls, and then calling
>
>   draw(plot)
>   frame(wks)
>
> to draw everything.
>
> If those examples don't help, you might write back with more of your
> script to help others trouble shoot.  I hope that helps...
>
> Rick
>
> On Tue, Aug 21, 2018 at 5:29 PM, yang yang <yang.yang816 at gmail.com> wrote:
>
>> Dear All:
>>
>> I would like to plot two shade areas in a diagram using the codes below:
>>
>>   wspeedfill    = gsn_csm_contour(wks,ptt,wspeed_res)
>> opt = True
>>   opt at gsnShadeMid = "grey"
>>  wspeedfill = gsn_contour_shade(wspeedfill,315.,330.,opt)
>> draw(wspeedfill)
>> opt1 = True
>> opt1 at gsnShadeMid = "grey"
>> wspeedfill = gsn_contour_shade(wspeedfill,340.,355.,opt1)
>>
>> However, only one shade area (340.,355.) was plotted. Can you please
>> tell me how to fix this problem?
>>
>> Thanks very much!
>>
>> Regards
>> Ed
>>
>>
>> _______________________________________________
>> 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/20180822/ade2d884/attachment.html>


More information about the ncl-talk mailing list