フィルターのクリア

How to only change part of the background color?

2 ビュー (過去 30 日間)
xiaojuezi
xiaojuezi 2020 年 9 月 20 日
コメント済み: xiaojuezi 2020 年 9 月 21 日
Hi, I have a figure as my ui. Now I would like to plot something in the middle of the ui:
axes('Position',[.7 .7 .2 .2])
set (gca, 'visible' , 'off' )
set (gca, 'xtick' , [])
set (gcf, 'color', [1,1,1])
axis equal
hold on
plotUnrasterized(h, w, h, w, d, curves, 'bezier', defaultI);
hold off
However, this would set the whole image's background to [1,1,1]. Is there a way to only set the background color of the small axes but keep the background of the figure as before?
Thank you very much.

採用された回答

Walter Roberson
Walter Roberson 2020 年 9 月 20 日
set(gca, 'color', [1,1,1]) %instead of gcf
  1 件のコメント
xiaojuezi
xiaojuezi 2020 年 9 月 21 日
Thank you very much!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by