1
$\begingroup$

I am sure that this is a standard question, but I have not been able to find it, either by a google search or by searching here on the Mathematica StackExchange.

If I have a list plot defined by:

GraphicsGrid[{{ListPlot[AmplitudeData, Joined -> True, PlotRange -> All], 
               ListPlot[RealData, Joined -> True, PlotRange -> All]}}]

Which gives the following output:

List Plots

And I wish to transform the axes so that the peak is at $0$, i.e. so the axis values are transformed by $-250$. How can I do this?

$\endgroup$
4
$\begingroup$

I believe you want DataRange:

dat = Table[PDF[BinomialDistribution[50, 0.5], k], {k, 0, 50}];

ListPlot[dat]

enter image description here

ListPlot[dat, DataRange -> {-25, 25}]

enter image description here

$\endgroup$
  • $\begingroup$ Yes, thank you - That does exactly what I wanted it to! $\endgroup$ – Thomas Russell May 14 '15 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.