Borrar filtros
Borrar filtros

How to show negative y-limits on a graph using property inspector

14 visualizaciones (últimos 30 días)
I want to fix my axis on my graph using the property inspector but I don’t know how to. I want to show the negative limits of my graph so the bars on the chart are longer. Any ideas? (I am a mac user)
  1 comentario
Samantha Kimble
Samantha Kimble el 17 de Sept. de 2020
Hello thanks for the help! I used the rulers and changed the limits from there, however when I have a negative limit, my graph leaves everything below 0 blank. I would like to show the negative side of the graph as well but I’m not sure how.

Iniciar sesión para comentar.

Respuestas (1)

Vinicius Pereira Mateus Borges
Vinicius Pereira Mateus Borges el 17 de Sept. de 2020
Hello, this can be done in the 'Rulers' section of the property inspector.
Just a note of caution: It is a bad idea to change anything in your graph manually like this. It will create more work in the future for you (if you need to plot it again with different parameters) or for people who use your code.
Better is to use the get and set functions.
set(gca,'ylim',[-300 300]) % or whichever negative values you need
  2 comentarios
Samantha Kimble
Samantha Kimble el 17 de Sept. de 2020
Hello thanks for the help! I used the rulers and changed the limits from there, however when I have a negative limit, my graph leaves everything below 0 blank. I would like to show the negative side of the graph as well but I’m not sure how
Vinicius Pereira Mateus Borges
Vinicius Pereira Mateus Borges el 17 de Sept. de 2020
I think you need to give an example of your data so I can see what you mean.

Iniciar sesión para comentar.

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by