MathGroup Archive 1994

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

Search the Archive

Re: (1) ContourPlot (absolute maximum) and (2) BarChart3D

  • To: MATHGROUP at
  • Subject: Re: (1) ContourPlot (absolute maximum) and (2) BarChart3D
  • From: twj (Tom Wickham-Jones)
  • Date: Thu, 31 Mar 1994 08:29:47 -0600

ken yip writes.

>(1) The default of ContourPlot is to shade the contours relative to the
>maximum and minimum height of the points plotted.  Is there a way
>to specify an explicit maximum or minimum?  The context I am using
>this is as follows.  I am drawing multiple contour plots and I want
>the same maximum to apply to all the plots so that the same
>color always mean the same height in all the plots.

1) Question.    

	How to see the same contours used on all plots?

2) Background.

The actual contour values are determined by the Contours and PlotRange 


If Contours is set to a list of numbers these are used for
the contours.  Only contours that are inside the vertical
PlotRange are shown.

If Contours is set to an integer the values used are calculated
from the vertical PlotRange by the computation:

FindContours[ n_Integer /; n > 0, {z1_, z2_}] :=
	zinc = (z2 - z1)/ (n + 1) ;
	Table[ i, {i, z1 + zinc, z2 - zinc, zinc}]

where n is the Contours setting, and z1 and z2 are the vertical PlotRange.

3) Summary

To see the same contours on a sequence of plots set Contours to be the
same integer or list of numbers and set the vertical PlotRange to be 

the same pair of numbers.

c1 = 

 ContourPlot[ x y, {x,-2,2}, {y,-2,2}, Contours -> 10, PlotRange -> {-8,8}]

c2 =
 ContourPlot[ x y, {x, 2,4}, {y,-2,2}, Contours -> 10, PlotRange -> {-8,8}]

Then Show[ c1, c2] will confirm that the contours do indeed line up. 

Tom Wickham-Jones

  • Prev by Date: problem
  • Next by Date: Re: (1) ContourPlot (absolute maximum) and (2) BarChart3D
  • Previous by thread: (1) ContourPlot (absolute maximum) and (2) BarChart3D
  • Next by thread: Re: (1) ContourPlot (absolute maximum) and (2) BarChart3D