Graphic problem on windows, but ok on Linux
Afficher commentaires plus anciens
I made a macro to format and display 3d values on graphics (using contourf or surfc). in my case, the 3d are : -x axis : time -y axis depth -z axis (the color intensity) : physical value
The macro work perfectly and fully with a computer (configuration 1), but the same macro don't work on another computer (configuration 2). I tried a lot of things to resolve it, but I can't find a solution: opengl hardware, opengl hardware, set(gcf(), 'Renderer', 'painters'), set(gcf(), 'Renderer', 'zbuffer') ... mean to the same error messages.
Is a Open GL problem ? Is it an hardware problem ? Is it a code problem ?
The format and data are good because it work perfectly on configuration 1, but in some case (some data sets): surface or contour graphic can't be done (figure is made but crash) and the error message is (I tried with contourf and surfc) :
Error using contourf (line 61) Vector X must be strictly increasing or strictly decreasing with no repeated values.
That refers to (in contourf.m) :
if (nout == 3)
warning(message('MATLAB:contourf:EmptyV6OutputArgument', upper( mfilename )));
end
try
if nout == 0
contourfHGUsingMATLABClasses(cax, args{:});
elseif nout == 1
cout = contourfHGUsingMATLABClasses(cax, args{:});
else % nout == 2 || nout == 3
[cout, hand] = contourfHGUsingMATLABClasses(cax, args{:});
end
catch me
throw(me)
OR :
Error using surfc (line 21) Vector X must be strictly increasing or strictly decreasing with no repeated values.
That refers to (in surfc.m) :
if ishg2parent( varargin{:} )
[~, cax, args] = parseplotapi(varargin{:},'-mfilename',mfilename);
try
if nargout > 0
h = surfcHGUsingMATLABClasses(cax, args{:});
else
surfcHGUsingMATLABClasses(cax, args{:});
end
catch me
throw(me)
end
configuration 1:
Linux x64
Matlab 2013a
Rendered : zbuffer
'opengl info' result:
%
Version = 4.4.0 NVIDIA 340.96
Vendor = NVIDIA Corporation
Renderer = GeForce GT 610/PCIe/SSE2
MaxTextureSize = 16384
Visual = 0x6f (TrueColor, depth 24, RGB mask 0xff0000 0xff00 0x00ff)
Software = false
# of Extensions = 292
Driver Bug Workarounds:
OpenGLBitmapZbufferBug = 0
OpenGLWobbleTesselatorBug = 0
OpenGLLineSmoothingBug = 0
OpenGLClippedImageBug = 1
OpenGLEraseModeBug = 0
configuration 2:
Win10 x64
Matlab 2015a
Rendered : opengl
'opengl info' result:
%
Version: '3.3.0'
Vendor: 'NVIDIA Corporation'
Renderer: 'GeForce 210/PCIe/SSE2'
MaxTextureSize: 8192
Visual: 'Visual 0x07, (RGBA 32 bits (8 8 8 8), Z depth 16 bits, Hardware acceleration, Double buff...'
Software: 'false'
SupportsGraphicsSmoothing: 1
SupportsDepthPeelTransparency: 1
SupportsAlignVertexCenters: 1
Extensions: {248x1 cell}
MaxFrameBufferSize: 8192
This link was usefull, but I am not sure I have all my solution there : http://fr.mathworks.com/help/matlab/ref/opengl.html#buwqhi1-8 Thank you for your help or idea to solve it !
Réponse acceptée
Plus de réponses (1)
2 commentaires
Mike Garrity
le 5 Jan 2016
I can tell that your Linux version is running an older version because the default colormap changed from jet (which you're seeing in your Linux pictures) to parula (which you're seeing in your Windows pictures) in R2014b.
So that means that means that on your Windows system you are going to be getting that error message if your X or Y data is non-monotone. As I said, you can avoid this error message by simply using meshgrid to turn your X & Y data into 2D arrays. That sort of tells contour "Don't bug me, I know what I'm doing". This will work fine in both versions.
From your plot of dataset 2, it looks like your data might have repeated values. This is an interesting edge case in the monotone test. We often distinguish between "monotone" (repeated values allowed) and "strictly monotone" (repeated values not allowed). The check here is for "strictly monotone". That seemed like the correct check because repeated X or Y values do generate discontinuities in the contour that can be very confusing.
I'm a big concerned about the bit in parenthesis after your description of dataset 2.
(in the case, contours or surf crashes !!!)
Could you expand on this? What do you mean by "surf crashes". You're not referring to that same error message about the non-monotone data, because surf doesn't
Loic B
le 7 Jan 2016
Catégories
En savoir plus sur Graphics Performance dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!







