More words about backends

In the first two paragraphs, we have talked much about --math and --text modes. We believe that these two modes (these two backends as we will call them from now on) will be the two more useful ones. But if you ever feel limited by them, you can just write your own and experience the power of ruby. Vince for example wrote two backends (--mdb and --mdbcv) that you would probably never use because they are especially made for his experiments results. Nevertheless, you can take example on them to fit your special needs by for example automaticaly retrieving informations in the headers.

Multitext Backend

My own codes are producing a lot of outputs that I have to split into several files to ease their use. Nevertheless, I would like from time to time to plot one column of one file as a function of a column in another file or even make some mathematical manipulations of columns that don’t live in the same files. So I wrote the multitext backend to do so. The syntax is a bit rigid for now, but it could come useful one day. Basically, you can write things as

 ctioga --multitext '[trig.dat@2]:[trigh.dat@2]' \
        -t "two files in one plot" 

Nice image

The syntax is necessarily of the type [filename@column_number] within square brackets. Sure enough, the files have to have the same number of lines and be somehow related (but this becomes your problem now :o). Any mathematical expression is then possible

 ctioga --multitext '[trig.dat@2]:[trigh.dat@2] + [trig.dat@3]'   \
        -t "Some computation on different files" 

Nice image

 ctioga --multitext '[trig.dat@2]**2:[trigh.dat@2] * [trig.dat@3]'\
        -t "Some more computation on different files" 

Nice image

CSV files

Starting from ctioga 1.3, it is now possible to specify arbitrary column separators for the --text backend. This makes it possible to now parse CSV (comma-separated values) files, such as the trig.csv file included in the archive:

 ctioga --text-separator ';' trig.csv -t "CSV trigonometry" 

Nice image