Re: Can you solve this?
- To: mathgroup@smc.vnet.net
- Subject: [mg10991] Re: [mg10951] Can you solve this?
- From: seanross@worldnet.att.net
- Date: Mon, 16 Feb 1998 03:39:58 -0500
- References: <199802140553.AAA01206@smc.vnet.net.>
Jack Matthews wrote:
>
> I am new to mathematica 3.0. We are using win95, and would like to
> import a series of data points(a .csv file), then draw a curve that
> represents these points (sort of a bell shaped curve). Then we would
> like to superimpose another plot that represented the target curve.
> Heres the tricky part, we then would like to color the plot surface and
> have the plot change colors where the two plots disagree ( a delta
> between the plotted values). Any ideas? Thanks in advance.
>
> --
> Numbers are just numbers until the engineers get ahold of them. Best
> Regards from: Jack Matthews
ReadList usually works well for reading comma spaced value files. You
may need to modify the default options for what constitutes a space
recordseparator. ReadList also works better if you know the number of
columns in your input file and use something like:
ReadList["c:\mydatafile.csv",{Number,Number,Number}]
if you know there are three columns.
Putting two plots together on the same graph can be done with
Show[graph1,graph2]
The shading/coloring can be done with ListPlot3D[array,shades] The
second list contains color specifications. Unfortunately, the 2-D
version of this function, ListPlot, does not have that option as far as
I know. The brute force way to put colored points or lines on a graph
is to use graphics primitives like
Show[graph1,graph2,Graphics[{Hue[.4],Point[{1,2}]}]]
This code would show graph1 and graph2, previously defined and plotted
somewhere on the same curve, with a green dot at the coordinates {1,2}
A thorough reading of the mathematica book, section 2.9 on graphics will
give you some more ideas.
--
Remove the _nospam_ in the return address to respond.
- References:
- Can you solve this?
- From: "Jack Matthews" <jack_jik@msn.com>
- Can you solve this?