Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Plotting issue re legend

3 ビュー (過去 30 日間)
D.J
D.J 2018 年 10 月 11 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hello all, Any idea how to show different colours in the legend of my plot? both data showing with the same orange colour.
Here is my code
figure(6);
scatter(Phi9all,Phi9all_pdf)
xlabel('Relative Humidity (%)')
ylabel('Normal PDF')
title('Comparison b/t Sample PDF and population PDF for Phi')
hold on
scatter(Phi9all,Phi9all_s_pdf)
legend('Phi9all','Phi9all_s_pdf','Location','NW')
Thank you in advance !
  3 件のコメント
D.J
D.J 2018 年 10 月 11 日
That is so weird ! I have attached here a snapshot of how it looks like on my computer ! Have you changed anything in the code?
dpb
dpb 2018 年 10 月 11 日
Which release are you using out of curiosity?
This is figure 6 that implies at least five previous so there must be much more code than just this snippet. As jonas shows, it doesn't happen in isolation as a rule so one must presume it's a figment of some previous actions left over that have confused the line color property being retrieved automagically.
Can you start a new session and just do the one plot relatively conveniently? I'm guessing that one would be normal and the conclusion would be that to try to fix this in the existing session would be to introduce a fixup for some previous error and so the better route would be to start from a clean session if it isn't two days worth of work but can be rerun quickly.

回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by