
String HighBoxW_str= NameOfWave (Mx )+ "_p_"+ StringFromList ( 3,ListOfPercentiles ) String MedianW_str= NameOfWave (Mx )+ "_p_"+ StringFromList ( 2,ListOfPercentiles ) String LowBoxW_str= NameOfWave (Mx )+ "_p_"+ StringFromList ( 1,ListOfPercentiles ) String LowWhiskerW_str= NameOfWave (Mx )+ "_p_"+ StringFromList ( 0,ListOfPercentiles ) Killwaves TempSort,TempMatrix,TmpPercentilesįunction GraphOneVariable (Mx,ListOfPercentiles,XaxisCatPlot ) Wave TempSort,TempMatrix,TmpPercentiles,PCNames GraphOneVariable ( $ListofMx ,ListOfPercentiles,XaxisCatPlot )įunction CalcMxPerc (Mx,ListOfPercentiles )įWavePercentile ( NameOfWave (Mx ), ListOfPercentiles, NameOfWave (Mx )+ "_p", 0, 0, 0 ) Variable nbCat= dimsize (XaxisCatPlot, 0 ) Unfortunately, the list is long and dominated by our extensive re-write of Igor for version 7.įunction GlobCatBoxPlot (ListOfMx,ListOfPercentiles,XaxisCatPlot ) I will add the capability to my list of things I need to do.

I have attached a PNG of the graph I made. Maybe you could add colored fills to the error boxes in a drawing program if you export the graph in a suitable format.
Box plots in igor pro code#
It is a royal pain in the neck (or other body part) to do it manually, and the box plot code won't do it correctly in this case. Unfortunately, filling the boxes on a box plot is done by adding colored rectangles as drawing objects. You can use the Modify Trace Appearance dialog to change line thickness and trace color. Since the Graph->Modify Box Plot control panel doesn't expect the extra traces, etc., you can't use it to modify the appearance of the plot. I'm not sure- you will have to experiment.īy now you should have a box plot with three data sets. Since you will have three boxes, you might choose something like. Change the X +/- setting to something narrower. One by one, select the median traces (P_Fn_50), un-check and re-check the Error Bars checkbox to bring up the Error Bars dialog. This will make the boxes occupy different slots in the category bar space.ĥb) The boxes and median lines are actually X error bars. Since you aren't using outliers, that would be P_F1_25. Double-click any trace to bring up the Modify Trace Appearance dialog.ĥa) Find the last trace of the first box plot. Use the command you use above substituting fAppendBoxPlot for fBoxPlot and "P_F2" for "P_F1" and then again with "P_F3".ĥ) You now have something of a mess. You have already done that by invoking fWavePercentile with different strings in the first parameter.ģ) You will need to make the starting plot using fBoxPlot I did that just by using the control panel to make the first plot Ĥ) Use the fAppendBoxPlot function with the starting plot as the top graph.

I renamed the function fAppendBoxPlot and changed "Display" to "AppendToGraph" somewhere around the middle of the function.Ģ) I made a second independent box plot, being careful to use a different name for the result waves. I don't think it will be easy to do it any other way.ġ) I copied the code for the fBoxPlot function to the main procedure window. Here's what I did:Ġ) I used a text wave as the X wave so that the box plot is a category plot. I was able, with a great deal of effort, to append a new box plot to one I had already made.

Making the whole, complicated thing accommodate that would be pretty complicated. Unfortunately, that routine wasn't designed with multiple box plots in a single graph in mind.
