how to plot a table data of size 2x47 ?

조회 수: 2 (최근 30일)
bushra raza
bushra raza 2019년 2월 9일
댓글: bushra raza 2019년 2월 9일
Hi,
i have a table of size 2x47(attached here for advice).
each column is representing years, and two rows have data of two months. i want to plot /bar each month data year wise . i.e. years on x axis, and month data on y axis, with separate colors, so as to identify each month's trend.
i am using Matlab R2017b. Can any one please guide me?

채택된 답변

Image Analyst
Image Analyst 2019년 2월 9일
Try this:
s = load('T_may_june.mat')
T_may_june = s.T_may_june
x = 1971:2017;
may = T_may_june{1,:};
june = T_may_june{2, :};
plot(x, may, 'r*-', 'LineWidth', 2);
hold on;
plot(x, june, 'bs-', 'LineWidth', 2);
grid on;
legend('May', 'June', 'Location', 'northwest');
0000 Screenshot.png
  댓글 수: 1
bushra raza
bushra raza 2019년 2월 9일
thanks alot sir, for timely help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by