plotyy set random paired linestyles
조회 수: 2 (최근 30일)
이전 댓글 표시
I have two sets of data to plot on plotyy.
When I plot d1 & d2, I want d1(:,1) to have the same colour and linestyle as d2(:,1). I want further matching columns in d1 & d2 (i.e. d1(:,x),d2(:,x)) to have the same properties as each other, but different to other columns.
In other cases I have done this using a loop:
mrk={'o','s','*','v','+','^'} %These are the markers I want to use
for n=1:6
hold all
set(gca(),'linestyle',mrk(n))
plot(d1(:,n))
end
I could plot d2 at the end of the loop, but then I don't know how to customise the axes to make a plot become a plotyy.
What I would like to do is something like this (which doesn't work)
mrk={'o','s','*','v','+','^'}
set(gca(),'linestyleorder',mrk)
[ax,h1,h2] = plotyy(2010:2050,d1,2010:2050,d2)
Alternatively I have tried to set the linestyles using the handles, which also I cannot do... i.e.:
set(h1(n),'linestyle',mrk(n))
Unfortunately, as you can see I still have a poor understanding of all the properties,and where one can or cannot be used.
I have managed this with colours, but not markers/linestyles by using
set(gca,'colororder',mycolororder);
Thanks!
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Two y-axis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!