[ncl-talk] 2nd axis with Boxplot

Kreienkamp Frank Frank.Kreienkamp at dwd.de
Wed Dec 4 01:00:17 MST 2019


Hello Adam,

yes the path leads to the target. Thanks

But I have the problem to shift the 2. axis (new, res2@) to the right side of the Box plot. What is wrong in the script?

Thanks in advance
Frank



-----Ursprüngliche Nachricht-----
Von: Adam Phillips <asphilli at ucar.edu> 
Gesendet: Montag, 2. Dezember 2019 22:36
An: Kreienkamp Frank <Frank.Kreienkamp at dwd.de>
Cc: ncl-talk at ucar.edu
Betreff: Re: [ncl-talk] 2nd axis with Boxplot

Hi Frank,
No there is not. However, you could use the vpXF/vpYF/vpWidthF/vpHeightF resources to set exactly where you want the boxplot to be drawn, and then specify the same resources, turn off all borders/tickmarks/labels except the Y-Axis, create a blank plot using gsn_csm_blank_plot, and draw one on top of another:
https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_blank_plot.shtml


Tick mark example #11 is similar, but overlays one plot on another using the overlay procedure.
http://www.ncl.ucar.edu/Applications/tickmarks.shtml#ex11

You will not want to use overlay, but you will want to set gsnDraw = True (=default) and gsnFrame = False in both resource lists.

bres = True   ; boxplot resource list
bres at gsnFrame = False
bres at vpXF = 0.2
bres at vpYF = 0.8
...
plot = boxplot(....

res = True   ; blank plot resource list
res at gsnFrame = False
res at tmYUseLeft = False
res at tmYROn = False
res at tmYRLabelsOn = False
res at tmXBOn = False
res at tmXBLabelsOn = False
...    ; other tm resources may be needed.
res at trYMinF = ..
res at trYMaxF = ..
res at tmYLMode = "Explicit"
res at tmYLValues = (/.../)
res at tmYLLabels = (/.../)

bplot = gsn_csm_blank_plot(...
frame(wks)

Hope that gets you going in the right direction!
Adam

On Mon, Dec 2, 2019 at 1:56 AM Kreienkamp Frank via ncl-talk <ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu> > wrote:


	Hello,

	 

	is there a function to have a 2nd y-axis with boxplots? Something like gsn_csm_xy2

	 

	Thanks in advance

	Frank

	 

	 

	 

	_______________________________________________
	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



-- 

Adam Phillips 

Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR

www.cgd.ucar.edu/staff/asphilli/ <http://www.cgd.ucar.edu/staff/asphilli/>    303-497-1726 


<http://www.cgd.ucar.edu/staff/asphilli> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Box_Percentile_Plot.ncl
Type: application/octet-stream
Size: 20874 bytes
Desc: Box_Percentile_Plot.ncl
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191204/4e7b2470/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test-2Achsen.ncl
Type: application/octet-stream
Size: 7178 bytes
Desc: Test-2Achsen.ncl
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191204/4e7b2470/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test-2Achsen.png
Type: image/png
Size: 80854 bytes
Desc: Test-2Achsen.png
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191204/4e7b2470/attachment.png>


More information about the ncl-talk mailing list