[ncl-talk] Adding a reference line for third Y axis

Deniz Bozkurt bozkurtd at itu.edu.tr
Wed Jun 24 21:02:02 MDT 2015


Hi Mary,

I updated the script based on your script and it is fine now. In my script, "gsnDraw" is set to "False" and I was adding the legend with "gsn_create_legend" function and finally draw the plot. When I turned off these parts and added the legend with "pmLegendDisplayMode", the problem is not reproduced anymore.

Thank you for your help!

Deniz

--
Deniz Bozkurt, PhD
Post-doctoral Fellow
Center for Climate and Resilience Research
Department of Geophysics, University of Chile
Blanco Encalada 2002, Santiago, Chile
E-mail: dbozkurt at dgf.uchile.cl <mailto:dbozkurt at dgf.uchile.cl>, deniboz at gmail.com <mailto:deniboz at gmail.com>
Web: http://dgf.uchile.cl/~dbozkurt/ <http://dgf.uchile.cl/~dbozkurt/>

> Deniz,
> 
> I was unable to reproduce the problem.  Can you try running this script, which does what I think you were describing?  I think you should be able to run it as-is, and it should produce the attached PNG image.
> 
> --Mary
> 
> 
> On Tue, Jun 23, 2015 at 2:26 PM, Deniz Bozkurt <bozkurtd at itu.edu.tr <mailto:bozkurtd at itu.edu.tr>> wrote:
> Hi all,
> 
> I am using “gsn_csm_xy3” function to have an XY plot with three different Y axes (figure is attached). A horizontal reference line is added by “gsnYRefLine” resource for the right Y axis with these lines:
> 
> resL at gsnYRefLine   = 0
> resL at gsnYRefLineColor = "forestgreen"
> resL at gsnYRefLineThicknessF = 1.0
> resL at gsnYRefLineDashPattern = 0
> 
> When I simply try to add another reference line for the rightmost Y axis with following lines, I am receiving “warning:TransformPostDraw: tfPolyDrawList element 0 is invalid”:
> 
> resM at gsnYRefLine   = 0
> resM at gsnYRefLineColor = "red"
> resM at gsnYRefLineThicknessF = 1.0
> resM at gsnYRefLineDashPattern = 0
> 
> What I have understood from NCL mailing archive, this warning message is related with multiple calling of “gsn_add_xxxx” functions. However, I don’t have any idea why NCL does not draw the reference line for the rightmost Y axis for this case. I could probably draw it by using “gsn_polyline” but I would be pleased if anyone suggests a way to do it  with “gsnYRefLine”.
> 
> NCL: 6.2.0
> 
> Thanks in advance,
> 
> Deniz
> 
> --
> Deniz Bozkurt, PhD
> Post-doctoral Fellow
> Center for Climate and Resilience Research
> Department of Geophysics, University of Chile
> Blanco Encalada 2002, Santiago, Chile
> E-mail: dbozkurt at dgf.uchile.cl <mailto:dbozkurt at dgf.uchile.cl>, deniboz at gmail.com <mailto:deniboz at gmail.com>
> Web: http://dgf.uchile.cl/~dbozkurt/ <http://dgf.uchile.cl/%7Edbozkurt/>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150625/dfe1cec4/attachment.html 


More information about the ncl-talk mailing list