Changing the Plot Layout¶
Users can modify the plot layout options through the Layout Options window.
To open the Layout Options window, users need to select the Open layout options entry in the context menu obtained by right-clicking on any point of the plot.
Prerequisites
You need to have a Data Manager opened.
You need to have an already configured and drawn plot.
Procedure
Right-click on any point of the considered plot.
Select the Open layout options in the provided context menu.
Change the layout configurations you want by moving through the three internal tabs: Plot, Axis, Legend. Any modifications (except the tick format change) are automatically previewed on the plot.
Click on Apply button to confirm your modifications or on Cancel to discard them.
Plot layout tab¶
In the Plot tab, located in the Layout options window, users can change the plot’s general layout options, like fonts, font colors, margin size, background color and many other options.
The tab is divided into three areas, controlling respectively:
plot Title
plot Backgrounds
plot Size and Margin
In the plot Title area, users can configure all the principal characteristics of the plot title. In particular:
Title text: the text string of the title itself. If the text is empty, the title is not drawn on the plot.
Title font family: the font family of the title.
Title font size: the font size of the title.
Title horizontal position (%): the horizontal position of the title expressed as a percentage between
0
and1
of the total plot width.0
means a left aligned title, while1
means a right aligned title.Title font color: the font color of the title. It is controlled by a color picker. Follow the link for more information about the color selector.
Note
Remember that subplots are considered as part of a unique plot. Therefore, the title configured here is for the whole collection of subplots. If users want to draw two different plots with different titles, they need to use Page multi plot feature as explained in the plots tab overview.
In the plot Backgrounds area users can configure a possible color background for the two main areas which make up the plot:
Background plot color: it is the background color assigned to the main plot area which is enclosed by the coordinate system, and it excludes any margin for ticks and labels.
Background paper color: it is the background for the whole widget area, comprehensive of margins and title.
Hint
Opacity of the background can be imposed in the associated Color picker to make the plot background transparent, and to allow users to see any widget on background.
In the plot Size and Margin area, you first need to decide if you want to use the Auto layout or the Custom one:
in the Auto layout, the width and the height of the plot, as well as its internal margins, are based on the dimension of the window and on the content of both the axis and the plot. They therefore adapt to a change of the content or of the dimension of the window itself.
in the Custom layout, all the plot dimensions are established by the user. They are frozen with respect to any change both in the content and in the external window dimension.
By selecting Custom users are free to specify pixel quantities for the following entries:
Width: the width of the plot.
Height: the height of the plot.
Margin top: the size in pixel of the top margin of the plot.
Margin bottom: the size in pixel of the bottom margin of the plot.
Margin left: the size in pixel of the left margin of the plot.
Margin right: the size in pixel of the right margin of the plot.
Padding: the amount of padding (in px) between the plot area and the axis lines.
Axis layout tab¶
In the Axis layout tab users are free to customize plot axis, which in Rulex Platform are placed all around the plot area. Configurations can be applied to any of the four axis (left, top, right, bottom) for any of the subplots present in the plot separately. Changes can be made for a single axis at the time or for a general subset of the available axis. To select the axis to be considered in the current modification, you can use the Axis subplot selector which is located on the top of the Axis layout tab.
There is a four edge selector for any of the subplots present in the considered plot. By clicking on any of the four edges of a single selector, users are going to add that axis to the set of the considered axis for the current selection. The lower side of the tab will be filled with the value present in that particular axis.
Note
If more than one axis is considered at the same time, only fields which have common values among all the considered axis for a particular option will be filled. A default value will be shown for the rest.
Once users have selected at least one axis, two different tabs will be shown in the area below the Axis subplot selector:
Label - Grid tab
Tick tab
In the Label-Grid tab, users can control two different aspects of the axis: Axis label and Grid lines. In the Axis label area, users will modify the label assigned to the selected axis. In particular:
Axis label text: the current text of the axis label. If the text is empty, no label is created on the considered axis.
Axis label font family: the font family of the axis label.
Axis label font size: the font size of the axis label.
Axis label font color: the font color of the axis label. It is controlled by a color picker. Follow the link for more information about the color picker.
In the Grid lines area users will decide if they want to draw grid lines on the plot area to separate the various tick intervals. Selecting Show or Hide in the radio button will turn on/off grid lines for the considered axis. If grid lines are turned on, the following properties can be specified:
Grid line width: the width of the grid lines.
Grid line color: the color of the grid lines.
In the Tick tab, users are able to configure tick and labels on tick for the considered axis. Even this tab is divided in separated areas: Tick labels and Tick markers. In the Tick labels area users can modify the form and the format of the labels appearing on the axis tick. Users can also decide to turn completely off the draw of tick labels by selecting Hide in the radio button presented at the top of this area. If users are showing tick labels you can further specify:
Tick font family: the font family of the tick labels.
Tick font size: the font size of the tick labels.
Tick font color: the font color of the tick labels. It is controlled by a color picker. Follow the link for more information on the color picker.
Tick format: the tick format applied to the tick labels. This format entry allows the user to customize the label obtained from the actual value controlling the way it has to be constructed. More information about how these format strings must be written are contained below.
Tick angle: the angle of the tick labels with respect to the vertical expressed as a number of degrees in the range
-90
,90
. The default valueauto
can be used to leave to the system the decision of the right angle according to the tick labels’ overall length.
If two plots, located one above the other, have the same attribute on the same axis, it is possible to merge them and to create a unique plot.
After two detached plots have been configured in the same widget, it is possible to remove one of the two identical axis by working in the Axis tab.
In this tab, users can select the identical axis on both plots then, by right-clicking on the second one selected and choosing Connect axis.
To disconnect them, right-click on the second axis and select Disconnect axis.
Attention
In this operation, the order with which the axis selection is performed determines which axis will remain on the plot.
The first selected axis is the one which will disappear, while the second one will be the one which will be visible on the plot.
On the Axis tab interface, once the connection is performed, the axis displayed on the plot will become green, while the one which has been deleted will become red.
Note
Tick label format follows d3 formatting mini-languages
:
In the Tick markers area users can configure the position and the properties of the axis ticks. First, users can control if ticks must be shown and their position by using the Hide, Inside, Outside radio button entries. Moreover, if the Hide entry is not selected, users can specify:
Tick length: the length (in px) of the base axis tick.
Tick width: the width (in px) of the base axis tick.
Tick color: the color of the base axis tick. It is controlled by a color picker. Follow the link for more information about color selector.
Legend layout tab¶
In the Legend layout tab, users can customize the properties of the plot legend as well as modify the single trace names. The plot legend is automatically displayed if more than one trace is present among the different subplots. Multiple traces are drawn if a target attribute is present in one of the target dimensions, such as Color or Style. Explicit targets dimension for each plot type are listed in the single plot pages.
First, users can choose if the legend has to be drawn by using the dedicated Show and Hide radio buttons, located at the top of the Legend layout tab. If the legend box is drawn, the panel below is populated with different configuration areas, each one of them controlling a different aspect of the legend box.
The areas in the panel are respectively: Legend title, Box, Trace text and Legend trace names:
Note
Remember that subplots are considered as part of a unique plot. Therefore, the title configured here is for the whole collection of subplots. If users want to draw two different plots with different titles, they need to use Page multi plot feature as explained in the plots tab overview.
In the Legend title area, users can customize the title associated with the whole legend box:
Legend title text: the actual text of the legend box title. If the text is empty, the legend box title is not drawn on the plot.
Legend title font family: the font family of the legend box title.
Legend title font size: the font size of the legend box title.
Legend title font color: the font color of the legend box title. It is controlled by a color picker. Follow the link for more information about the color picker.
Note
Remember that subplots are considered as part of a unique plot. Therefore, a unique legend box is drawn for the whole collection of subplots. If different input attribute groups are used in a target dimension, resulting traces will be grouped as well inside the overall legend box to reflect the input configuration. If users want to draw two different plots with different legend boxes, they need to use Page multi plot feature as explained in the plots tab overview.
In the Box title area, users can modify the layout of the legend box:
Border width: the width of the legend box border. A
0
value means no border.Border color: the color of the legend box border. It is controlled by a color picker. Follow the link for more information about the color picker.
Background color: the color of the legend box background. It is controlled by a color picker. Follow the link for more information about the color picker.
In the Trace text area, users can control the layout of the single trace entries. In particular:
Trace text font family: the font family of the single trace legend entry.
Trace text font size: the font size of the single trace legend entry.
Trace text font color: the font color of the single trace legend entry. It is controlled by a color picker. Follow the link for more information about the color picker.
In the Legend trace names area, users can finally customize the single trace’s name by modifying them in the automatic generated list presented below the area subtitle, as well as modifying the trace shape. The available trace shapes are Line, Line & Point, Point.
Attention
If a trace name is changed, the associations with the values won’t be lost.
GOLD references¶
By clicking the desired tab in the table below, users will find the GOLD references of the selected tab’s options.
Subsection |
Option name |
GOLD Ref |
---|---|---|
Title |
Title text |
layout |
Title font family |
layout |
|
Title font size (px) |
layout |
|
Title horizontal position (%) |
||
Title font color |
layout |
|
Backgrounds |
Background plot color |
|
Background paper color |
||
Size and margin |
Custom or Auto |
layout |
Width (px) |
||
Height (px) |
||
Margin top (px) |
layout |
|
Margin bottom (px) |
layout |
|
Margin left (px) |
layout |
|
Margin right (px) |
layout |
|
Padding (px) |
layout |
Subsection |
Option name |
GOLD Ref |
---|---|---|
Axis label |
Axis label text |
|
Axis label font family |
||
Axis label font size (px) |
||
Axis label font color |
||
Grid lines |
Show or Hide |
|
Grid line width |
||
Grid line color |
||
Tick label |
Show or Hide |
|
Tick font family |
||
Tick font size (px) |
||
Tick font color |
||
Tick format |
||
Tick angle |
||
Tick markers |
Hide, Inside or Outside |
|
Tick length (px) |
||
Tick width (px) |
||
Tick color |
Subsection |
Option name |
GOLD Ref |
---|---|---|
Show or Hide |
layout |
|
Legend title |
Legend title text |
layout |
Legend title font family |
layout |
|
Legend title font size (px) |
layout |
|
Legend title font color |
layout |
|
Box |
Border width |
|
Border color |
||
Background color |
||
Trace text |
Trace text font family |
|
Trace text font size (px) |
||
Trace text font color |
||
Legend trace names |
Trace-n |