Text options

This dialog can be opened using several different commands, such as the Title... command, or simply by double clicking on an axis title in your plot. The Color, Font and Alignment commands allow the modification of the general settings of the text label. You can also specify the distance between the label and the corresponding axis, using the Distance to axis box.

Figure 5-171. The axis title options dialog.

It is worth knowing that some HTML tags and ASCII codes are understood by QtiPlot, therefore you can use them in order to display special symbols or get fancy color effects, like in the examples bellow. Please note that the font HTML tag also accepts colors in the #RRGGBB notation:

<font color = #ff7300>&#9728;</font> Sunshine
<font color=red>red</font><font color=#00ff00>green</font><font color=blue>blue</font>
<span style='font-family:Symbol'>t</span><sub>sat</sub>

Clicking on the button opens a dialog allowing to add a HTML font tag by selecting the desired custom RGB color from a color grid.

The following slightly modified dialog is opened when you double click on texts/legends in your plot in order to customize them. It also allows adding text boxes to a plot layer. When the text object is a legend (a listing of the curves plotted on the layer) the curve symbols and lines are also drawn in the text box, in front of the curve names. In order to display the symbol of a curve and the name of the data set, the following syntax is used: \l(1.2)%(1.2). In this example the first integer before the dot is the index of the plot layer and the second value, the number 2, refers to the index of the curve. The index of the layer is optional, if not specified, the parent layer is used.

Figure 5-172. The legend/text options dialog.

The % character is an alias for the name of the data set. By adding ",@C" or ",@L" to the number you can alternatively use the name or comment of the dataset, e.g. \l(2)%(2,@C) will use the column name. Additionally, you can use "@W" to display the table name and "@WL" for the table label. To display the contents of a specific cell of the source data table use %(curve #,@L,col,row). If the col parameter is missing the y-column of the dataset is used.

It is possible to display the contents of a specific cell in a table or matrix window using the folowing syntax: %(name,col,row), where name is the name of the window.

In order to define custom colors for different text strings, like the names of the datasets for example, it is possible to use the \cn() escape sequence, where n is the index of the colors in the Indexed Colors list defined in the Curves tab of the Preferences dialog.


Clicking on the button opens a dialog allowing to add a \cn() escape sequence by selecting the desired color from a indexed color list box.

If the curve is an analytical function and you have defined a custom comment for it, by default it is this comment that will be displayed. In order to change this behavior you can use either "@D" to display the function title or "@X" for the analytical expression of the function.

If the Auto-update box is checked, the legend is updated each time a curve is added or removed from the plot layer.

The TeX Output option specifies if LaTeX special characters should be escaped or not when exporting to .tex files. If the text contains LaTeX syntax (like superscripts, subscripts, etc...) and you want them to be interpreted by the LaTeX compiler, you should check this option.

By pressing the Set As Default button, all text format options will be saved to the user preferences and will be applied to new text objects. The Apply to... button can be used to apply these format options to all text objects in the active plot layer, the current plot window, or all plot windows in the project. The scope of application of the new format can be chosen from the list box below the Apply to... button.

The Opacity of the Background color can have a value between 0 (transparent background) and 255 (completely opaque background).

The text item can be modified in the text window. Several enhancements can be added to text: