pspectrum関数を使用した際のmatlab タイトルとcolorbarの削除について

17 vues (au cours des 30 derniers jours)
洋生 福光
洋生 福光 le 14 Jan 2021
Commenté : 洋生 福光 le 20 Jan 2021
pspectrum関数で作製したグラフのタイトルとcolorbarの消し方について質問です。
現在以下のようにプログラムを書いております。
pspectrum(filename,f,'spectrogram');
ax = gca;
ax.XAxis.Visible = 'off'
ax.YAxis.Visible = 'off'
軸は消せたのですが、pspcrtrum関数を用いると自動的にタイトルとcolorbarが表示されてしまいます。(下の図)
消す方法はないのでしょうか。
また、現在、ディープラーニングにいれる画像の前処理をしているのですが、このやり方以外に画像範囲の設定をする方法があれば教えてほしいです。

Réponse acceptée

Naoya
Naoya le 18 Jan 2021
findobj 関数で特定のタイプのグラフィックス オブジェクトをみつけることができます。
例えば、カラーバーのオブジェクトを見つける場合、
h1 = findobj(gcf,'Type','Colorbar')
でみつけることができます。こちらを削除する場合は、
delete(h1)
で削除することができます。
タイトルについては、 axes の子供の Title に含まれますので、
ax = gca;
delete(ax.Title)
で削除できます。
  1 commentaire
洋生 福光
洋生 福光 le 20 Jan 2021
丁寧な回答ありがとうございます。調べてもなかなかヒットしなかったので、非常に助かりました。

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2 次元および 3 次元プロット dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!