MATLAB Answers

Bars showing the measurement periods for oceanography data

1 view (last 30 days)
Hi Does anyone have code for plotting bar to show measurements periods as the same as pictures which I attached? Thank you in advance.

  0 Comments

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 2 Dec 2017
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.

More Answers (0)

Sign in to answer this question.


Translated by