Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: Controlling the scale of x-axis in ListPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119363] Re: Controlling the scale of x-axis in ListPlot
  • From: "daniel.andersson at bwinparty.com" <daniel.andersson at bwinparty.com>
  • Date: Wed, 1 Jun 2011 04:30:43 -0400 (EDT)

Works like a charm! Thanks a lot!

/Daniel Andersson

-----Original Message-----
From: Bob Hanlon [mailto:hanlonr at cox.net] 
Sent: den 31 maj 2011 13:48
To: mathgroup at smc.vnet.net; Daniel Andersson
Subject: [mg119363] Re: [mg119349] Controlling the scale of x-axis in ListPlot


yVal = {7, 1, 5, 4};

xVal = {1, 2, 10, 70};

ListPlot[yVal,
 Ticks -> {
   Thread[{Range[Length[xVal]], xVal}],
   Automatic
   }]


Bob Hanlon

---- "daniel.andersson at bwinparty.com" <daniel.andersson at bwinparty.com> wrote: 

=============
Hi,

I need to plot two a vector {y_1,...,y_n} against a vector {x_1,...,x_n} and I want to the latter to be distributed with equal distances between the elements. Mathematica automatically scales the x-axis so that it is linear with respect to the x-values, i.e. if x={1,2,10}, then the distance between the second and third element will be eight times longer than the distance between the second and first element. I would like the distances to be of equal length.

Any ideas?

Cheers,
Daniel


  • Prev by Date: Re: FixedPoint[Cos, 1.0]
  • Next by Date: Re: FixedPoint[Cos, 1.0]
  • Previous by thread: Re: Controlling the scale of x-axis in ListPlot
  • Next by thread: Re: Controlling the scale of x-axis in ListPlot