The QtiPlot Handbook
Prev | Chapter 5. The Dialogs | Next

# Set Column Values

This dialog is activated by the Set Column Values... command of the Table menu. It allows to fill a column with the result of a function.

The available mathematical functions (assuming you are using the default scripting language, muParser) are listed in the appendix. The special function col(x) can be used to access to the values of the column x, where x can be the column's number (as in col(2)) or its name in doublequotes (as in col("time")). You can also get values from other tables using the function tablecol(t,c), where t is the table's name in doublequotes and c is the column's number or name in doublequotes (example: tablecol("Table1","time")).

The variables i and j can be used to access the current row and column numbers. Similarly, sr and er represent the selected start and end row, respectively.

Using Python as scripting language gives you even more possibilities, since you can not only use arbitrary Python code in the function body, but also access other objects within your project. For details, see here. Nevertheless, even if Python allows for a more powerfull synthax, it can be quite slow for very large tables. Therefore you have the possibility to use muParser instead, even if Python is set as the default script engine for your current project, by checking the box Use built-in muParser. Using muParser as scripting engine higly increases the speed of the evaluation for single line expressions.

Figure 5-61. The Set Column Values... dialog.

Warning: If you make some changes in the table, the values are not computed again, unless you check the Automatically Recalculate Column Values option in the Tables tab of the Preferences dialog. If this option is unchecked you have to explicitly tell QtiPlot to recalculate individual cells or whole columns or rows by selecting "Recalculate" from their context menu or by pressing Control+Return.

Prev | Home | Next
Printer-setup | Up | Set Matrix Dimensions