[pyngl-talk] Fill color between 2 lines with Ngl.xy

Fearon, Dr. Matthew, Contractor, Code 7533 matthew.fearon.ctr at nrlmry.navy.mil
Thu Aug 23 13:27:47 MDT 2018


Hi, PyNGL Users,

I'm trying to indicate the terrain profile on the attached cross section plot. I am able overlay an xy line (black, terrain top) and another xy line (red, ground surface), but am unable to fill color between these two lines. All the combinations I have tried are not working. Below is my Ngl.xy code for the overlay. Any help is greatly appreciated.

Thanks,
Matt

-----
xvar[100] is a np array of the xvalues
pter[2,100] is a np array of the yvalues

    xyres                        = Ngl.Resources()
    xyres.nglFrame               = False
    xyres.nglDraw                = False
    xyres.xyLineColors           = ["black","red"]
    xyres.xyLineThicknesses      = [8,8]
    xyres.nglXYFillColors        = ["red","red"]
    xyres.nglXYBelowFillColors   = ["red","red"]
    xyres.nglXYAboveFillColors   = ["red","red"]

    xyline = Ngl.xy(wks,xvar,pter,xyres)

    Ngl.overlay(plot,xyline)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20180823/57b264b2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rh_D20140614.png
Type: image/png
Size: 230791 bytes
Desc: rh_D20140614.png
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20180823/57b264b2/attachment-0001.png>


More information about the pyngl-talk mailing list