2
$\begingroup$

When I plot a list (20 points) using ListPlot, the plot always begins at 1 and not 30 as my PlotRange indicates.

ListPlot[data5, AxesOrigin -> {30, 0},PlotRange -> {{30, 50}, {-2 Pi, 2 Pi}}]
$\endgroup$

closed as off-topic by Mike Honeychurch, user9660, MarcoB, bbgodfrey, m_goldberg Nov 21 '15 at 14:17

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Mike Honeychurch, Community, MarcoB, bbgodfrey, m_goldberg
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 5
    $\begingroup$ Look up DataRange. $\endgroup$ – J. M. is away Nov 20 '15 at 15:54
  • $\begingroup$ Note the difference in the spacing (along the x axis) in my two different possible answers. Your question isn't unambiguous in that regard. $\endgroup$ – Karsten 7. Nov 20 '15 at 16:13
2
$\begingroup$
ListPlot[RandomReal[{-6, 6}, 20], AxesOrigin -> {30, 0}, 
 PlotRange -> {-2 Pi, 2 Pi}, DataRange -> {30, 50}]

enter image description here

Or

ListPlot[Transpose[{Range[30, 49], RandomReal[{-6, 6}, 20]}], 
 AxesOrigin -> {30, 0}, PlotRange -> {{30, 50}, {-2 Pi, 2 Pi}}]

enter image description here

$\endgroup$

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