Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11196

Re: ListContourPlot

From Bill Rowe <readnews@sbcglobal.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: ListContourPlot
Date 2012-08-04 10:02 +0000
Message-ID <jvirv3$2th$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


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

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

>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

ListContourPlot[data]

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

Doing

ListPlot3D[data]

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

ListDensityPlot[data]

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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: ListContourPlot Bill Rowe <readnews@sbcglobal.net> - 2012-08-04 10:02 +0000

csiph-web