Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2854 > unrolled thread

Re: Controlling the scale of x-axis in ListPlot

Started byHeike Gramberg <heike.gramberg@gmail.com>
First post2011-06-01 08:32 +0000
Last post2011-06-01 08:32 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Controlling the scale of x-axis in ListPlot Heike Gramberg <heike.gramberg@gmail.com> - 2011-06-01 08:32 +0000

#2854 — Re: Controlling the scale of x-axis in ListPlot

FromHeike Gramberg <heike.gramberg@gmail.com>
Date2011-06-01 08:32 +0000
SubjectRe: Controlling the scale of x-axis in ListPlot
Message-ID<is4te2$b1t$1@smc.vnet.net>
Not sure if this is what you mean, but suppose xvector={x_1,...,x_n} and yvector={y_1,...,y_n} 
then you could do something like

ListPlot[yvector, Ticks -> {Transpose[{Range[Length[xvector]], xvector}], Automatic}]

Heike.

On 31 May 2011, at 12:48, daniel.andersson@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

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web