フィルターのクリア

Draw axis on 3D-object surface

3 ビュー (過去 30 日間)
Kyle Wang
Kyle Wang 2015 年 3 月 25 日
回答済み: Star Strider 2015 年 3 月 25 日
The following code produces a 3D box-surface with a bar in the middle:
img = zeros(100,100)+5;
img(1,:)=0;
img(end,:)=0;
img(:,1)=0;
img(:,end)=0;
img(50,50) = 120;
surf(img);
shading interp
axis tight
I'm wondering how I can draw x- and y-axis directly on the top-surface (the blue surface) of the box, and the ticks pointing inwards?
Also I notice that the z-axis is difficult to match with the height of the middle bar. I'm wondering what's the best way to put the z-axis or a way to represent the height of the middle bar?

回答 (1 件)

Star Strider
Star Strider 2015 年 3 月 25 日
Ticks pointing inwards is easy. See 'TickDir' for details. You may not be able to see them though, if you do that.
The rest I doubt you can do, at least easily. Search the File Exchange to see if some of those contributions can do what you want.

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by