[ncl-talk] boxplot second Y axis

Adam Phillips asphilli at ucar.edu
Wed Nov 14 10:57:39 MST 2018


Hi Vanúcia,
Please be more specific in your initial query as to what the end goal is,
as there can be large differences between creating a single plot and
creating a plot to be used in paneling. Following what was done in XY
example #27 <http://www.ncl.ucar.edu/Applications/Scripts/xy_27.ncl>, I
switched from manually overlaying to using NhLAddAnnotation to add the 3rd
set of box plots. That change allowed the overlaid plots to be resized
(when gsn_panel is called). I went ahead and modified my original script to
show an example of how to do this, and have attached the new script and the
output graphic.
Adam

On Tue, Nov 13, 2018 at 7:41 PM Vanúcia Schumacher <
vanucia-schumacher at hotmail.com> wrote:

> Sorry, but I'm not able to generate panel plots with these modifications.
> The right Y-axis is not generated, or becomes a mess.
>
> Please find attached the data to re-create this example.
>
> Thank you for the advance
> ------------------------------
> *De:* Adam Phillips <asphilli at ucar.edu>
> *Enviado:* terça-feira, 13 de novembro de 2018 20:07
> *Para:* Vanúcia Schumacher
> *Cc:* Ncl-talk
> *Assunto:* Re: [ncl-talk] boxplot second Y axis
>
> Hi Vanúcia,
> Thank you for sending your data and an easy to run script so I could
> quickly try things out. I've modified your script to perform a manual
> overlay of the two boxplots on one another, as well as creating a new
> boxplot function where the right hand Y-axis border and tick marks are
> turned on. (I copied the boxplot function from shea_util.ncl, commented out
> lines 106/108, and saved the function as boxplot2.)
>
> I've attached a modified version of your script, the output graphic and
> the slightly modified boxplot function. If you have any further questions
> let ncl-talk know.
> Adam
>
> On Mon, Nov 12, 2018 at 5:05 PM Vanúcia Schumacher <
> vanucia-schumacher at hotmail.com> wrote:
>
> Hi
>
> I'm trying to plot a boxplot with two Y axes, but I can not fix the right
> axis.
> Attached is my script and the data.
>
> The data has 36 rows and 14 columns, the one.txt data, I want to plot
> non-missing data with the same Y axis on the left side.
>
> The file data: two.txt, I wish to plot on the right Y axis, with the same
> X axis of the first file (one.txt).
>
> I do not know if it will be possible to create this plot, if anyone has
> any suggestions on how to proceed, I  will be grateful.
> _______________________________________________
> 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>
>


-- 
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/20181114/35ff8e35/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boxplot1_panel.ncl
Type: text/x-ncl
Size: 3057 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181114/35ff8e35/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.png
Type: image/png
Size: 40681 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181114/35ff8e35/attachment.png>


More information about the ncl-talk mailing list