how to color a surface?
古いコメントを表示
Evrytime i try to color a surface the entire plot comes out to be pitch black in color. i tried these codes..please temme if they r right or wrong.
figure(6)
colormap hsv
surf(ti,X,P_s)
colorbar
ylabel('Distance along pipeline (m)')
xlabel('time (hours)')
zlabel('Pressure (bar)')
grid on
plzz help!
10 件のコメント
Image Analyst
2013 年 8 月 25 日
I see you using the colormap function - doesn't that color it?
roro6992
2013 年 8 月 25 日
Walter Roberson
2013 年 8 月 25 日
編集済み: Walter Roberson
2013 年 8 月 25 日
What are max() and min() of P_s(:) ?
Does the problem still occur if you do not have "grid on" ?
roro6992
2013 年 8 月 25 日
Walter Roberson
2013 年 8 月 25 日
To check: do you get a colored plot if you do not use "colormap hsv" ?
roro6992
2013 年 8 月 25 日
roro6992
2013 年 8 月 25 日
Walter Roberson
2013 年 8 月 25 日
Odd... I don't know. A couple of more experiments:
1)
opengl software
This would be to workaround some drawing bugs
2)
surf(ti,X,double(P_s))
This is complete speculation on my part as to what the cause might be.
Walter Roberson
2013 年 8 月 25 日
The "opengl" command could be used at any point.
回答 (1 件)
Youssef Khmou
2013 年 8 月 26 日
I think your data have many isosamples, that makes the colormap concentrated because of the interpolation,add this command before using colormap :
shading interp
カテゴリ
ヘルプ センター および File Exchange で Red についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!