![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/180530/image.png)
Why do I get markers on the second axis and how do I stop them?
조회 수: 2 (최근 30일)
이전 댓글 표시
Here is the simple code but I get different markers on the second axis? Thanks Harry Smith
hold on
yyaxis left
plot(bestScores,'b','LineWidth',2,'color','b');
yyaxis right
plot(bestPercent,'b','LineWidth',2,'color','r');
댓글 수: 0
채택된 답변
ANKUR KUMAR
2018년 1월 1일
편집: ANKUR KUMAR
2018년 1월 1일
You can do use the same marker properties. This is just an example to plot the similar using the same program with using different markers
bestScores=rand(1,5)
bestPercent=bestScores*rand(1)
yyaxis left
plot(bestScores,'b-+','LineWidth',2);
yyaxis right
plot(bestPercent,'r-*','LineWidth',2);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/180530/image.png)
One more thing I want to suggest you is that there is no need to define color properties ('color') in plot.
plot(bestScores,'b','LineWidth',2,'color','b');
Second (if you have't mentioned x axis values) or third (if mentioned x axis values) argument is by default taken as line color.
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!