MathGroup Archive 2003

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

Search the Archive

Re: contour plotting over a non-uniform grid

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43021] Re: contour plotting over a non-uniform grid
  • From: "Steve Luttrell" <luttrell at _removemefirst_westmal.demon.co.uk>
  • Date: Fri, 8 Aug 2003 00:26:35 -0400 (EDT)
  • References: <bgsnc6$nou$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

As a general rule you should convert tabulated data to an
InterpolatingFunction object before generating a contour plot. In your case
you could do this:

interp = Interpolation[data];
ContourPlot[interp[x, y], {x, 0, 1}, {y, 0, 1}];

You can use the various options for ContourPlot to makle the plot look
prettier.

--
Steve Luttrell
West Malvern, UK

"Sabatke, Erin" <esabatke at ball.com> wrote in message
news:bgsnc6$nou$1 at smc.vnet.net...
> I would like to be able to make contour plots out of data that is a list
of {x,y,z} values, rather than the standard method that assumes a grid of
{x,y} points that is uniform and accepts only an array of z-values.  So far,
I've only been able to get a "spotted" contour plot:
>
> << Graphics`Graphics3D`
> data = Flatten[Table[{a, b, a*b}, {a, 0, 1, 0.1}, {b, 0, 1, 0.1}], 1];
> gr1 = ScatterPlot3D[data, PlotStyle -> {AbsolutePointSize[25]},
ViewPoint -> {0.000, 0.000, -1000.000}, Axes -> False, Boxed -> False,
DisplayFunction -> Identity];
> Show[gr1 /. {Point[{x_, y_, z_}] -> {Hue[0.7*z], Point[{x, y, z}]}},
DisplayFunction -> $DisplayFunction];
>
> It works, but I don't think it looks very nice.  Does anyone know how to
get a nicer/traditional contour plot out of a list of {x,y,z} values?
>
>
> esabatke at ball.com
>



  • Prev by Date: Re: New options in 5.0
  • Next by Date: Re: goldbach prime partitions for arbitrary integer n => 4
  • Previous by thread: contour plotting over a non-uniform grid
  • Next by thread: RE: Re: contour plotting over a non-uniform grid