|
From: Amir S. <ami...@gm...> - 2010-07-29 14:37:31
|
Hi to you all, I am trying to fit some discrete data to a circle and plot the results. I have produced this script ------------------------------------------------------------------------------------------------------------ set terminal wxt enhanced set fit logfile "Y:\\User.ASH\\controllo foratura SM ring\\Pesatura 21_07\\plots\\fitpuntoMED.log" set size square set samples 10000 set grid xtics ytics #fit centers g(x,y) = (x-a)**2 + (y-b)**2 - R**2 a=0.1 b=0.1 R = 1000 fit g(x,y) "Y:\\User.ASH\\controllo foratura SM ring\\Pesatura 21_07\\plots\\puntoMED.txt" using 1:2:(0.001):(0.001) via a, b,R set label 1 "Fitted Circle:\nR = R\nX_C = 0\nY_C = 0" at 390, -0.11, 0.375 plot "Y:\\User.ASH\\controllo foratura SM ring\\Pesatura 21_07\\plots\\puntoMED.txt" title "Median Point (mm)" with points pt 1 lt 7, \ g(x,y) title "Circular fit" show grid ------------------------------------------------------------------------------------------------------------ the fit run smoothly but the plot does not, producing this output: "Y:\User.ASH\controllo foratura SM ring\Pesatura 21_07\plots\fitpuntoMED.p", line 19: undefined variable: y where line 19 is: g(x,y) title "Circular fit" what I am doing wrong? Thank you Amir |