MathGroup Archive 2011

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

Search the Archive

Re: question about plotting

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119095] Re: question about plotting
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sat, 21 May 2011 06:51:00 -0400 (EDT)

Clear[a, b, c, x]

data = Table[{x, 3 x^2 - 5 x + 7 + 10*RandomReal[]}, {x, 0, 5, .1}];

f[x_] = Fit[data, {1, x, x^2}, x];

Plot[f[x], {x, 0, 5}, Epilog -> {Red, Point[data]}]

Show[ListPlot[data, PlotStyle -> Red], Plot[f[x], {x, 0, 5}]]


Bob Hanlon

---- Krzysztof Kutak <krzysztof.kutak at googlemail.com> wrote: 

=============
Hello,
I would like to combine plot od datapoints in one dimension(for this I
use ListPlot[data]) with fitted function ( f[r] ). Do you know how to
do this?

Best wishes
Krzysztof



  • Prev by Date: how do I plot many points?
  • Next by Date: Re: Question about DurbinWatsonD
  • Previous by thread: Re: question about plotting
  • Next by thread: Re: question about plotting