Why does appear in a 3D mesh plot lines that should not be there?

1 回表示 (過去 30 日間)
Dani Tormo
Dani Tormo 2015 年 2 月 27 日
コメント済み: Mike Garrity 2015 年 2 月 27 日
Following the first example in the mesh documentation:
figure;
[X,Y] = meshgrid(-8:.5:8);
R = sqrt(X.^2 + Y.^2) + eps;
Z = sin(R)./R;
mesh(Z);
It should appear this:
But when I run the code, it appears other lines that are not in the example. I do not know why this is happening.
The funny thing is that if I copy the figure using Edit/Copy Figure it copies the image without those lines. Pretty strange.

採用された回答

Titus Edelhofer
Titus Edelhofer 2015 年 2 月 27 日
Hi,
might be a problem with your OpenGl driver ... You could try either
set(gcf, 'Renderer', 'zbuffer')
or to switch from hardware opengl to software opengl:
opengl software
Let us know the outcome of either of those ...
Titus
  2 件のコメント
Dani Tormo
Dani Tormo 2015 年 2 月 27 日
The first option worked!
I will try the next one if the problem persists.
Thanks!
Mike Garrity
Mike Garrity 2015 年 2 月 27 日
I think that was a bug in how a particular family of graphics card drivers handled OpenGL index buffers. I think that it was nVidia, but I'm not sure I'm remembering correctly.
As for it not showing up when you copy the figure, my guess would be that you have 'Preserve information' set in your Copy Options. That uses painters instead of opengl.
Anyways, the opengl renderer in MATLAB R2014b contains a workaround for this issue. I'd be interested to know whether you still encounter it after upgrading.

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by