Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!o9g2000prg.googlegroups.com!not-for-mail
From: NZTideMan <mulgor@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Depth VS longtitude plot
Date: Wed, 28 Oct 2009 13:17:28 -0700 (PDT)
Organization: http://groups.google.com
Lines: 32
Message-ID: <ae074e99-c746-4903-9ce2-0ef6d2269a81@o9g2000prg.googlegroups.com>
References: <hc9rej$9fd$1@fred.mathworks.com>
NNTP-Posting-Host: 202.78.152.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1256761048 28408 127.0.0.1 (28 Oct 2009 20:17:28 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 28 Oct 2009 20:17:28 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: o9g2000prg.googlegroups.com; posting-host=202.78.152.105; 
	posting-account=qPexFwkAAABOl8VUndE6Jm-9Z5z_fSpR
User-Agent: G2/1.0
X-HTTP-Via: 1.1 bc6
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) 
	Gecko/20091016 Firefox/3.5.4,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:580754


On Oct 29, 5:28 am, "nanxyzzz zhang" <littledd...@gmail.com> wrote:
>     Hi, everyone, i am new to matlab and I have a question.
>     i want to make a contour plot, the x axis is longitude and the Y axis is the depth.
>     The contour plot that i want to plot is 46*7 array.
>     I created the axis like this:
>
>    axesm('mercator','MapLonLimit',[-78.8 158])
>    depth=[50 70 100 140 190 240]
>
>      But I have no clue what i should do next. I tried to do it like
>
>    contourf(axesm,depth,plot)
>
>    but it does not work......  Can anyone give some clues?
>
>                                  Thank you very much
>                                                 XX

I assume your array is plot(46,7), correct?
This is a VERY BAD choice of variable name because plot is a
frequently-used function in Matlab, so next time you go to use it, you
will be screwed.
Apart from that, there are two reasons why it won't work:
1.  Your depth has only 6 elements, where it should have 7 to match
plot(46,7)
2.  You need to transpose the matrix plot, using plot' so that it has
dimensions 7x46