MathGroup Archive 2010

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

Search the Archive

Contour Plot / Plot Range / Contour Scaling

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107859] Contour Plot / Plot Range / Contour Scaling
  • From: m <mbarton27 at gmail.com>
  • Date: Mon, 1 Mar 2010 04:43:11 -0500 (EST)

Hello All,

I apologize if this has been previously answered, but I have searched
through the posts for about an hour and have not found an answer to
this question.

Here is my scenario:

I have a family of contour plots and I have a range of values (z) that
spans the entire family (z from 0 to 1). Some plots will have data in
the full range and some will have only a subset of the range (say from
0 to 0.3). My goal is to to have a consistent contour plot coloring
scheme across all my plots (e.g. 0.5 is yellow on all my plots). It
seems like this should be accomplished through PlotRange, but that is
not the case.

Here is a bit of example code demonstrating my problem (with some
bogus function)

(* For Group *)
ShowLegend[
 ContourPlot[0.3 x y^3, {x, 0, 1}, {y, 0, 1},
  ColorFunction -> "ThermometerColors",
  PlotLabel -> "Temp Dist through slice 1", FrameLabel -> Automatic,
  PlotRange -> {0, 1}, Contours -> 19,
  ContourLabels -> True], {ColorData["ThermometerColors"][1 - #1] &,
  19, "1", "0", LegendPosition -> {0.8, -0.4}}]

So the max value of the function within the range is 0.3. And the
PlotLabel shows values ranging from 0 to 0.3 as expected. Yet the
shaded contours are displaying dark red in the upper right corner,
which is the value associated with 1. I would expect (and have in vain
been trying to get Mathemetica to do this) the upper right contour to
be light blue.

I am using Mathematica 7.0.1.0 (student edition if that matters)

Any help would be much appreciated! Thanks!!


  • Prev by Date: Re: Identity from Erdelyi et al.
  • Next by Date: Re: Problems with ChoiceDialog inside a Dynamic: Bug or not (well)
  • Previous by thread: Distributing "Large" Expressions to Remote Nodes
  • Next by thread: Re: Contour Plot / Plot Range / Contour Scaling