Creating a waterfall plot

16 visualizaciones (últimos 30 días)
Jared
Jared el 19 de Feb. de 2013
Comentada: Veronica yep el 27 de Jun. de 2017
I have data in a 2d plot, but I want to display it as a "waterfall" with the first value x(0),y(0) at the top, and x(i),y(i) at the bottom. You can visualize just flipping the plot over the x axis. This can be simply done by inverting the y data, but then on the plot, I have negative y values when in reality, they are positive. Is there any way to "flip" the plot?
  1 comentario
Veronica yep
Veronica yep el 27 de Jun. de 2017
can you post the code for creating this 2d waterfall please? if you still have it

Iniciar sesión para comentar.

Respuesta aceptada

Sean de Wolski
Sean de Wolski el 19 de Feb. de 2013
flipud() or fliplr() ?
doc fliplr
doc flipud
  3 comentarios
Sean de Wolski
Sean de Wolski el 19 de Feb. de 2013
What about just changing the 'XDir' of the axes to 'reverse' so that it's flipped?
plot(whatever);
set(gca,'XDir','reverse');
Jared
Jared el 19 de Feb. de 2013
Perfect! Thanks

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by