Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Continuous Plot and Semilogx on the same figure

Asked by Kenan on 16 Jan 2013

Hello all,

I am trying to plot on the same figure the evolution of a function f, with argument x in ]0,1]. I would like to see both the evolution of f far away from 0 and close to 0, on the same figure, with one x axis.

For now I only have two different figures, one using plot with x=[0.1 ... 1], and one using semilogx with x=[1e-9 1e-7 1e-5... 0.1]. I would like to have both graphs on the same figure, with the x axis being logarithmic at the beginning, then linear after a certain x0 (let's say x0=0.1).

I do not want something using plotxx since I want only one x axis.

Do you know if this is possible?

Thank you for your time and help.

0 Comments

Kenan

Products

1 Answer

Answer by Walter Roberson on 17 Jan 2013

You could probably make the plot look okay by doing a data transform and fooling with the xtick positions and xtick labels, but if you want zooming or the data cursor to work, you would have to write custom functions to handle those.

3 Comments

Kenan on 18 Jan 2013

Unfortunately this is not enough for what I want to do with it. I want the figure to behave normally. Thanks though!

Walter Roberson on 18 Jan 2013

What would "behave normally" mean in the context of an abnormal axis setup?

Kenan on 18 Jan 2013

I mean it's the second option of what you propose ("if you want zooming or the data cursor to work, you would have to write custom functions to handle those"), but I don't know how to do it. Hence my question in the first place.

Walter Roberson

Contact us