When i use surf (e.g. with peaks) the Z axis is not shown. (Linux 64, nvidia-drivers-295.49, Matlab 2012a)

4 件のコメント

Jan
Jan 2012 年 5 月 16 日
Could you post a small example, which reproduces the problem?
Kye Taylor
Kye Taylor 2012 年 5 月 16 日
What is the output from
which surf -all
Florian
Florian 2012 年 5 月 16 日
example:
>> peaks
output:
>> which surf -all
/home/shared/local/MATLAB/R2012a/toolbox/matlab/graph3d/surf.m
Florian
Florian 2012 年 5 月 16 日
http://oi47.tinypic.com/j6jxoo.jpg

サインインしてコメントする。

 採用された回答

Florian
Florian 2012 年 5 月 19 日

0 投票

Meanwhile I've noticed that it is visible in the exported eps. So that's good enough for me right now, though it is not a real solution to the problem...

その他の回答 (1 件)

Kye Taylor
Kye Taylor 2012 年 5 月 16 日

1 投票

After issuing
peaks
issue the command
zlabel('z')

8 件のコメント

Florian
Florian 2012 年 5 月 16 日
not working... :(
Kye Taylor
Kye Taylor 2012 年 5 月 16 日
Sounds like a more subtle problem... Perhaps try closing all figure windows first because zlabel will put a label on the current active figure window. If that doesn't work, does zlabel('z') add a zlabel on your machine with the following commands?
surf(membrane)
zlabel('z')
Florian
Florian 2012 年 5 月 17 日
Same same and btw. it also appears right from the start, i.e. after I've restarted MATLAB.
I found that
>> axis vis3d
fixes it. BUT:
>> set(gca, 'DataAspectRatioMode', 'auto','PlotBoxAspectRatioMode', 'auto','CameraViewAngleMode', 'auto')
makes it disappear again. So how do I get both? Stretch to fill and a z axis?
Kye Taylor
Kye Taylor 2012 年 5 月 17 日
You should be able to have both... The fact that surf(membrane) and zlabel('z') don't work right away is troubling, and I'm not sure what the solution is. I suggest posting a copy of your code that creates a figure that's 1.) missing the zlabel, 2) using axis vis3d to add a label, and 3.) using the set command to screw it up. Seeing all the commands sequentially may allow others more insight.
Florian
Florian 2012 年 5 月 19 日
>> peaks
No z axis.
>> axis vis3d
Z axis visible
>> set(gca, 'DataAspectRatioMode', 'auto','PlotBoxAspectRatioMode', 'auto','CameraViewAngleMode', 'auto')
Z axis disappeared.
Walter Roberson
Walter Roberson 2012 年 5 月 19 日
OpenGL renderer, right?
Florian
Florian 2012 年 5 月 21 日
Yes!
>> set(gcf, 'Renderer', 'painters')
% zaxis visible
>> set(gcf, 'Renderer', 'zbuffer')
% zaxis visible
>> set(gcf, 'Renderer', 'opengl')
% zaxis NOT visible
Chad Greene
Chad Greene 2014 年 8 月 16 日
Or more simply, rend, rend, rend

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeGraphics Performance についてさらに検索

質問済み:

2012 年 5 月 16 日

コメント済み:

2014 年 8 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by