필터 지우기
필터 지우기

How can I add summary statistics on a plot?

조회 수: 6 (최근 30일)
Tunechi
Tunechi 2014년 10월 6일
댓글: the cyclist 2014년 10월 6일
How can I add summary statistics on a plot? I have n plots and also I have separetly result of nash sutcliffe NSE and Mean Bias Error (MBE) matrix table (n*2). What I want to do is to put NSE and MBE reuslts on each plot outside the plot box.
figure(i)
legend
hold on
Qmax=1.2*(max(max(Q)));
s=length(Q);
plot(Q(w:end,1),'k','LineWidth',2.25);plot(Q(w:end,2),'b','LineWidth',2.25);
axis([1 s 0 Qmax])
legend(['Qobs', num2str(i)],['Qsim', num2str(i)],-1);
xlabel('time [days]')
ylabel('daily discharge [m^3/s]')
title([stations(i,3),stations(i,1)]);
text(s,Qmax,['NSE = ',num2str(NSE(i))])
text(s,Qmax,['MBE = ',num2str(MBE(i))])
  댓글 수: 1
the cyclist
the cyclist 2014년 10월 6일
Please provide more detail on what you mean, but I made a quick guess in my answer below.

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

채택된 답변

the cyclist
the cyclist 2014년 10월 6일
x = 1:10;
y = 1:10;
figure
plot(x,y)
text(2,7,['mean(y) = ',num2str(mean(y))])
  댓글 수: 2
Tunechi
Tunechi 2014년 10월 6일
편집: Tunechi 2014년 10월 6일
How can I add summary statistics on a plot? I have n plots and also I have separetly result of nash sutcliffe NSE and Mean Bias Error (MBE) matrix table. What I want to do is to put NSE and MBE reuslts on each plot outside the plot box.
figure(i)
legend
hold on
Qmax=1.2*(max(max(Q)));
s=length(Q);
plot(Q(w:end,1),'k','LineWidth',2.25);plot(Q(w:end,2),'b','LineWidth',2.25);
axis([1 s 0 Qmax])
legend(['Qobs', num2str(i)],['Qsim', num2str(i)],-1);
xlabel('time [days]')
ylabel('daily discharge [m^3/s]')
title([stations(i,3),stations(i,1)]);
text(s,Qmax,['NSE = ',num2str(NSE(i))])
text(s,Qmax,['MBE = ',num2str(MBE(i))])
the cyclist
the cyclist 2014년 10월 6일
I think the annotation command might be what you want. Take a look at the documentation.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by