Borrar filtros
Borrar filtros

Need to line up two graphs on same plot

2 visualizaciones (últimos 30 días)
Benson
Benson el 11 de Jul. de 2013
I am using
[AX,H1,H2] = plotyy(time,Y1,time,Y2);
The x-axis(time) are the same for both. The green and blue graphs in the image both end at the same point, but notice how the green graph starts earlier. I want to line both graphs up so that they have the same starting and ending points. For some of the other graphs I've made, it's done by default. I'm not sure what is different with this set of data...
Any help is appreciated. Thanks! :)

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 11 de Jul. de 2013
Maybe your data contains Nan values?
  6 comentarios
Benson
Benson el 11 de Jul. de 2013
Editada: Azzi Abdelmalek el 11 de Jul. de 2013
Interesting, the axes are lined up the way I want it to be.
Benson
Benson el 11 de Jul. de 2013
Editada: Benson el 11 de Jul. de 2013
So by trial and error, I found that this line is causing the shift. axis([13 21-Inf Inf]);

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Directed Graphs 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