Y-Axis location in MATLAB plots

I've seen plots with y-axis at the center of the plot rather than to the left. How do I do this in MATLAB?

2 comentarios

Paulo Silva
Paulo Silva el 27 de En. de 2011
Please be more specific, you could be talking about using suplots or adjusting the axis so y is at center or something else.
henry wang
henry wang el 27 de En. de 2011
I'm just talking about simple plot function like plot(something). How to adjust the axis so y axis shows at the center.

Iniciar sesión para comentar.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 27 de En. de 2011

1 voto

PlotAxisAtOrigin Matlab File Exchange contribution

Más respuestas (2)

Oleg Komarov
Oleg Komarov el 27 de En. de 2011

1 voto

Or another submission axescenter by Matt Fig:

Wenxuan Liang
Wenxuan Liang el 10 de Mzo. de 2021

1 voto

Just use set(gca, 'YAxisLocation', 'origin') if you are using a MATLAB newer than 2018, I think

Categorías

Más información sobre Line Plots en Centro de ayuda y File Exchange.

Preguntada:

el 27 de En. de 2011

Respondida:

el 10 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by