How can I change the slopes of stairs plot?

5 ビュー (過去 30 日間)
Arduino Arduini
Arduino Arduini 2016 年 10 月 10 日
編集済み: Marco Tullio 2016 年 10 月 10 日
The sequence of strokes is: horizontal, vertical _|. How to change it: vertical, horizontal |-?

採用された回答

Marco Tullio
Marco Tullio 2016 年 10 月 10 日
編集済み: Marco Tullio 2016 年 10 月 10 日
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')

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by