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 CenterFile Exchange에서 Bar Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by