MATLAB: Is the plot not showing anything

figuregraphMATLABplot

I typed in the following into my MATLAB command window:
>> figure
>> hold on
>> axis([-5, 5, -5, 5])
>> plot(3,4)
However, nothing shows up in my graph. How can I fix this?

Best Answer

Try this:
figure
hold on
axis([-5, 5, -5, 5])
plot(3,4,'pg')
The default plot behaviour is to plot a line between successive points. When you give it only one point, it plots nothing unless you tell it to plot a marker, as I do here.
Related Question