Colorbar error "Too many input arguments." in matlab 2015b
Show older comments
I am experiencing a problem with the colorbar function on matlab 2015b student version. Note this is a brand new installation on a new laptop running Windows 10 64bit (ie. I have no new functions that override the default ones as another question suggests). I have updated to my latest graphics drivers to no avail.
So the following code
figure
surf(peaks)
colorbar
produces the following error
Error using parula
Too many input arguments.
Error in matlab.graphics.illustration.ColorBar
Error in colorbar (line 174)
cbar = matlab.graphics.illustration.ColorBar;
Changing the colormap makes no difference. Changing the renderer to painters as well as using the software and hardware modes in opengl makes no difference. Also just typing
matlab.graphics.illustration.ColorBar
produces the same error (minus the bottom two lines). And for incase anyone wants
opengl info
outputs
Version: '4.5.0 NVIDIA 361.75'
Vendor: 'NVIDIA Corporation'
Renderer: 'GeForce 920M/PCIe/SSE2'
RendererDriverVersion: '10.18.13.6175'
RendererDriverReleaseDate: '22-Jan-2016'
MaxTextureSize: 16384
Visual: 'Visual 0x07, (RGBA 32 bits (8 8 8 8), Z depth 16 bits, Hardware acceleration, Double buffer, Antialias 8 samp…'
Software: 'false'
HardwareSupportLevel: 'basic'
SupportsGraphicsSmoothing: 1
SupportsDepthPeelTransparency: 0
SupportsAlignVertexCenters: 0
Extensions: {323x1 cell}
MaxFrameBufferSize: 16384
Accepted Answer
More Answers (1)
Mike Garrity
on 10 Feb 2016
This bit of the message:
Error using parula
Too many input arguments.
Error in matlab.graphics.illustration.ColorBar
Error in colorbar (line 174)
cbar = matlab.graphics.illustration.ColorBar;
is coming from where the colorbar's ColorMap gets initialized to its default value.
It calls the function parula, with the argument 64 (meaning it wants 64 colors). The error is saying that the function parula doesn't expect an argument. That would imply that there's something named parula on your path. Could you do a "which"?
which parula -all
This should return something like this:
matlab/toolbox/matlab/graph3d/parula.m
If it doesn't then you need to look at the file it is pointing at.
2 Comments
Rayko Stantchev
on 10 Feb 2016
Walter Roberson
on 10 Feb 2016
Good thing you didn't have any new functions that override the default, or who knows what might have happened...
Categories
Find more on Graphics Performance in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!