フィルターのクリア

Change color style of plot

43 ビュー (過去 30 日間)
monkey_matlab
monkey_matlab 2015 年 10 月 22 日
回答済み: TastyPastry 2015 年 10 月 22 日
Hello,
I was attempting to change the color of one of the plots in my graph to a specific color but I could not get the program to work. Can you help me to change the colors of the plots. Here is my code:
tone = linspace(0,10000,10);
% Modulation Flatness Data
Room = randi([0,100],10,1);
Cold = randi([0,100],10,1);
Hot = randi([0,100],10,1);
figure
semilogx(tone, Room, 'Color',[1,0.4,0.6], tone, Cold, 'b', tone, Hot, 'r'); grid on;
legend('RM', 'Hot', 'Cold');
xlabel('Audio Tone (Hz)'); ylabel('Data (dB)');

採用された回答

TastyPastry
TastyPastry 2015 年 10 月 22 日
I just split up the lines because semilogx() was being annoying:
semilogx(tone, Room, 'Color',[1,0.4,0.6]);
hold on
semilogx(tone, Cold, 'b');
semilogx(tone, Hot, 'r');
hold off

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by