Sunday, June 23, 2013

Kartesio: best fit curves with experimental points

I finally had the time to build a simple website for Kartesio. This is a program I wrote about two years ago for my phisycal chemistry laboratory: I needed to calculate best fit curves for some experimental points I got from the refractometer and the regression algorithms available in the common office suites were not so good. But I also wanted something really simple: why sould I use "R" if I just want to best fit some points? So I decided to create a program which does this operation and only this one, but does it well. Kartesio is able to best fit curves using a regression algorithm or a neural network.

This is the website:
there is also the official handbook: so if you need some help to figure out how the program works you should find all the answers there.

If you use a Debian system you can install Kartesio from this package: If you want a Rpm package here it is:
You can also get the latest source code from git:
git clone

It is also needed to install ZorbaNeural (which is another project of mine, a neural network library). You can find packages here:
To make the regression algorithm work Maxima is needed: I'm sure you can find it in your distro's repository.

If you have some trouble you can obiously write me, but please be sure that you have followed the guide  before (for installation and use of the program).

The program is very simple, but it works fine. There are a few thing I will work on in the next months for Kartesio:
-Add a window for editing points table (sort Xaxis, import and export from/to CSV, add or remove lines to/from the table)
-Button for automatically fitting plot to experimental points (calculating xmin-max and ymin-max)
-Use a QtTemporaryFile instead of a prefixed temporary file.
-Check at program loading if maxima is correctly installed
-Change the layout, so the user can reduce the area covered by the table
-Try to use a library for algorithm regression instead of maxima executable


  1. What happens when you Export to TeX. Do you use PGF/TikZ? Also, exporting to SVG, do you use QSvgGenerator?

    1. LaTex plot and the SVG one are written directly by Kartesio, without using other libraries functions. In fact, they are only plots (a group of lines drawn by some points) so it's really easy to to that just knowing the syntax of a .tex or .svg file. Using a library to do that would be, in my opinion, much more complex.