Invalid parameter/value pair arguments using Mapping Toolbox
이전 댓글 표시
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
답변 (1개)
Chad Greene
2014년 10월 9일
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])
카테고리
도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!