How to draw (semi-)logarithmic 3d plots? (Matlab)

12,521

Solution 1

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.

Solution 2

As stated in the mentioned link, to set all three axes to logarithmic scaling, use

set(gca, 'XScale', 'log', 'YScale', 'log', 'ZScale', 'log')
Share:
12,521
Jader Dias
Author by

Jader Dias

Perl, Javascript, C#, Go, Matlab and Python Developer

Updated on June 20, 2022

Comments

  • Jader Dias
    Jader Dias almost 2 years

    I know semilogx and semilogy for 2D plots. There is any equivalent for SURF and MESH?

  • Jader Dias
    Jader Dias over 15 years
    Thanks, now I have the same problem as the guy that asked the question you linked: the color now is pretty much the same, how to correct it? You can answer here: stackoverflow.com/questions/433769/…
  • knk
    knk over 15 years
    I missed that problem. I have placed some hints on my other question but can't test right now. If I find time I will play around with Matlab to see if I can get something to work.