Unwanted Tick Marks on second y-axis

조회 수: 7 (최근 30일)
Jim
Jim 2012년 11월 22일
I'm using the following code to create a plot but I end up with axis 1 blue tick marks on axis 2. Any idea how to get rid of the blue tick marks on axis 2?
figure
x=[66.7, 200.8, 433, 1070, 4096, 13410, 39960, 80010];
y1=[0.449, 0.881, 2.62, 4.78, 11.3, 22.2, 42.1, 43.9];
y2=[0.2411, 0.2394, 0.2364, 0.2286, 0.1976, 0.1394, 0.07577, 0.04487];
[AX,H1,H2] = plotyy(x,y1,x,y2,'plot');
set(AX,'yscale','log','xscale','log')
set(AX,'TickDir','out','TickLength',[.025 0])
set(get(AX(1),'Ylabel'),'String','Slow Decay')
set(get(AX(2),'Ylabel'),'String','Fast Decay')
xlabel('Time (\musec)')
title('Multiple Decay Rates')
set(H1,'LineStyle','--')
set(H2,'LineStyle',':')

채택된 답변

Matt Fig
Matt Fig 2012년 11월 22일
set(AX(1),'ytick',[])
  댓글 수: 7
Jim
Jim 2012년 11월 23일
Yep. That's what I see as well. If you look at the right y-axis you'll see that the left y-axis tick marks are duplicated on the right side. I'm trying to get rid of the blue tick marks on the right side.
Jim
Jim 2012년 11월 23일
Matt,
That fixed it. I've been woeking on this all day. Should have asked you sooner. Thanks for the help!
Jim

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by