Colormaps and Visibility
The default colormap that Matlab uses is called ‘hsv’. This colormap cycles all the way around from red to red, so both lows and highs will look red. This is often not very useful in engineering applications. You can switch to a colormap that goes from blue to red with
If you type “help hsv”, the see also list includes the other predefined colormaps.
text(x,y,’Some Text Here’)
lets you place arbitrary text at some position on your graph. You give it x and y values (using the axes on your current plot), and you can put text at that location.
gtext(‘Some Text Here’)
lets you place text using the mouse button.
Another useful mouse command is “ginput”. If you type
[xclick yclick] = ginput
you can click any number of points in your graph, and hit return in the graph window when you are done. It will save the x and y coordinates of the points you have clicked in the vectors xclick and yclick. This is especially useful if you have something like a plot of a decaying sine wave, and you want to know about the exponential decay of the peaks instead of worrying about the whole sinusoidal part. You can just click on each peak with the mouse in ginput, and then analyze the exponential decay of those points with a curvefit or something similar.