Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Error with mlabel: invalid parameter/value pair arguments.

Subject: Error with mlabel: invalid parameter/value pair arguments.

From: Erica B

Date: 9 May, 2012 16:21:06

Message: 1 of 2

Hi,

I am plotting a map of data using the mapping toolbox and pcolorm. I've used the same script syntax a dozen times before without problem, however now I'm getting an error on mlabel and plabel. Bizarrely, this doesn't happen when the axes are set to a smaller domain, just when I use the extent of the lat-lon data.

% axes setup
p2 = axesm('MapProject','lambcyln','MapLatLimit',[min(mlat(:)) max(mlat(:))],'MapLonLimit',[min(mlon(:)) max(mlon(:))]);
mlabel('LabelUnits','degrees'); setm(p2,'MeridianLabel','on','MlineLocation',10,'MLabelLocation',20);
plabel('LabelUnits','degrees'); setm(p2,'ParallelLabel','on','PLineLocation',10,'PLabelLocation',20);
??? Error using ==> text
Invalid parameter/value pair arguments

Error in ==> textm at 104
h0 = text(x, y, z, string,...

Error in ==> mlabel at 200
hndl0 = textm(latline,lonline,gridalt,labelstr,...

Error in ==> axesm>setframegrat at 800
    mlabel('reset');

Error in ==> axesm at 150
    setframegrat(mstruct)

Error in ==> mlabel at 71
    axesm(mstruct,'MeridianLabel','reset',varargin{:});


Matlab seems to be giving me a syntax error back, but according to the documentation (and previous experience with this exact code), this is the correct syntax for mlabel and plabel. And as a check, when I just use mlabel, or mlabel('on') etc, I get a similar error about invalid parameter/value pair arguments.

Has anyone encountered this before? Is it just a bug? I'm using MATLAB 2010b for Mac.

Any help would be appreciated.

EB

Subject: Error with mlabel: invalid parameter/value pair arguments.

From: Rob Comer

Date: 10 May, 2012 03:18:17

Message: 2 of 2

"Erica B" wrote in message <joe5hi$bap$1@newscl01ah.mathworks.com>...
> I am plotting a map of data using the mapping toolbox and pcolorm. I've used the same script syntax a dozen times before without problem, however now I'm getting an error on mlabel and plabel. Bizarrely, this doesn't happen when the axes are set to a smaller domain, just when I use the extent of the lat-lon data.
>
> % axes setup
> p2 = axesm('MapProject','lambcyln','MapLatLimit',[min(mlat(:)) max(mlat(:))],'MapLonLimit',[min(mlon(:)) max(mlon(:))]);
> mlabel('LabelUnits','degrees'); setm(p2,'MeridianLabel','on','MlineLocation',10,'MLabelLocation',20);
> plabel('LabelUnits','degrees'); setm(p2,'ParallelLabel','on','PLineLocation',10,'PLabelLocation',20);
> ??? Error using ==> text
> Invalid parameter/value pair arguments
>
> Error in ==> textm at 104
> h0 = text(x, y, z, string,...
>
> Error in ==> mlabel at 200
> hndl0 = textm(latline,lonline,gridalt,labelstr,...
>
> Error in ==> axesm>setframegrat at 800
> mlabel('reset');
>
> Error in ==> axesm at 150
> setframegrat(mstruct)
>
> Error in ==> mlabel at 71
> axesm(mstruct,'MeridianLabel','reset',varargin{:});
>
>
> Matlab seems to be giving me a syntax error back, but according to the documentation (and previous experience with this exact code), this is the correct syntax for mlabel and plabel. And as a check, when I just use mlabel, or mlabel('on') etc, I get a similar error about invalid parameter/value pair arguments.
>
> Has anyone encountered this before? Is it just a bug? I'm using MATLAB 2010b for Mac.

Erica,

Can you share the values of your map limits?
[min(mlat(:)) max(mlat(:))] and [min(mlon(:)) max(mlon(:))]?

-- Rob

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us