Path: news.mathworks.com!not-for-mail
From: "Zijia Li" <triplezzz21@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Contour graph help!
Date: Thu, 3 Jul 2008 13:30:04 +0000 (UTC)
Organization: University of Michigan
Lines: 46
Message-ID: <g4ik8s$lf5$1@fred.mathworks.com>
References: <g4g53m$7mf$1@fred.mathworks.com> <g4ggja$d0o$1@fred.mathworks.com>  <ca9f2103-0970-484d-afed-183e4be30104@w5g2000prd.googlegroups.com>
Reply-To: "Zijia Li" <triplezzz21@gmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1215091804 21989 172.30.248.35 (3 Jul 2008 13:30:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 3 Jul 2008 13:30:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1431276
Xref: news.mathworks.com comp.soft-sys.matlab:477348



NZTideMan <mulgor@gmail.com> wrote in message
<ca9f2103-0970-484d-afed-183e4be30104@w5g2000prd.googlegroups.com>...
> On Jul 3, 7:50=A0am, "Zijia Li" <triplezz...@gmail.com> wrote:
> > Ok
> > So, I when I do contourf(x,y,temp,1000), it makes the graph
> > with 1000 colors, but it has a lot of black lines. So I did
> > contour(x,y,temp,2000). This makes the graph with 2000
> > colors(takes like half and hour to make), which looks really
> > good but the legend has 63 different color blocks with
> > data1-data63 labeled by it. I don't know where it got the 63
> > temperature labels from.
> > What I want is one bar of color transitioning from blue to
> > red labeled 0C on top by blue and 25C on the bottom by
the red.
> >
> > Can I do that on matlab? If so, how?
> 
> This thread has been good fun....
> Don't panic!!  You're almost there.
> Instead of imposing a large number of contours, start by
trying just a
> few - like 26 for example (i.e. 1 deg contour levels).
> contourf(x,y,temp,26)
> This will take less time.  Then once you've got things
working you can
> increase the number of contour levels.
> 
> The reason you saw lots of black lines when you had 2000
contour
> levels is that each contour is marked with a black line. 
You can turn
> this off and have a smooth transition between colours by
specifying:
> shading interp
> 
> I think the 63 colour blocks come from the colormap you
are using.
> You can play with this and get exactly the range of
colours you want.
> Type help colormap to see the details of how to do it.

Thanks
But "Shading interp" gives me "warning:color data is not set
for interpolated shading" and it doesn't graph anything(the
graph is blank) 
Any help?