[Veusz-discuss] linear fit
Hello everybody, I checked Veusz linear fit against a certified data set coming from NIST: Statistical Reference Datasets http://www.itl.nist.gov/div898/strd/ . In particular, the first one I used was the Norris dataset you could find here: http://www.itl.nist.gov/div898/strd/lls/data/Norris.shtml . Maybe I did something weird and stupid but the line fit does not look like the data plot and coefficients are pretty different from certified ones. I checked the dataset against gnuplot, gnumeric, extrema, labplot, SSP, PSPP, ... and the fit looks allright with them. Bye _Antonio ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss
Re: [Veusz-discuss] line length
On 30/04/12 17:00, Daniele Paganelli wrote: Hi, I have a problem adjusting the length of a vertical line in Veusz, for which I need a relative positioning towards x axis. That line works as a position indicator on the plot, and should go from the x axis y-position up to the end of the y-axis (se attachment). So I create a line with a 270 angle and relative positioning towards x, y axis. The problem is that the length of that line is always calculated as a fractional length of the graph width. In order to obtain a vertical line going from origin y up to maximum y value, I would have to get height and width of the graph, Ly, Lx and set the length of the line to L=Ly/Lx. Lx and Ly are calculated subtracting to the plot width and height the left+right and up+bottom margins, which, in case they are expressed in different units, may require a bit of parsing and conversion I think. It seems unnecessarily difficult... isn't there a more direct way which I'm missing? It's not a great API is it? Maybe we need an alternative form for the line for doing x1,y1 - x2,y2 in axis and/or fractional coordinates. However, a workaround is to set the line to be longer than you need and set the clip property to be True. This is only in the development version, however. Another idea is to use a function for doing the plotting of the line. Plot the function x=const. Jeremy ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss
Re: [Veusz-discuss] linear fit
On Mon, April 30, 2012 13:10, Jeremy Sanders wrote: On 28/04/12 11:48, Antonio wrote: Hello everybody, I checked Veusz linear fit against a certified data set coming from NIST: Statistical Reference Datasets http://www.itl.nist.gov/div898/strd/ . In particular, the first one I used was the Norris dataset you could find here: http://www.itl.nist.gov/div898/strd/lls/data/Norris.shtml . Maybe I did something weird and stupid but the line fit does not look like the data plot and coefficients are pretty different from certified ones. I checked the dataset against gnuplot, gnumeric, extrema, labplot, SSP, PSPP, ... and the fit looks allright with them. Thanks - I didn't get the line to fit initially, but that appears to be because it doesn't have any uncertainties associated with it. Veusz assumes 5% errors if there are no uncertainties, which doesn't work in some cases with the minimisation procedure. Probably because the 5% errors give lots of weight to the values near zero. I haven't tested whether pyminuit does a better job (veusz supports this as an optional fitting module). I loaded your test.vsz in a pyminuit build and get similar results to you: the fit is very strange if I include the points near zero with relative error bars, but works fine using either the fixed uncertainties data set or if I just exclude the points with x 1. So I agree that this is indeed related to the default assumed 5% uncertainty. Regards, -- BKS ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss