Thread Subject: Custom labels to contour plots

Subject: Custom labels to contour plots

From: Sebastiaan

Date: 9 Oct, 2009 13:57:03

Message: 1 of 1

Dear users,

I am trying to assign custom labels to a contour plot. However, when I try to use 'TextList', no labels are assigned at all:

[C,h] = contour(peaks, 3);
clabel(C,h);

nicely gives me the contours and their levels. However, when I try to use different labels:
[C,h] = contour(peaks, 3, 'TextList', [1 2 3]);
clabel(C,h);

no labels are given at all.

Also the alternative:
clabel(C,h, [1 2 3])
gives no labels.

Of course I could go though all the children of clabel and change the label, but I guess there must be something simpler.

Sebastiaan

Tags for this Thread

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.

rssFeed for this Thread

Contact us at files@mathworks.com