Re: bar chart ticks not placed well?
- To: mathgroup at smc.vnet.net
- Subject: [mg106113] Re: bar chart ticks not placed well?
- From: dh <dh at metrohm.com>
- Date: Fri, 1 Jan 2010 05:39:14 -0500 (EST)
- References: <hhhmq0$ocu$1@smc.vnet.net>
Hi,
Ticks can not be used with BarChart because they refer to coordinates
of the whoe Plot not to bars.
Here is a workaround where we put corresponding labels below the bars:
s = Sum[Binomial[100, k], {k, 0, 100}];
slist = Table[Binomial[100, k], {k, 0, 100}];
labellist = Table[k, {k, 0, 100, 25}];
i = 0;
BarChart[N[slist/s],
LabelingFunction -> (If[Mod[++i, 25] == 0, Placed[i, Below], ""] &)]
Daniel
On 31 Dez. 2009, 09:19, rs_poetic <schantz-pla... at cox.net> wrote:
> Hello,
> in this simple bar chart, there are 101 bars (some of them very small
> and including 0 and 100). The x axis labels appear to be shifted a bit
> to the left. The apparent misplacement is enough to be noticed and to
> confuse the reader. Am I using the wrong command, or....?
>
> s = Sum[Binomial[100, k], {k, 0, 100}];
> slist = Table[Binomial[100, k], {k, 0, 100}];
> labellist = Table[k, {k, 0, 100, 25}];
> BarChart[N[slist/s], Ticks -> {labellist, Automatic}]