edit text on contour plot

Hi I have a contour plot with two sets of contour lines and the label of the value on each of the contour lines. does anyone know how to edit these labels as I want to add the unit of each value? For some reason when I manually edit the plot I can only do this for one set of contours not the second set.
thank you

回答 (1 件)

dpb
dpb 2013 年 9 月 29 日

0 投票

Use the return value functional form
[C, H] = contour(...) returns contour matrix C as described in
CONTOURC and a handle H to a contourgroup object. This handle can
be used as input to CLABEL.

3 件のコメント

Andrew Alkiviades
Andrew Alkiviades 2013 年 9 月 29 日
thanks so that means
A = contour(cost)
h = ['test1','test2','test3']
clabel(A,h,'FontSize',15,'LabelSpacing',3000)
?
dpb
dpb 2013 年 9 月 29 日
No, the handle referred to is the optional second return value H which you didn't return...you returned the contour matrix C in A
Andrew Alkiviades
Andrew Alkiviades 2013 年 9 月 29 日
thanks im not sure i follow (im new to this!) didnt I return the text strings in "h" with: clabel(A,h...)? if not how do i do that?

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeContour Plots についてさらに検索

質問済み:

2013 年 9 月 29 日

コメント済み:

2013 年 9 月 29 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by