Re: Box plot line and fill

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 19 2013 - 10:21:10 MST

Hi Noel,

How did you create the box plots? "cnFillPatterns" only works for contour plots. "xyDashPatterns" will only work if you created the box plots using an XY plot.

If you are talking about true box plots via the "boxplot" function, then I think you can try setting gsLineDashPattern and "boxColors".

If this doesn't do what you want, then you will need to modify the "boxplot" function in shea_util.ncl to change the dash patterns or colors as desired This is pretty simple to do. My recommendation is to copy this function to your own xxx.ncl file, and rename it before you make changes.

Then you can call your modified version instead of this version. Search for lines like:

     polyres@gsLineDashPattern = 0
     polyres@gsLineColor = "black" ; color of lines

              polyres@gsLineColor = boxcolor(0)

            polyres@gsLineColor = boxcolor(gg)

and replace as necessary.

To get varying shades of gray, you can load a color map that consists of grays (like "gsltod"), and then your boxColors array can be color indexes into this table.

If you are not talking about box plot as I've described them above, then please be more specific about how you are creating them.


On Feb 18, 2013, at 10:05 AM, Noel Aloysius wrote:

> Hi NCL,
> I created several box plots with multiple colors. Now, I want to recreate these figures in grey scale in order to save about $200 on the publication cost.
> I want to know how to
> (a) use the @xyDashPatterns resource to draw the box with different dash patterns
> (b) use the @cnFillPatterns resource to fill the boxes with different fill patterns
> Thanks,
> Noel
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Tue Feb 19 10:21:21 2013

This archive was generated by hypermail 2.1.8 : Thu Feb 21 2013 - 11:26:43 MST