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


Groups > comp.graphics.apps.gnuplot > #3592

Re: gnuplot (fitting of ellipse)

Path csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Karl Ratzsch <mail.kfr@gmx.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: gnuplot (fitting of ellipse)
Date Fri, 24 Mar 2017 12:25:07 +0100
Organization solani.org
Lines 51
Message-ID <ob2vmq$sqq$1@solani.org> (permalink)
References <1d68425b-6a98-4762-8f7a-3091b9198947@googlegroups.com> <9ff689bb-3cb6-4b40-be9e-3411d86743dd@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace solani.org 1490354714 29530 eJwFwYEBwCAIA7CXqECp58iU/09Ykk7wq2AycnL6LtVzxkpSWHZ0C9oATDte47i3DX3aZf0D/AsQCQ== (24 Mar 2017 11:25:14 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Fri, 24 Mar 2017 11:25:14 +0000 (UTC)
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
Cancel-Lock sha1:5YX24xNNfdcbaPE+3Qwy4BZOk+A=
In-Reply-To <9ff689bb-3cb6-4b40-be9e-3411d86743dd@googlegroups.com>
X-User-ID eJwFwYEBwDAEBMCVyHtkHKr2HyF3hKt/YU43Ljf0F6iMrYfm+oGiwajGZA+l8vQ9dYdV1HoG8BC7
X-NNTP-Posting-Host eJwNysEBwCAIA8CVNJIg4yDK/iO09z4uTZWbKGOzT42zjIkBPcdNizfjbd8BxT/rnlSiwGiiPxgOEQs=
Xref csiph.com comp.graphics.apps.gnuplot:3592

Show key headers only | View raw


Am 24.03.2017 um 11:01 schrieb 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

Works perfectly even if you only initialise the variables to 1

$dat << EOD
-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
EOD

f(x, y) = x*x + b*x*y + c*y*y + d*x + e*y + f
b=c=d=e=f=1
fit f(x, y) $dat u 1:2:(0) via b,c,d,e,f
splot f(x,y), $dat us 1:2:(0)

But your formula still does not describe an ellipse.

f(x,y) = 0 does, which is what you fitted, and your want from the
contour plot.

 set contour both
 set cntrparam levels discrete 0
 set xr[-3:3]; set yr[-3:3]
 splot f(x,y), $dat us 1:2:(0)








Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

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