"mesh" or "surf" display problem on Windows 7
2 次查看(过去 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!