Unwanted Tick Marks on second y-axis

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 日

0 投票

set(AX(1),'ytick',[])

7 件のコメント

Jim
Jim 2012 年 11 月 22 日
Thanks Matt. The only problem is that it took my axis 1 y-aixs tick marks away as well. All the plots i see in the library don't seem to have duplicate ticks so I don't understand what's going on. I just don't want my axis 1 ticks showing up on axis 2.
Matt Fig
Matt Fig 2012 年 11 月 22 日
編集済み: Matt Fig 2012 年 11 月 23 日
When I paste your code, then paste my code, there are no blue tick marks on the left side, and there are green tick marks on the right. You said that you wanted the blue tick marks gone and this is what it seems you got.
Now what is the problem? (You might have to post a picture. Saying "axis 1" or "axis 2" is not descriptive enough for me to tell what it is that you are seeing.)
Jim
Jim 2012 年 11 月 23 日
WHat i'm trying to get is the blue tick marks on the left and just the green tick marks on the right. For some reason i get both green and blue tick marks on the right. If you take out your code you ahould see both the blue and green ticks on the right. Thanks for the help.
Matt Fig
Matt Fig 2012 年 11 月 23 日
Here is what I see when I paste your code:
Matt Fig
Matt Fig 2012 年 11 月 23 日
編集済み: Matt Fig 2012 年 11 月 23 日
Are you talking about those little, labelless ticks on the right? Try this:
box(AX(1),'off')
Does that fix it?
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 件)

カテゴリ

ヘルプ センター および File ExchangeTwo y-axis についてさらに検索

タグ

質問済み:

Jim
2012 年 11 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by