[ncl-talk] Draw boxplot and xyplot in the same plot

Adam Phillips asphilli at ucar.edu
Mon Dec 9 15:48:52 MST 2019


Hi Xueyan,
An example that does exactly what you want does not exist, but, as the
boxplot is an XY plot, you can overlay another XY-plot onto it even if they
do not share the same axis. XY plot applications example #27 comes closest
to doing what you want: http://www.ncl.ucar.edu/Applications/xy.shtml#ex27
In this example, gsn_csm_xy3 is used first to draw 3 lines/axes, and then
gsn_csm_xy is used to add a 4th line. You can simply use gsn_csm_xy twice
and follow the same steps used in that example.
Good luck,
Adam

On Sun, Dec 8, 2019 at 2:10 PM Xueyan Zhang via ncl-talk <ncl-talk at ucar.edu>
wrote:

> Hello ncl-talk,
>
> Does anyone try to plot boxplot and xyplot in a plot? Like:
> [image: 9CA(ZAB6I83 at _NR$J~N)A89.png]
> They have the same X-axis but each type has different y-axis.
>
> Thanks in advance!
>
> Xueyan
> _______________________________________________
> ncl-talk mailing list
> 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/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191209/1b3e0c74/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9CA(ZAB6I83 at _NR$J~N)A89.png
Type: image/png
Size: 150223 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191209/1b3e0c74/attachment.png>


More information about the ncl-talk mailing list