Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: barchart
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Alexei Boulbitch

Posts: 483
Registered: 2/28/08
barchart
Posted: Feb 18, 2013 6:00 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Dear Group:

I have not managed to combine BarChart with a line.

The simple problem is the following. I have a labeled BarChart (that is, I
use the ChartLegends options) , and I want to draw a horizontal line, to highlight the separation say between units below and above 10. But I do not see how can this be done within BarChart, and I haven't been able to combine BarChart with the line using Show or Graphics.

Can somebody help me?

Francisco


Hi, Francisco,

It was not quite clear to me what is it, that you wish to achieve. If you mean that the line should cross
The bar chart itself, try this:

bch = BarChart[Range[8], ChartStyle -> "DarkRainbow",
ChartLegends -> {"1", "2", "3", "4", "5", "6", "7", "8"}];
Show[{
bch,

Graphics[{Line[{{0, 5}, {10, 5}}]}]

If you need that one of the legend items would be highlighted, try this:

BarChart[Range[8], ChartStyle -> "DarkRainbow",
ChartLegends -> {"1", "2", "3", "4",
Row[{"5",
Graphics[{Arrowheads[1], Arrow[{{1, 1}, {0., 1}}]},
ImageSize -> {20, 40}]}], "6", "7", "8"}]

Have fun, Alexei


Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone : +352-2454-2566
Office fax: +352-2454-3566
mobile phone: +49 151 52 40 66 44

e-mail: alexei.boulbitch@iee.lu







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.