MATLAB 2019b Update 1 Function semilog doesn't work on macOS Catalina

When i am trying to plot semilog figures, the semilog* function works as no difference with the normal plot function.
My system is macOS Catalina, MATLAB version is 2019b update 1.

 Réponse acceptée

It could be that your data values are not much different, so semilogx or semilogy may not seem different.
To test that hypothesis, try this and see if there is a difference between the figures:
x = linspace( 1, 10,10);
y = logspace(-2, 2, 10);
figure
plot(x, y)
grid
figure
semilogy(x, y)
grid
Experiment to get the result you want.

12 commentaires

I am sure my data is different in plot and semilogy or semilogx. The problem is semilog* works fine in command window, but it's not working in a script. I think it is a bug.
There should be no difference.
Run my code ina script and in the Command Window. It should produce the same result.
Not working on my system.
Use the telephone handset icon in the upper right corner of this page and use the Contact Us link to submit a bug report.
Include the URL of this thread.
Is the script that it is not working in, LiveScript ?
No, it's normal script. I figured it out more specific, using the script given by Star Strider before, with a slghtly change:
x = linspace( 1, 10,10);
y = logspace(-2, 2, 10);
figure
plot(x, y)
hold on
semilogy(x, y)
grid
This only gives me one curve, it seems I can't plot these two curves together.
I think I got it, is it because they have different axis properties, so I can't plot them together.
Out of curiosity, what happens if you reverse the order, doing the semilogy first?
Yea, give semilogy without plot(x,y)
You used the hold function, but did not mention that before. In the code I suggested that you use to test for this problem, each plot was to a new axes and a new figure.
Note that the axis properties of the first call to a plot function when using hold govern the subsequent plots to those axes.
If my Answer helped you solve your problem, please Accept it!
As always, my pleasure!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Centre d'aide et File Exchange

Produits

Version

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by