I know semilogx and semilogy for 2D plots. There is any equivalent for SURF and MESH?
plot3( X , Y , Z ) plots coordinates in 3-D space. To plot a set of coordinates connected by line segments, specify X , Y , and Z as vectors of the same length. To plot multiple sets of coordinates on the same set of axes, specify at least one of X , Y , or Z as a matrix and the others as vectors.
semilogx( X , Y ) plots x- and y-coordinates using a base-10 logarithmic scale on the x-axis and a linear scale on the y-axis. To plot a set of coordinates connected by line segments, specify X and Y as vectors of the same length.
If you want to plot something in semi-log graph, first of all, you need to convert the decimal numbers into log scale. Suppose you are plotting frequency from 100 Hz to 10,000 Hz. Now you need to convert these frequency into log scale like this. Now instead of plotting 100 Hz to 10,000 Hz, plot simply log scale.
Create a vector of x-coordinates and two vectors of y-coordinates. Plot two lines by passing comma-separated x-y pairs to loglog . Alternatively, you can create the same plot with one x-y pair by specifying y as a matrix: loglog(x,[y1;y2]) .
As stated in the mentioned link, to set all three axes to logarithmic scaling, use
set(gca, 'XScale', 'log', 'YScale', 'log', 'ZScale', 'log')
Have you looked at the XScale, YScale and Zscale axis properties. You can set them to either linear or log. However, to set these properties to log the data needs to be positive. See http://www.mathworks.com/matlabcentral/newsreader/view_thread/239232 for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With