Plotの背景(軸外)の色を変えたい

46 Ansichten (letzte 30 Tage)
Yu
Yu am 12 Okt. 2021
Beantwortet: Kojiro Saito am 13 Okt. 2021
こんにちは。
一つのライブスクリプト内で、複数のscatter3とpcshowを利用して、figureを表示させています。
pcshowの全背景が黒であるためか、それにひっぱられてscatter3の最外枠の背景も黒になってしまいます。
軸内はColorで色指定できているのですが、その外側をどう制御すればよいかわかりません。
ご存知のかたがいらっしゃいましたら、教えていただけますと嬉しいです。
% Scatter3
s1 = scatter3(Longitude_target2,Latitude_target2,Depth_target2,10,SI_target2);
cb = colorbar;
cb.Color = 'w';
colormap jet;
caxis([-70 -10]);
set(gca,'color','w')
% pcshow
pcshow(ptCloud.Location,ClusterLabel)

Akzeptierte Antwort

Kojiro Saito
Kojiro Saito am 13 Okt. 2021
バージョンR2021bからpcshow の機能改善で背景色を'BackgroundColor'で変更できるようになりました。
R2021bなら以下のようにして背景色を白に変更できます。
numFaces = 600;
[x,y,z] = sphere(numFaces);
pcshow([x(:), y(:), z(:)], 'BackgroundColor', 'white');
また、それ以前のバージョン(例えばR2021a)ですと、Figure 上でマウス右クリックで「背景色」→「カスタム」をクリックして、白色を指定することで変更できます。

Weitere Antworten (0)

Kategorien

Mehr zu ライティング、透明度、およびシェーディング finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!