Bars showing the measurement periods for oceanography data

2 ビュー (過去 30 日間)
Mina Masoud
Mina Masoud 2017 年 12 月 2 日
コメント済み: Star Strider 2017 年 12 月 3 日
Hi Does anyone have code for plotting bar to show measurements periods as the same as pictures which I attached? Thank you in advance.

採用された回答

Star Strider
Star Strider 2017 年 12 月 2 日
I do not know what your data are.
This works:
XData = sort(randi(9, 10, 2),2); % Create Data
YData = bsxfun(@times,ones(size(XData)),(1:size(XData,1))'); % Create Data
figure(1)
plot(XData', YData', 'LineWidth',2) % Note Transposed Matrices
axis([0 10 0 size(XData,1)+1])
Experiment with my code and your data to get the results you want.
  2 件のコメント
Mina Masoud
Mina Masoud 2017 年 12 月 3 日
Thank you so much It's so helpful.
Star Strider
Star Strider 2017 年 12 月 3 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by