Re: BarChart Question
- To: mathgroup at smc.vnet.net
- Subject: [mg24987] Re: BarChart Question
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Fri, 1 Sep 2000 01:09:23 -0400 (EDT)
- References: <8odn77$ha@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Steve,
<<Graphics`Graphics`
I have taken the following from the Help Browser and added Ticks-> ....
It seems that the BarLabels are not shown when the ticks are specified.
You might also like to look at the function GeneralizedBarChart in the same
package.
BarChart[{1, 3, 4, 5, 3.5, 3}, {3, 2, 5, 3},
BarSpacing -> -.3, BarGroupSpacing -> .5,
BarStyle -> {GrayLevel[.6], Hue[0]},
BarEdgeStyle ->
{{Dashing[{.01}],Hue[0]},GrayLevel[0]},
BarLabels ->
{"Apr","May","Jun","Jul","Aug","Sep"},
PlotLabel -> "Projected and Current Profit,
Tourist Season",
DefaultFont -> {"Helvetica", 9},
Ticks -> {{{2,"Two"},{3,"Three"}},{{3,"Three"},{4,"Four"}}}
]
--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565
<com3 at ix.netcom*NOSPAM*.com> wrote in message news:8odn77$ha at smc.vnet.net...
> Hello,
>
> I'm hoping someone can show a new/infrequent user of ver 3.0 what he's
> doing wrong and provide a simple solution to my problem.
>
> I'm trying to produce a bar chart with readable x axis tick labels. My
> code is below. Since my xvalues have a maximum value of 1.0, this
> should also be the maximum value of the x axis tick label. The y axis
> labelling seems to be working fine.
>
> If BarChart can't do this, can ListPlot or any of the other built-in
> plot types ?
>
> xvalues=Range[0,1,.01];
> yvalues=2*xvalues;
> ticklabels=Range[0,1,.1];
> plot1=BarChart[Transpose[{yvalues,xvalues}],Ticks->{ticklabels,Automatic}]
>
> Thanks in advance
> Steve
> For any e-mail responses, please remove *NOSPAM* from my address.
>