Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: Saving plotted data as ASCII text data ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg21923] Re: [mg21890] Saving plotted data as ASCII text data ?
  • From: "Tomas Garza" <tgarza at mail.internet.com.mx>
  • Date: Fri, 4 Feb 2000 02:54:50 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Udo Huebner [udo.huebner at ptb.de] wrote:

> I need to manipulate plotted data in other programs, i.e. the curve data
> as
> numerical data. OpenWrite["file"] and Write[...] could make the output,
> I think, but how to get the data of the curves itself which I could
> "Write"?
>
> Sorry, if my question is naive but I am not very skilled in Mathematica
> and I hope for help.

If I understand correctly, you want the curve data from a plot in a
Mathematica notebook. Ask for FullForm of the plot and it will give you,
among other things, the points or lines used to construct the curve. Check
then if it is Lines or Points what you want, and obtain them using Cases.
For example, suppose you have

In[1]:=
c = Plot[Sin[x],{x,0,Pi/2}]

Then, try

In[2]:=
FullForm[c]

I omit the output which is rather lengthy, but you will see there the
graphics primitives and options used by Mathematica to draw the curve. What
it actually says is "draw a series of line segments through the given
points". If now you write

In[3]:=
Cases[c,List[x_,y_],Infinity]

you will get the points presumably you need.

Tomas Garza
Mexico City



  • Prev by Date: Re: assumptions question
  • Next by Date: Re: image 2-d Fouriertransform ?
  • Previous by thread: Saving plotted data as ASCII text data ?
  • Next by thread: Re: Saving plotted data as ASCII text data ?