Thread Subject: Disappearing contour labels

Subject: Disappearing contour labels

From: Jana Houser

Date: 24 Nov, 2009 20:07:05

Message: 1 of 1

Hi all you cyber Matlabers,

I have a question. I'm trying to generate a plot that has a colored scalar field with vectors and contours over it. I'm using the pcolor and contour functions. The plot is coming out fine, but my contour labels are not showing up, even when I try using the 'manual' option. Here's my code:

[X,Y]=meshgrid(0:0.5:50,0:0.5:12);

%Specify the values w will be contoured at
ContPos=[0;5;10;20];
ContNeg=[-20;-10;-5];

figure(1)
pcolor(X,Y,Reflectivity1)
shading flat
caxis([0, 55])
colorbar
xlabel('Y km (N/S) 1 grid point = 500 m')
ylabel('Height 1 grid point =500 m')
title('Vertical x-section: Reflectivity with vertical velocity contours')
hold on
quiver(X(1:25,1:4:101),Y(1:25,1:4:101),UY1(1:25,1:4:101),WY1(1:25,1:4:101), 2, 'k')
[C1,h1]=contour(X,Y,WY1,ContPos,'k');
clabel(C1,h1,'LabelSpacing',288);
[C2,h2]=contour(X,Y,WY1,ContNeg,'--k');
clabel(C2,h2,'LabelSpacing',288);
hold off;

Any ideas? Thanks so much!

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
contour labels Jana Houser 24 Nov, 2009 15:09:08
rssFeed for this Thread

Contact us at files@mathworks.com