<div dir="ltr">Hi James,<div>I originally created the boxplot function that was put into NCL. Looking back I wish I had made it a bit more flexible in terms of the box drawing options. A few years ago I created a new function unoriginally named "boxplot2", that allows the user to color fill the boxes (and change the color of the mid-line). It also hardwired the lines to the bottom/top values to solid. I have attached the code here. The function works exactly the same as boxplot, but allows the use of two additional options for the first resource list (named boxOpts in the documentation): boxFill_Colors (sets the colors that fill the boxes) and boxFill_midColor (sets the mid-value line color). An example of the use of the function to draw 2 boxes:</div><div><br></div><div>bres = True</div>bres@vpWidthF = 0.6<br><div>bres@vpHeightF = 0.45</div><div>bres@tiYAxisString = "(~S~o~N~C)"<br></div><div><br></div><div>llres                   = True                    <br>llres@gsLineThicknessF  = 1.5                 ; line thickness <br></div><div><br></div>opti          = True                     <br><div>opti@boxWidth = .3                         ; Width of box (x units)</div><div>opti@boxFill_Colors := (/-1,1/) <br></div><div>opti@boxFill_midColor := (/1,0/)<br>opti@boxColors := (/1,1/)       <br></div><div>bplg = boxplot2(wks,(/0.5,1.5/),yval_lg,opti,bres,llres)<br></div><div><br></div><div>Note that you can make any edits to the boxplot2 function as you would like, and can thus improve upon the function.</div><div>Hope that helps!</div><div>Adam</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 21, 2022 at 7:09 AM James Ciarlo' via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">
<div>Dear NCL users, <br></div><div><br></div><div>I am trying to draw a
 boxplot - which for the most part has been successful. However, there 
are two details that I would like to change but can't seem to figure 
out. I have attached the ncl script (please note that I haven't added 
the data as it's vast and in different directories) and the current 
image produced.<br></div><div><br></div><div><b>lines to bottom/top values: <br></b></div><div>I
 want the lines to be solid instead of dashed, but gsLineDashPattern is 
not working. I have tried it with different resources on lines 303 and 
307.</div><div><br></div><div><b>box-fill:</b></div><div>I want to put a
 grey box fill to the boxplot elements. From what I could find this is 
not an option, so I resorted to drawing polygons. But before I write the
 proper polygon positions, I drew a box that overlaps the boxplot 
elements - I want it to appear in the background, and I am probably 
using the DrawOrder incorrectly.</div><div><br></div><div>Thank you for your help</div><div>James</div>

</div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>