Message Boards Message Boards

What is the x-axis in this graph?

Posted 5 years ago
POSTED BY: Hans Isbrücker
4 Replies

Totally missed it :O

POSTED BY: Hans Isbrücker

It's there! :)

enter image description here

POSTED BY: l van Veen

Thank you for your response. I have tested it by reversing the list and it does seem the case. Earlier I had sorted the list and didn't note the differences so I thought I had ruled it out.

moons reversed plotted

It would be nice if this behaviour was clear from the documentation though.

POSTED BY: Hans Isbrücker

Hello Hans, in the absence of any other information, functions like ListPlot[] use the index of the list as the x-axis. Ganymede is the 11th element in the list 'moons', and so appears at x=11.

In[2] := Length[moons]
Out[2] = 182

And this is why the x-axis goes up to 182.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract