Hi, This is not possible with the various contour options currently available in ROOT. If you do not have too many bins, an automatic way would be to redraw the histogram on top of the contour with the option "TEXT SAME". Otherwise you are right you will have to place them by hand. This can be implemented in THistPainter::PaintContour but it is not a trivial thing to do if you want to have nice plots (number of labels, size, orientation etc ..). Cheers, Olivier Couet On Wed, 30 Jul 2003, Alexander Wagner wrote: > Hi! > > Is there any possiblity to label the contour lines used by > root? > > Consider a TH2F plotted with cont3 and some userdefined > (pretty complex looking) contour levels. Now I want to > attach some label to the lines to distinguish them. The > simple idea to just use cont2 to get different line styles > doesn't work out as each line needs to many points to get > distingishable contour levels. A simple example everybody > probably knows is some sort of temperature chart for a > region where you place labels with the temperature between > two contour lines. > > Is there an elegant way to tell root to label this or do I > have to place the labels by hand? > > (Currently I'm running root 3.02-7 as there is a bug in 3.04 > if you want non-equidistant contour levels.) > > -- Org: CERN - European Laboratory for Particle Physics. Mail: 1211 Geneve 23 - Switzerland Mailbox: J25910 E-Mail: Olivier.Couet@cern.ch Phone: +41 22 7676522 WWW: http://cern.ch/Olivier.Couet/ Fax: +41 22 7677155
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET