how to set y-axis as log scale?

Illustration
bedipi4838 - 2025-06-24T15:52:17+00:00
Question: how to set y-axis as log scale?

How to set only Y-axis to log scale in MATLAB plot?

Expert Answer

Profile picture of John Williams John Williams answered . 2025-11-20

The best way to create that type of axes is to use the semilogy function. Alternatively, you can set the ‘YScale’ property on the axes:
 
set(gca, 'YScale', 'log')
 
As of R2023b, you can also use the 'yscale ' function. 


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!