How to make a semilog plot within a semilog plot in MATLAB?

3.5k views Asked by At

Is it possible to create a semilog plot (semilogx, semilogy, loglog) within a semilog plot? I need to have a zoom-in plot. Most solutions I found only solve for linear scale but not log scale.

1

There are 1 answers

0
bla On

Try using axes, for example:

x = linspace(0,1);
figure(1)

% plot on large axes
semilogy(x,1./x)

% create smaller axes in top right, and plot on it
axes('Position',[.55 .55 .33 .33])
box on
loglog(x,exp(x))

enter image description here