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 Exchange에서 Graphics 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