Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: BarChart Question

  • To: mathgroup at
  • Subject: [mg24994] Re: [mg24980] BarChart Question
  • From: BobHanlon at
  • Date: Fri, 1 Sep 2000 01:09:28 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

In a message dated 8/28/2000 8:38:11 AM, com3 at ix.netcom*NOSPAM*.com writes:

>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, .05];

yvalues = 2*xvalues;

ticklabels = Range[0, 1, .1];

plot1 = BarChart[Transpose[{yvalues, xvalues}], 
      Ticks -> {Transpose[{(Length[xvalues] - 
                    1)*(ticklabels + (xvalues[[2]] - xvalues[[1]])), 
              ticklabels}], Automatic}, ImageSize -> {500, 310}];

plot2 = GeneralizedBarChart[
      Transpose[{xvalues, yvalues, 
          Table[xvalues[[2]] - xvalues[[1]], {Length[xvalues]}]}], 
      ImageSize -> {500, 310}];

Bob Hanlon

  • Prev by Date: Re: Problems with Exporting Greek letters in graphics to .eps files
  • Next by Date: Re: Functional or rule-based ...
  • Previous by thread: Re: Problems with Exporting Greek letters in graphics to .eps files
  • Next by thread: Re: BarChart Question