Column Expressions
Formula Expression using columns in the Mark Panel
User can specify the column to be treated as values of marks on Mark Location File Load dialog or enabled Computed Columns setting opened by clicking button on Mark Panel.
The specifiable values of mark are following.
Items | Description |
---|---|
$X | X coordinate of marks |
$Y | Y coordinate of marks |
$Size | Thumbnail area of marks |
$Color | Color of marks |
$Shape | Shape of marks |
$Label | Label of marks when displaying in screen |
$Name | Name of marks |
$Group | Group name to which marks belong |
$FWidth | Width of frame |
$FHeight | Height of Frame |
$FAngle | Angle of frame |
$Representation | Representation of group (This parameter can only be specified from preference) |
The default determination methods of the values of mark are specified in preference. See preference Action/Add Markpage for detail.
You can not only specify a column name but also a formula expression with columns. Refer to Column Expressions page.
When Computed Columns is ON, the datalist shows Calculated Columns such as $Name, $X, and $Y, and also Data Columns which mean original columns and values. The contents of Data Columns depend on a loaded Mark Location File.
These $X, $Y values are used for the display position on the screen.
When Computed Columns is turned OFF, the Data Columns (original columns and values imported from the CSV) are hidden, and only Name, X, and Y are displayed. The Name, X, and Y reflect $Name, $X, and $Y.
When the button is pressed, the current column expressions for $X, $Y, $Size, $Color, $Shape, $Label, $Name, $Group, $FWidth, $FHeight and $FAngle are displayed.
These formulas can be changed dynamically.
These expressions that define mark values are called “Designation formula”. Designation formula that simply refers to only one column is called “Link”. Designation formula that contains some columns or constants is called “Calculation Formula”. Designation formula that is empty is called “Unconnected”.
When Computed Columns is ON, data columns can be edited.
To edit, select “Edit Columns” from the menu that appears when you right-click the header section of the datalist, to open the Mark Table Columns dialog for column editing. You can also find the “Edit Columns” option in the panel Menu.
Within the Mark Table Columns dialog, you can add, delete and rename columns and also change the order of columns.
A change (delete or rename) that would result in the disappearance of column names used in any Designation Formulas are not allowed. If those edits are attemempted, the dialog shows a warning when pressing the OK button and the changes are not applied.
The properties of the Mark Panel show the mark values. When these properties are changed, the display on the GUI is updated. However, the accompanying updates of the data columns behave differently depending on the state of the designated formula.
If the designation formula is a link, a change in the mark value updates the value of the linked data column.
If the designation formula is a calculation formula, changing the mark value does not update the value in the data column. Therefore, the value obtained from the formula and the mark value may differ. This state is called “inconsistent state”. When there is an inconsistency, the mark value column in the mark list is displayed in bold letters.
If the designation formula is unconnected, changing the mark value will not change the value of the data column, nor will there be an inconsistent state.
If you change the designation formula, the mark values are recalculated using the updated formula for all marks. Any inconsistency will be resolved by the recalculated values.
If you change a data column, the mark values calculated using that data column will be recalculated. Any inconsistency will be resolved by the recalculated values.
Only the designation formulas and data columns are preserved when saving. Therefore, if you save with inconsistencies, the mark values that are inconsistent will not be saved. Similarly, if there are unconnected mark values, those mark values will also not be saved.
When reloading, the mark value will be calculated again from the designation formula and data columns and used. Default values are set for unconnected mark values.
For $Shape and $Color, you can specify a column name to be directly combined(e.g. mark_color) but also a formula (e.g. x / 100). When the formula is specified, change made from right-click context menu or by editing its property is ignored.
The content of the combined column or the result of the formula calculation is interpreted as follows.
Specify the icon to be displayed in screen.
It can be specified by string or number. The Mark icon is displayed when the specification is not any of the followings.
Icon | Number | String |
---|---|---|
![]() |
0 | Dot |
![]() |
1 | Cross |
![]() |
2 | X |
![]() |
3 | Square |
Example
Value | Meaning |
---|---|
mark_shape | Determine the icon according to the content of the column mark_shape. |
ifelse(x<0, “X”, “Cross”) | Display with ![]() ![]() |
Specify the color to be drawn on screen.
The color can be specified by string or number between 0 and 100 to specify a gradient from blue to red.
To specify a color by string, specify a color name or an RGB value as shown below.
Color | Name | RGB value |
---|---|---|
![]() |
Red | #ff0000 |
![]() |
Yellow | #ffff00 |
![]() |
Lime | #00ff00 |
To specify a color by number, specify a value as follows.
Color | Number |
---|---|
![]() |
under 0 |
![]() |
20 |
![]() |
40 |
![]() |
60 |
![]() |
80 |
![]() |
over 100 |
Example
Value | Meaning |
---|---|
mark_color | Determine the color according to the content of the column mark_color. |
ifelse(x<0, “red”, “lime”) | Display in Red color when x is negative, otherwise Lime color. |
value * 100 | Determine the color according to the value of value. |
Specify information about the frame to be displayed on the mark.
If $FWidth or $FHeight is greater than or equal to 0, a square frame with the specified width and height centered on the mark and tilted at the $FAngle is displayed in screen.
Among the columns without $ (Table Columns), the values of columns other than LineNo.
, which indicates the line number, can be edited by clicking on the list.
In general, you can edit them as text, but if the column is associated with Shape/Color, you can select Shape/Color in the drop-down list/color chart.
Formula Expression using columns in the Mark Panel