How to position the y axis on the right in a plot
조회 수: 19 (최근 30일)
이전 댓글 표시
I have two vectors f(t) and g(t) and I want to plot them in one graph using plotyy. But I also want to do some other things like changing the marker style of each curve and also changing the span of the axes. I have tried using xlim but it only affects one of the x axes, not both.
댓글 수: 0
채택된 답변
Ingrid
2016년 1월 28일
you need to use the handles for this so
[hAx,hLine1,hLine2] = plotyy(x,y1,x,y2);
xlim(hAx(1),...)
xlim(hAx(2),...)
this is also very well explained in the documentation of plotyy
doc plotyy
댓글 수: 4
Ingrid
2016년 1월 29일
set(hLine1,'LineStyle','none')
this is clearly explained in the documentation of plot
추가 답변 (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!