フィルターのクリア

Why do I get markers on the second axis and how do I stop them?

2 ビュー (過去 30 日間)
Harry Smith
Harry Smith 2018 年 1 月 1 日
編集済み: Harry Smith 2018 年 1 月 1 日
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');

採用された回答

ANKUR KUMAR
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);
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 件のコメント
Harry Smith
Harry Smith 2018 年 1 月 1 日
Thanks, how do I stop the markers?
Harry Smith
Harry Smith 2018 年 1 月 1 日
編集済み: Harry Smith 2018 年 1 月 1 日
Found the answer: '-' without a marker thanks for your help
plot(bestScores,'-','LineWidth',2);

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by