Re: ContourPlot problem
- To: mathgroup at smc.vnet.net
- Subject: [mg90087] Re: ContourPlot problem
- From: "David Park" <djmpark at comcast.net>
- Date: Sat, 28 Jun 2008 05:53:34 -0400 (EDT)
- References: <g42ere$no5$1@smc.vnet.net>
ContourPlot often requires a specification of the "z" plot range, else Mathematica will select what it thinks is the best PlotRange. This will often be less than you want. So the following will work: ContourPlot[Exp[-x^2 - 2 y^2], {x, -3, 3}, {y, -3, 3}, Contours -> {.1, .2, .3, .4, .5, .6, .7, .8, .9, 1}, ContourLabels -> True, ContourShading -> False, PlotRange -> {0, 1.1}] -- David Park djmpark at comcast.net http://home.comcast.net/~djmpark/ "Jorge Cortes" <jcormon at gmail.com> wrote in message news:g42ere$no5$1 at smc.vnet.net... > Hello, > > I've noticed the following problem with ContourPlot (I'm using > Mathematica 6..0.3) and a simple exponential function. > > If you try the domain {x,-3,3}, {y,-3,3} > > ContourPlot[Exp[-x^2 - 2 y^2], {x, -3,3}, {y, -3, 3}, > Contours -> {.1,.2, .3, .4, .5, .6, .7, .8, .9, 1}, > ContourLabels -> True, ContourShading -> False] > > you only get one contour (the one corresponding to .1). However, if > you shrink the domain to {x,-2,2}, {y,-2,2}, surprisingly you get all > the contours (?) > > ContourPlot[Exp[-x^2 - 2 y^2], {x, -2,2}, {y, -2, 2}, > Contours -> {.1,.2, .3, .4, .5, .6, .7, .8, .9, 1}, > ContourLabels -> True, ContourShading -> False] > > Does anybody has an explanation for this? Thanks! > > - Jorge >