plot and set y color

I'm trying to plot and set the y color in the same time but it doesnt work
plot(handles.Axes1,x,y,'Color','r','YColor','r')
i also tried
plot(handles.Axes1,x,y,'Color','r')
set(gca,'ycolor','r')
but didnt work... Thank you

3 件のコメント

Vincent I
Vincent I 2012 年 7 月 11 日
編集済み: Vincent I 2012 年 7 月 11 日
i was able to color the y axes
set(hObject,'CurrentAxes',handles.Axes1);
hold(handles.Axes1,'on');
plot(handles.Axes1,x,y,'Color','r')
cah = get(hObject,'CurrentAxes');
set(cah,'YColor','r')
However is there a easier way so I can cut on the code?
John Petersen
John Petersen 2012 年 7 月 11 日
Did you try
set(handles.Axes1,'YColor','r')
Vincent I
Vincent I 2012 年 7 月 11 日
yes, i remember trying and i think it didnt work... however it does work thank you

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

回答 (1 件)

Luffy
Luffy 2012 年 7 月 11 日

0 投票

Try this,
figure;
plot(sind(1:360));
set(gca,'YColor','r');

カテゴリ

ヘルプ センター および File ExchangeGraphics Performance についてさらに検索

タグ

質問済み:

2012 年 7 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by