Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

BoxWhiskerChart and a Vertical Line on same graph

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124425] BoxWhiskerChart and a Vertical Line on same graph
  • From: Don <donabc at comcast.net>
  • Date: Thu, 19 Jan 2012 05:11:41 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Here is a BoxWhisker graph, which is only a slight variation on one of the 
examples for BoxWhisker graphs in the documentation.

data=Table[RandomVariate[NormalDistribution[RandomInteger[5],1],100],{2},{2}];

grBox1 = BoxWhiskerChart[data, ChartLegends->{"a","b"},AxesLabel->{"Quintile", "Price"},
 Frame->False,  Axes->True, AxesOrigin->{0,0}
]

I would like to superimpose a vertical line on the graph between
the first and second PAIR of boxes (i.e. between the 
first two and the second two).

My attempt to do this is the following:

xv = 10;
graphicLine = Graphics[Line[{{xv,0},{xv,8}}]] ;
Show[grBox1,graphicLine] 

but this  produces no graph and an error message
in the pink window which says:

"Labeled is not a Graphics primitive or directive"

But, I am not using anything in the code above which
is called "Labeled".

Is there a way to superimpose this line on the BoxWhisker Chart?

Thank you in advance.

Don



  • Prev by Date: missing Tooltip for ArrayPlot etc. - workaround
  • Next by Date: KenKen Helper as a Mathematica CDF
  • Previous by thread: missing Tooltip for ArrayPlot etc. - workaround
  • Next by thread: Re: BoxWhiskerChart and a Vertical Line on same graph