"mesh" or "surf" display problem on Windows 7
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
-------------------------------------------------------------------------------------------------------
Antworten (10)
Sean de Wolski
am 6 Nov. 2012
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 Kommentare
Fredrik
am 8 Mär. 2013
Hi,
I have exactly the same problem. Are there any solutions?
best regards, Fredrik
1 Kommentar
Sean de Wolski
am 8 Mär. 2013
Fredrik
am 11 Mär. 2013
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 Kommentare
Francis
am 15 Mär. 2013
Bearbeitet: Francis
am 15 Mär. 2013
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 Kommentare
Roger Moss
am 18 Sep. 2013
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 Kommentare
Erik S.
am 7 Okt. 2013
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 Kommentare
Gabriel
am 2 Jan. 2014
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 Kommentare
Gabriel
am 17 Mär. 2014
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 Kommentare
Sean de Wolski
am 31 Jul. 2014
This is the same effect of explicitly setting the renderer to OpenGL (which is required for transparency)
set(gcf,'Renderer','OpenGL')
Siehe auch
Kategorien
Mehr zu Graphics Performance finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!