Re: ContourLabel placement

*To*: mathgroup at smc.vnet.net*Subject*: [mg83981] Re: ContourLabel placement*From*: "David Park" <djmpark at comcast.net>*Date*: Thu, 6 Dec 2007 02:40:37 -0500 (EST)*References*: <fj37kk$huc$1@smc.vnet.net>

Mark, The following statement, in the Presentations package, labels the contours near the center of each line. DrawLineLabels gives some control over where on the contour lines the labels will be placed and it also allows a selected subset of the lines to be labeled. (Sometimes labeling all of the lines gets cluttered.) Needs["Presentations`Master`"] With[ {f = Function[{p, q}, Log[((-1 + p)*q)/(p*(-1 + q))]/Log[2]]}, Draw2D[ {g = ContourDraw[f[p, q], {p, 0, 1}, {q, 0, 1}, Contours -> Range[-7, 7], PlotPoints -> Automatic, ContourShading -> False], g // DrawLineLabels[f, 0.5 &, 0.05, Range[-7, 7], DrawLLTextOptions -> {Background -> HTML@Linen}]}, Frame -> True, ImageSize -> 400] ] -- David Park djmpark at comcast.net http://home.comcast.net/~djmpark/ "Mark Fisher" <particlefilter at gmail.com> wrote in message news:fj37kk$huc$1 at smc.vnet.net... > Hi all, > > The documentation for ContourLabels says "The positions of contour > labels are determined automatically to optimize readability." But that > doesn't seem to be the case with this plot: > > ContourPlot[Log[((-1 + p)*q)/(p*(-1 + q))]/Log[2], > {p, 0, 1}, {q, 0, 1}, Contours -> Range[-7, 7], > PlotPoints -> Automatic, ContourShading -> False, > ContourLabels -> Automatic] > > Does this count as a bug? > > Of course, I can place labels by hand. > > --Mark. > > PS, I'm using "6.0 for Microsoft Windows (32-bit) (June 19, 2007)". >