How to show 1e-10 in plot? my y axis range is 1e-10 to 0.1.

24 visualizaciones (últimos 30 días)
Hongjin Wang
Hongjin Wang el 8 de Mzo. de 2021
Respondida: Alan Stevens el 8 de Mzo. de 2021
I want to create a plot like below:
I try code blow:, but it doesn't work
y =[0.5, 0.1, 1e-2, 1e-3, 1e-4, 1e-5, 1e-6]
x = [0, 5, 5*2, 5*3, 5*4, 5*5, 5*6]
plot(x, y, 'rx', 'MarkerSize', 10); % Plot the data
ylim([1e-15,1])
ylabel('variance'); % Set the y−axis label
xlabel('iteration');
the plot like this:

Respuestas (1)

Alan Stevens
Alan Stevens el 8 de Mzo. de 2021
doc semilogy

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by