Re: noob questions :)
- To: mathgroup at smc.vnet.net
- Subject: [mg87374] Re: noob questions :)
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Wed, 9 Apr 2008 05:53:02 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <ftfegg$bsg$1@smc.vnet.net>
markus.mooslechner at chello.at wrote:
> hi everyone!
>
> first of all i would like to introduce myself. being an artist i am mainly engaged in the visualization of chaotic systems such as iterated function systems or strange attractors from experimental data. i consider myself a completely mathematica noob (willing to learn ::)) i got introduced to mathematica by a friend who works in the math institute at our local university (hence, that's where i spent most of my recent time ... lol). to get myself started with the project i have in mind i could use some help, which i have not found in the databases yet:
>
> - how can i tell mathematica to import a three-column (x,y,z) txt file and do a 3d plot from the values. i already messed with the ListPlot3D command , unfortunately to no avail. the file containing the experimental data looks something like this:
> point,x,y,z
> 1,34,21,45
> 2,32,53,76
> 3,12,23,43
> 4,45,21,87
> 5,65,76,87
> etc
Say that you have imported (Import[...]) your experimental data into the
variable impt.
impt
{{1, 34, 21, 45}, {2, 32, 53, 76}, {3, 12, 23, 43},
{4, 45, 21, 87}, {5, 65, 76, 87}}
Since the first column of the matrix (or the first entry of each
quadruple if you want) contains only a line number, we can safely
discard it to keep only the {x, y, z} values.
data = impt[[All, 2 ;; 4]]
{{34, 21, 45}, {32, 53, 76}, {12, 23, 43},
{45, 21, 87}, {65, 76, 87}}
We can, now, use ListPlot3D.
ListPlot3D[data]
> - how can i then tell mathematica to color certain values from this data list with a color from my choice? eg: color the values X "red" (X could be something like the mean value of the entire list)
You could use option such as *Epilog*.
<snip>
Regards,
-- Jean-Marc