Is it possible to disable axes' edges

47 ビュー (過去 30 日間)
Matthew
Matthew 2012 年 7 月 17 日
回答済み: Christopher Bitikofer 2022 年 8 月 11 日
Hello,
Im working with handles to create a GUI that will be using several different axes. Can the edges of the axes be removed? I've been searching through the axes properties and I havent seen anything. Can someone please help!
Thanks in advance, Matt

採用された回答

Sean de Wolski
Sean de Wolski 2012 年 7 月 17 日
So something like:
figure;
axes('box','off','xtick',[],'ytick',[],'ztick',[],'xcolor',[1 1 1],'ycolor',[1 1 1]);
line([0 1],[0 1])
  2 件のコメント
Matthew
Matthew 2012 年 7 月 18 日
編集済み: Matthew 2012 年 7 月 18 日
Worked like a charm, thanks Sean!

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

その他の回答 (3 件)

Walter Roberson
Walter Roberson 2012 年 7 月 17 日
The only way to remove the edge of the axes is to set the axes visibility to be off. That will also make the tick marks invisible, along with any grid lines.
  3 件のコメント
Matthew
Matthew 2012 年 7 月 19 日
I thought visable would be like setting alpha equal to 0. However, I was wrong. This worked much easier, its just one property setting to modify.
Thanks Walter!

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


Image Analyst
Image Analyst 2012 年 7 月 18 日
Matthew, If you have the Image Processing Toolbox, go to File->Preferences->Image Processing->IMSHOW Display and uncheck the "Axes visible" box. That will eliminate any black line around the edge of your images if you use imshow() to display your image.
  1 件のコメント
Deependra Mishra
Deependra Mishra 2020 年 1 月 10 日
Is there anyway this can be unchecked programmatically?

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


Christopher Bitikofer
Christopher Bitikofer 2022 年 8 月 11 日
This took me too long to figure out. The axes are objects with lots of fun properties including visibility
ax.XAxis.Visible = 'off';

カテゴリ

Find more on Graphics Object Properties in Help Center and File Exchange

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by