Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2012

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

Search the Archive

Re: ListContourPlot

  • To: mathgroup at
  • Subject: [mg127557] Re: ListContourPlot
  • From: Bill Rowe <readnews at>
  • Date: Sat, 4 Aug 2012 06:00:06 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:

On 8/3/12 at 4:16 AM, nkormanik at (Nicholas Kormanik) wrote:

>I've been attempting to create a contour plot within Mathematica

>In case the files do not make it through to you, the data file is an
>Excel .xls file with three columns, X,Y,Z.  Z in the contour plot
>would be shown by contours or a gradient of colors.

>The key sticking points are to get the data into Mathematica, and then to
>create the plot.

Loading the data into Mathematica can be done using Import.
Assuming the data file is on your desktop, the following will
read the data into Mathematica

SetDirectory@ToFileName[$HomeDirectory, "Desktop"];
data = Import["20201_23405_50502.xls", "XLS"][[1]];

The first line simply sets the working directory to the
directory containing the data file. The second imports the data
to Mathematica. The [[1]] at the end selects the first worksheet
in the spread sheet.

Once the data is imported, a contour plot can be made by simply doing


However, this does not create a plot that looks anything like
what you showed as the result of plotting this data in another program.



shows your data seems to be a background surface with random spikes


confirms that the impression given by ListPlot3D and might be
the most useful way to look at this data set.

  • Prev by Date: Re: Evaluation of boolean functions in Mathematica 8
  • Next by Date: Electric potential and interface @y=0
  • Previous by thread: ListContourPlot
  • Next by thread: Strange runtime error in Compiled function