Yaxis invisible

2 ビュー (過去 30 日間)
Ian
Ian 2011 年 1 月 28 日
I would like to make the yaxis invisible without getting rid of the text.
'axis off' is no good, because that gets rid of the ylabel, which I would like to keep.
I have tried:
set(gca,'box','off','ycolor','w')
but this also turns the text color to white.
In the end effect, I just don't want a black outline around my plots to be shown.
I have tried 'box off' but that doesnt seem to get rid of the black outline around my plots or subplots.

回答 (1 件)

Matt Fig
Matt Fig 2011 年 1 月 28 日
I don't think there is a way of doing it directly. Here is a hackey way of getting what you want for the Y-axis. Do similar for the other axis.
plot(1:10)
X = get(gca,'xlim')
xlim(X)
Y = get(gca,'ylim')
ylim(Y)
P = patch([X(1)-.05 X(1)-.05 X(1)+.1 X(1)+.1],[Y(1) Y(2) Y(2) Y(1)],...
[1 1 1 1],[1 1 1],'edgecolor',[1 1 1])
box off

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by