MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

ContourPlot and ContourLabels bug

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85030] ContourPlot and ContourLabels bug
  • From: nigol <dario.buttari at gmail.com>
  • Date: Thu, 24 Jan 2008 04:48:13 -0500 (EST)

I think I found another bug in contourplot.

ContourPlot[x^2 + y^2, {x, -3, 3}, {y, -3, 3},
 Contours -> Join[Range[1, 10], {{5, Dashed}}],
 ContourShading -> False, ContourLabels -> Automatic]

In this example the countour 6 is labeled 5, the contour 7 is labeled
6,...

The root cause is linked to a bug in the way identical contour levels
are handled:

ContourPlot[x^2 + y^2, {x, -3, 3}, {y, -3, 3},
 Contours -> {1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 8, 9, 10},
 ContourShading -> False, ContourLabels -> Automatic]

I can fix the second example with Union:

ContourPlot[x^2 + y^2, {x, -3, 3}, {y, -3, 3},
 Contours -> Union@{1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 8, 9, 10},
 ContourShading -> False, ContourLabels -> Automatic]

I am looking for simple ways to fix the first example.
Thanks,
Dario


  • Prev by Date: Re: 2D Motion..pleaeeee heeeelp
  • Next by Date: OMP warning on Windows machine
  • Previous by thread: Re: 2D Motion..pleaeeee heeeelp
  • Next by thread: OMP warning on Windows machine