MathGroup Archive 1998

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

Search the Archive

Re: Can you solve this?



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.



  • Prev by Date: Re: Wish list for next version
  • Next by Date: Re: SUBSCRIPT WITHIN EXPRESSIONS
  • Prev by thread: Can you solve this?
  • Next by thread: Running in background