How can I change the slopes of stairs plot?

5 visualizaciones (últimos 30 días)
Arduino Arduini
Arduino Arduini el 10 de Oct. de 2016
Editada: Marco Tullio el 10 de Oct. de 2016
The sequence of strokes is: horizontal, vertical _|. How to change it: vertical, horizontal |-?

Respuesta aceptada

Marco Tullio
Marco Tullio el 10 de Oct. de 2016
Editada: Marco Tullio el 10 de Oct. de 2016
Try
x = [1 2 3]
y = [5 6 7]
stairs(x,y,'-.o')
axis([0 11 0 11])
% repeat 1st x
% shift up the y
nx = [x(1) x]
ny = [y(1) y(2:end) y(end)]
hold on
stairs(nx,ny,'-x')

Más respuestas (0)

Categorías

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