Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1995
*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 1995

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

Search the Archive

Re: Extracting data points from Plot[]

  • To: mathgroup at christensen.cybernetics.net
  • Subject: [mg822] Re: [mg773] Extracting data points from Plot[]
  • From: tiggj at iswaps.lonnds.ml.com (Jason Tigg SWAP GROUP ANALYST X2312 LDN)
  • Date: Mon, 24 Apr 1995 02:46:09 -0400

J. Gruyer wrote

> The Plot[] function does some intelligent picking of points, such that it
> usually does a pretty good job of following twists and turns in a function
> without plotting an excessive number of points. I'm not ecstatic about
> using Mma for final output, though, so I like to export these curves to a
> graphing program.
>
> So far, I haven't been able to figure out any way to get at this
> point-picking algorithm without using Plot[]. What I'm then left with is
> doing:


Here's a trick which I picked up at a Mathematica conference.

In[1] := data = {};
	 f[x_] := x^2;
	 Plot[ AppendTo[data, {x,f[x]}]; f[x], {x,0,2},
	       DisplayFunction -> Identity];
	 data // Short

Out[4] = {{0,0},{0.0833333, 0.00694444}, <<37>>, {2,4}}

This method can be used to investigate where FindMinimum samples a function
in its search for a minimum.



Jason Tigg


  • Prev by Date: Re: Extracting data points from Plot[]
  • Next by Date: PowerExpand/InverseTrig snafu
  • Previous by thread: Re: Extracting data points from Plot[]
  • Next by thread: Re: Extracting data points from Plot[]