contour matrix empty in contourf
古いコメントを表示
Hi:
I have a X,Y,Z matrix, and use command [xc,yc]=contourf(new_X,new_Y,new_Z); to plot a contour plot.
The xc is empty, but it can be seen in 'new_Z', it is not empty and have a wide range of variation.
is there any problem with my operation?
Thanks!
Yu
3 件のコメント
Walter Roberson
2018 年 11 月 22 日
This seems to be related to the fact that the range of values is your new_Z is so high that with the default settings, everything falls into one contour. If you ask for at least 15 contour intervals then you get a non-empty first output.
Yu Li
2018 年 11 月 22 日
Walter Roberson
2018 年 11 月 22 日
NumLevels = 15;
[M, c] = contourf(new_X, new_Y, new_Z, NumLevels);
My tests with your data shows that c comes out empty if the number of levels is 14 or less (default is 10.)
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!