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
[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