GUIのaxesの座標軸を消す

59 views (last 30 days)
qrqr
qrqr on 23 May 2019
Commented: Etsuo Maeda on 27 May 2019
guideコマンドを入力しGUIを作っています。
GUI画面に画像を貼ることは可能でしょうか?
fig作成画面では張り付ける機能がなさそうなので、
OpeningFcn(~)のところで張り付ける関数があるのでしょうか。
宜しくお願いします。
追記
axes(handles.axes1);
Im=image(imread('test.png'));
このコマンドでaxes1に画像を表示できました。
ですが座標軸も表示されてしまい消すことができません。

Accepted Answer

Etsuo Maeda
Etsuo Maeda on 27 May 2019
Figureの軸要素はAxesで設定します。親子関係は Figure - Axes - Object (今回はimage) という順になっています。
ax = gca;
ax.XTickLabel = []; % X軸TickLabelに空を設定
と記述すれば、XTickLabelが消えます。他の項目も同様に設定することができます。
ご参考:ドキュメンテーション「Axes のプロパティ」
HTH
  2 Comments
qrqr
qrqr on 27 May 2019
ありがとうございます。
周りの枠線も消すことは可能でしょうか?
宜しくお願い致します。
Etsuo Maeda
Etsuo Maeda on 27 May 2019
plot(rand(5))
ax = gca;
ax.XAxis.Visible = 'off'
とすれば、Xを全部消すことができます。Yも同様です。
HTH

Sign in to comment.

More Answers (0)

Categories

Find more on グラフィックス パフォーマンス in Help Center and File Exchange

Products


Release

R2015b

Community Treasure Hunt

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

Start Hunting!