MathGroup Archive 2003

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

Search the Archive

Data Plotting With Less Typing

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45327] Data Plotting With Less Typing
  • From: Steve Eichblatt <steveeichblatt at yahoo.com>
  • Date: Tue, 30 Dec 2003 04:14:33 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I am fairly new to Mathematica, and brand new to newsgroups.

I love alot of the features of Mathematica, but some features seem 
sorely missing, and I wonder if i am just not finding them.

In particular, for plotting data there seems to be too much typing 
involved. I have a data table that is imported from a CSV file or 
retrieved with the Database Access Kit and I want to make some plots.

My data looks like this

{{"a", "b", "c1", "c2", "d"},
{1.64657, 3.11775, 4.4374, 8.93891, 1.19198},
{5.5366,  3.5689, 1.32583, 2.6293, 2.38973},
{9.03042, 9.87567, 4.34064, 8.09357, 3.44279},
{5.43228, 4.7836, 8.12985, 3.94991, 2.15411},
etc.
}

Where the first element contains the column headers and the rest is the 
data. Now i want to plot a histogram of, say, Sin[a/b]+c1 where d>c2 or 
some crazy thing.

The only way i have found to do this is along the lines of 
psn=Position[data,_?(#[[5]]>#[[4]]&)];
and more stuff with lots of data[[psn,1]] and data[[psn,2]]
in it, which isn't easy to type or to read.

I wrote a very simple package to reduce the required typing by using 
StringReplace alot. It would require a command like:

ntPlot[data,"Sin[a/b]+c1","d>c2"];

I'm pretty happy with my package, but it has a few difficult flaws. 
Before i try to fix them, I would like to know if there is already a 
better way to do it.

Thanks in advance,

Steve Eichblatt


  • Prev by Date: RE: colorfunction with scatterplot3d?
  • Next by Date: Re: Compile
  • Previous by thread: Mathematica 5.0 "RunThrough" Command
  • Next by thread: Re: Data Plotting With Less Typing