関数「image」でx軸ラベル、y軸ラベルを付け加えるときに、0:1:3を使用して上限と下限が3と0になるようにすることはできますか?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
zz=[0 2 4 6; 8 10 12 14; 16 18 20 22];
image(0:1:3,0:1:2,zz)
行うとx軸は-0.5~3.5に、y軸は-0.5~2.5になってしまいます。
image(0.5:1:3.5,0.5:1:2.5,zz)
を行えばできるんのですが、わかりにくいです。imageで軸の指定は可能でしょうか?
0 commentaires
Réponses (2)
Hernia Baby
le 17 Nov 2022
こういうことでしょうか?
zz=[0 2 4 6; 8 10 12 14; 16 18 20 22];
image(0:1:3,0:1:2,zz)
xticks([0 1 2 3])
yticks([0 1 2])
6 commentaires
Atsushi Ueno
le 18 Nov 2022
ちょっと誤解があるかもしれません。
histogram2関数は2変量ヒストグラムの2次元表示と3次元表示のどちらにも対応していて、3次元表示がデフォルト(オプションを指定しない場合の動作)であると言ってます。
Voir également
Catégories
En savoir plus sur Histograms dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!