"mesh" or "surf" display problem on Windows 7
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
This is strange and I scratched my head but could't figure out why. Very simple matlab code:
[x,y] = meshgrid(1:10,1:10);
mesh(x,y,x);
or:
surf(x,y,x);
I would expect to see a regular grid displayed either only showing the edges or surface patches. Works fine on Linux or Mac (R2012a), but it shows some extra lines/edges on my Windows 7 platform, like lines connecting nodes on the left to the nodes on the right at a different row. I wish I could upload a figure to demonstrate (if possible, how?)
I have also confirmed that if I save the figure on Linux, and open on Windows, same thing happens. The following is the ver on my Windows.
It appears to me this is probably a display problem. but not sure what is the cause, and how to overcome with it.
>> ver
-------------------------------------------------------------------------------------------------------
MATLAB Version: 7.14.0.739 (R2012a)
MATLAB License Number: (manually deleted)
Operating System: Microsoft Windows 7 Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
-------------------------------------------------------------------------------------------------------
답변 (10개)
Sean de Wolski
2012년 11월 6일
First: update your graphics drivers.
Second: you could try the software implementation of OpenGL:
opengl software
and
doc opengl
for more information on OpenGL and what to do about OpenGL issues.
댓글 수: 0
Fredrik
2013년 3월 8일
Hi,
I have exactly the same problem. Are there any solutions?
best regards, Fredrik
댓글 수: 1
Sean de Wolski
2013년 3월 8일
Fredrik
2013년 3월 11일
Hi Sean,
thanks, it works now. What I did to get it work:
- I updated graphic drivers - problem is still there.
- I tried
opengl software
and
opengl hardware
problem is still there.
- I set the renderer manually to opengl:
set(gcf, 'Renderer', 'OpenGL');
It works! Independent from 'opengl software' or 'opengl hardware'.
댓글 수: 0
Francis
2013년 3월 15일
편집: Francis
2013년 3월 15일
Hello, I am experiencing the same issue, see this image for example: (left is with the default opengl renderer, right is with zbuffer)
- Software OpenGL produces the same incorrect output
- Manullay setting the renderer (as above) produces the same incorrect output
- I am using the latest drivers from nvidia for my Quadro FX580.
- Windows 7 SP1 x64
- Matlab R2012b
EDIT: Software opengl does fix the problem, i just have to set the renderer to zbuffer then back to opengl for the figure to redraw.
Is this a bug with matlab or opengl/drivers? I see no reason why hardware opengl should produce incorrect output
댓글 수: 0
Roger Moss
2013년 9월 18일
I've got the same problem - R2013b, Windows 7, Quadro K600 graphics card. New PC with the latest drivers.
The 'painters' and 'zbuffer' renderers work but OpenGL (either hardware or software) gives me spurious edge lines that wrap back from the end of each mesh line to the start of the next.
e.g. surf(peaks(10)); set(gcf, 'renderer', 'opengl') % looks horrible
I had this in R2012b and I thought installing 2013b might fix it, but it hasn't.
Roger
댓글 수: 0
Erik S.
2013년 10월 7일
I've got the same problem on Win 7 Matlab R-2012B. I am running a Quadro 2000D. Is this an issue only with Quadro cards? When I am running the same machine with a Geforce there are no errors.
Erik
댓글 수: 0
Gabriel
2014년 1월 2일
I am using Quadro K3000M/PCIe/SSE2, and also have this problem. It occurs on larger meshes, but not on smaller meshes. For example, the following code gives no display errors:
n = 10;
x = linspace(-10,10, n);
y = linspace(-10,10, n);
z = repmat((y.^2)', [1,n]) - repmat(x.^2, [n,1]);
mesh(x,y,z)
However, if n is set to 50, then the display error occurs.
Is Mathworks working on a solution to this?
Gabe
댓글 수: 0
Gabriel
2014년 3월 17일
A simple fix I found is to set the 'EdgeAlpha' value to something other than 1. I set the 'EdgeAlpha' to 0.99 and the extra lines go away.
Gabe
댓글 수: 2
Sean de Wolski
2014년 7월 31일
This is the same effect of explicitly setting the renderer to OpenGL (which is required for transparency)
set(gcf,'Renderer','OpenGL')
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!