Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2503 > unrolled thread

question about plotting

Started byKrzysztof Kutak <krzysztof.kutak@googlemail.com>
First post2011-05-20 10:36 +0000
Last post2011-05-21 10:51 +0000
Articles 3 — 3 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  question about plotting Krzysztof Kutak <krzysztof.kutak@googlemail.com> - 2011-05-20 10:36 +0000
    Re: question about plotting Peter Pein <petsie@dordos.net> - 2011-05-21 10:49 +0000
    Re: question about plotting Peter Breitfeld <phbrf@t-online.de> - 2011-05-21 10:51 +0000

#2503 — question about plotting

FromKrzysztof Kutak <krzysztof.kutak@googlemail.com>
Date2011-05-20 10:36 +0000
Subjectquestion about plotting
Message-ID<ir5g7j$t0l$1@smc.vnet.net>
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

[toc] | [next] | [standalone]


#2574

FromPeter Pein <petsie@dordos.net>
Date2011-05-21 10:49 +0000
Message-ID<ir85ce$bi7$1@smc.vnet.net>
In reply to#2503
Am 20.05.2011 12:36, schrieb Krzysztof Kutak:
> 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
> 

sth. like
data=Table[4x(1-x)+RandomReal[{-.05,.05}],{x,0,1,1/10}];
lp=ListPlot[data,DataRange->{0,1},PlotStyle->Red];
pl=Plot[4x(1-x),{x,0,1}];
Show[pl,lp]
?

If you've got only the ordinates, be sure to define the range of abcissa
by use of DataRange.

hth,
Peter

[toc] | [prev] | [next] | [standalone]


#2581

FromPeter Breitfeld <phbrf@t-online.de>
Date2011-05-21 10:51 +0000
Message-ID<ir85eo$bk5$1@smc.vnet.net>
In reply to#2503
Krzysztof Kutak 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
>

Use Epilog:

punkte=RandomReal[{0,5},20]//Sort
pkt=Transpose[{Range[Length@punkte],punkte}]
fit=Fit[pkt,{1,x,x^2,x^3},x]
Plot[fit,{x,1,Length@pkt},Epilog->Point[pkt]]

-- 
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web