Invalid parameter/value pair arguments using Mapping Toolbox
2 views (last 30 days)
Show older comments
Hello
I´m having problems mapping global temperature using Mapping toolbox. This script is for displaying 3 different figures, annual, winter and summer. When it comes to setting the range and placement of colour bar as:
MinData = 100; % MaxData = 400; % set(gcf,'position',[0.6,0.1,0.4,0.4]); set(gca, 'CLim', MinData, MaxData);
I always get the following error message:
Error using set Invalid parameter/value pair arguments Error in ..... set(gca, 'CLim', MinData, MaxData);
But still the annual image pops out looking fine, without colour bar. Lets say I instead do:
set(gca, 'CLim', [MinData, MaxData]);
No error appears but then all figures turn red, with colour bars.
Any ideas?
Thanks, Hera
0 Comments
Answers (1)
Chad Greene
on 9 Oct 2014
Have you called the colorbar command? Instead of using set(gca,..., I recommend giving the color bar a handle of its own, we'll call it cb:
cb = colorbar;
set(cb,'pos',[.6 .1 .4 .4])
caxis([MinData MaxData])
0 Comments
See Also
Categories
Find more on Colormaps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!