MATLAB: Don’t I see the graph? [No Graph visible in figure window without ‘+’ or ‘.’ argument]

invisible graphinvisible plotline stylelinespecmarkerno graphplotplot3

The file that is attached is an attempt on simulating a swing-by. However all I get at the end is an empty figure window.
Funnily enough I am able to see the graphs when I add a marker like '+' or '.' to my plot, so they get simulated at least. Leaving the LineSpec out of the plot or adding a Line-Style like '-' or '–' will result in an invisible graph.
It seems to run on the computer of my teacher but not on my macbook pro nor on my desktop pc. He is using a very old version of Matlab and I am currently on R2015b.
EDIT: I changed the description of my problem slightly.

Best Answer

When you're calling plot, you're passing in a single data point.
The linespecs '.', '+', etc. are setting the property Marker. That means that they're controlling what symbol gets drawn at each data point.
The linespecs line '-', ':', etc. are setting the property LineStyle. That means that they're controlling how lines get drawn which connect adjacent data points. Since you only have one data point, this is rather problematic in your case. If you want to draw lines connecting the points, then you really need to save the previous data point and pass two into your call to plot.
You can learn more about linespecs on this page of the documentation.
You might also want to learn about the new animatedline function, which is designed to do exactly the type of thing that you're doing here. However it was introduced in R2014b, so it won't work in that older version.
Related Question