PColor: Why doesn't it work for non-evenly distributed x-vectors?
2 ビュー (過去 30 日間)
古いコメントを表示
I have an unevenly distributed x (time) and y vector and a matrix C with size(x,y). When I plot it with pcolor, the plot looks all weird but the y-axis looks fine. Why can it cope with non-evenly distributed y values but not with non-evenly distributed x values? What can I do to solve this?
best regards, Bernadette
1 件のコメント
Paul
2014 年 5 月 1 日
I think this is a problem with pcolor and a time axis rather than unevenly distributed data. I have an evenly distributed matrix of ocean velocity as a function of time (x axis) and depth (y axis). If I use pcolor(time,depth,velocity) the result is similar to yours - the first half of the plot is missing. If I create an artificial x variable (x=1:length(time)) and use pcolor(x,depth,velocity) the plot looks fine.
回答 (3 件)
Kelly Kearney
2014 年 5 月 1 日
That's the opengl renderer acting up... quick fix:
set(gcf, 'renderer', 'zbuffer');
More complicated fix:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Polar Plots についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!