How to plot three different things with different y-directions in current plot?
이전 댓글 표시
Dear all I am trying to plot three different kinds in one axis of the plot. However, one of the graph has different Ylimit. I would like to have similar plots in excel. In this regard I am not talking about subplot. Below is the code , I developed.
clean
dirOut = 'Graphics\Scatters';
mkdir(dirOut);
prgm = 131;Nyears=60; decile=10;
expr = ['dy = fm_model_' int2str(prgm) '(p, ndata);']; % model to use
Paramlabel = parameters(prgm);
numparam = length(Paramlabel);
ndays = 5;
parray = zeros(Nyears, numparam);
decilevec = zeros(Nyears, 2);
m = 1;
for data_choice=1:Nyears
[dirGraph, RName, Filein, DiaryFile, param_file] = drawer(data_choice,...
prgm);
data = getdata( Filein ); data=data(:);
ndata = length(data);
[p itn] = getparam(param_file, 4, m);
[Dpy, DLy ] = percentile(data,decile);
decilevec(data_choice,1) = DLy;
eval(expr);
dy = stat_moving(dy,ndays);
[Ppy, PLy ] = percentile(dy,decile);
parray(data_choice,:) = p;
decilevec(data_choice,2) = PLy;
end
hold on
h1 = plot(decilevec(:,1), 'k');
h2 = plot(decilevec(:,2), 'r');
h3 = plot(parray(:,2), 'b');
set(h3, 'YDir', 'reverse');
hold off;
While running I got error like this. Error using graph2d.lineseries/set The name 'YDir' is not an accessible property for an instance of class 'lineseries'.
It will be great if anyone knows how to solve this problem. Sooner response will be appreciative and cooperative, Thanks in advance.
Sincerely Mahesh
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!