Monday, April 25, 2011

Four simple MatLab words

Everyone should know these, because they make 3D plots much easier to read.

Axes on
Grid on

Axes on...as you may have guessed...turns on the axes.
Grid on... turns on a grid. You can specify interval.

So for example, you can say

Figure(1)
plot3(data1,data2,data3, 'k.')
axes on
grid on

the 'k.' will make your plot default to black dots. If you type "help plot" in command window you can see all kinds of various combining strategies for this input.I like to think of it as Matlab's much simpler correlate to the "pch =" command from R.

No comments:

Post a Comment