Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3590
| Newsgroups | comp.graphics.apps.gnuplot |
|---|---|
| Date | 2017-03-24 03:01 -0700 |
| References | <1d68425b-6a98-4762-8f7a-3091b9198947@googlegroups.com> |
| Message-ID | <9ff689bb-3cb6-4b40-be9e-3411d86743dd@googlegroups.com> (permalink) |
| Subject | Re: gnuplot (fitting of ellipse) |
| From | vineeth25396@gmail.com |
I have also tried a sample code with x and y values in pnts.dat but I get nan during my fit command and in the end after the plot command I get warning: skipping data file with no valid points. Below are the x y values in pnts.dat
-2.000000 -0.005494
-1.789474 -0.410310
-1.578947 -0.616013
-1.368421 0.760577
-1.157895 0.695609
-0.947368 0.921957
-0.736842 -0.882355
-0.526316 -1.031450
-0.315789 -0.910362
-0.105263 -0.986339
0.105263 -0.897862
0.315789 -1.059766
0.526316 -1.007012
0.736842 0.910494
0.947368 -0.878432
1.157895 0.823232
1.368421 0.831900
1.578947 -0.662069
1.789474 0.427903
2.000000 -0.001474
f(x, y) = x*x + b*x*y + c*y*y + d*x + e*y + f
fit f(x, y) 'pnts.dat' u 1:2:(0) via b,c,d,e,f
set contour
set view map
unset surface
set cntrparam levels discrete 0
set isosamples 1000,1000
set table 'contour.dat'
splot f(x, y)
unset table
unset contour
set terminal pngcairo enhanced
set output 'fig.png'
set xr [-3:3]
set yr [-3:3]
set size square
plot \
'contour.dat' u 1:2 w l lw 2 lc rgb 'red', \
'pnts.dat' u 1:2 w p ps 1.5 lc rgb 'black'
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
gnuplot (fitting of ellipse) vineeth25396@gmail.com - 2017-03-24 02:24 -0700
Re: gnuplot (fitting of ellipse) vineeth25396@gmail.com - 2017-03-24 03:01 -0700
Re: gnuplot (fitting of ellipse) Karl Ratzsch <mail.kfr@gmx.net> - 2017-03-24 12:25 +0100
Re: gnuplot (fitting of ellipse) vineeth25396@gmail.com - 2017-03-24 17:55 -0700
Re: gnuplot (fitting of ellipse) Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2017-03-25 14:22 +0100
Re: gnuplot (fitting of ellipse) Karl Ratzsch <mail.kfr@gmx.net> - 2017-03-24 11:28 +0100
csiph-web