17. The Plot Window¶
17.1 Overview¶
The TUFLOW Viewer plot window can be opened by clicking the time series icon found in the plugin toolbar.
By default, the plot window will open with a Time Series Plot. A new Plotting Tab can be added by clicking on the '+' button on the tab strip and selecting the desired plot type from the dropdown menu.

Or an existing Plotting Tab can be changed to a different type by right-clicking the plot tab and selecting a different type.

17.2 Plotting Types¶
Time Series Plot: Used to plot time series data from map output or time series results. The x-axis can be either time (hrs) or date, and the y-axis can be any result type that has a temporal output (e.g. water level, velocity etc.). 3D results will be depth averaged for the time series plot.
Section Plot: Used to plot sections (2D profiles) from map output result surfaces, or 1D long sections from time series results. The x-axis represents distance along the section line, and the y-axis can be any result type (e.g. bed level, water level, max water level etc.). 3D results will be depth averaged for the section plot.
Profile Plot: Used to plot a vertical profile from map output results. The x-axis can be any result type (e.g. velocity, salinity etc.) and the y-axis is elevation. Typically, the
Profile Plot is used to plot from 3D results, however can be used for some 2D result formats as well (2D results will not vary with elevation).
Curtain Plot: Used to plot a vertical section along a line using contours from map output results. The x-axis represents distance along the section line, y-axis is elevation, and the scalar contours represent the chosen result type (e.g. velocity, salinity etc.). The contours match the colour scheme used for the same result type in the QGIS Map Canvas. Typically, the
Curtain Plot is used to plot from 3D results, however can be used for some 2D result formats as well.
17.3 Side-by-side Views¶
Plotting tabs can be viewed side-by-side (supports two views). Moving a plot tab to a new view, or to the other view, can be done by right-clicking the plot tab and selecting the "Move to other view". This option is only available if there are two, or more, plot tabs open.

17.4 Linked Plots¶
By default, plots of the same type will have their x-axis linked, except for the Profile Plot, which has its y-axis linked. This means that if the x-axis (or y-axis for profile plots) is changed in one plot (e.g. by panning or zooming), then the x-axis (or y-axis) of the other plots of the same type will also change to match. This is useful for comparing different results, or different result types, at the same location or time.
The linked axis behaviour can be turned off by clicking the "link" icon in the top right of the plot. This will toggle between linked and
unlinked states.
17.5 Docking the Plot Window¶
By default, the plotting window is not dockable, however it can be toggled to allow it to be docked within the QGIS interface. This can be done by toggling the "set dockable" button in the top-right of the plot window from "not dockable" to
"dockable".
17.6 Plot Themes¶
The plot theme can be changed in the General tab within the TUFLOW Viewer Settings.
TUFLOW Viewer adopts the same UI themes that are available in QGIS. The "default" theme will use the current QGIS theme, other themes will override the QGIS theme within the plot window.
17.7 Mouse Interaction¶
- Left-click and drag in the main plot area to pan the plot. Hold Shift or Ctrl to pan the secondary axis.
- Scroll wheel in the main plot area to zoom in and out of the plot. Hold Shift or Ctrl to zoom the secondary axis.
- Right-click in the main plot area to open the context menu for options to control the plot display and export data (see below for more details).
- Right-click and drag in the main plot area to scale the plot axes. Hold Shift or Ctrl to scale the secondary axis.
The above actions can also be done by interacting with the axis ticks directly and will be confined to the axis that is being interacted with. This is also another method of controlling the secondary axis.
17.8 Axis Limits and Auto Extent¶
By default, the plot axes will automatically adjust their limits to fit the data being plotted. This means that if new data is plotted, or if the data changes (e.g. due to changing the time step), then the axes limits will adjust to fit the new data. This behaviour can be stopped by manually adjusting the plot limits. This can be done either by panning or zooming the plot, or under the right-click context menu toggling on X axis ► Manual or Y axis ► Manual.
To re-enable the auto extent beahviour, the easiest method is to click the auto button
in the bottom left of the plot window, which will reset both axes to auto. Alternatively, auto extent can be re-enabled for each axis individually by right-clicking the plot window and toggling on X axis ► Auto or Y axis ► Auto.
To set the axis limits or toggle the auto/manual option for the secondary axis, the secondary axis ticks should be right-clicked. Clicking in the main plot area will only show options for the main axis.
17.9 Secondary Axis¶
Lines can be moved to the secondary axis by right-clicking the line (it will highlight red if selected properly) and selecting "Move to secondary axis". Lines with a dashed style are plotted on the secondary axis. Lines can be moved back to the primary axis in the same way, by right-clicking the line and selecting "Move to primary axis". Alternatively, the main plot can be right-clicked and "Remove secondary axis" selected to move all lines back to the primary axis and remove the secondary axis.
17.10 Summary of Plotting Toolbar Icons¶
Selection Tool: Used to select features for plotting. For example:
- Time series results: A channel in the PLOT_L GIS layer
- Map outputs results: A feature within a vector layer to represent a location where to extract time series/section results (Selection Tool ► Extract from map outputs must be toggled on)
Draw Tool: Used to digitise lines and points in the QGIS canvas from which to extract map output data for plotting.
- Points: The
Time Series Plot and
Profile Plot extract data using points. The
draw tool can be used by:
- Left-click: add a new point
- Ctrl + left-click: move the active point (denoted by the
pencil symbol in the draw tool menu).
- Right-click or Escape: exit the draw tool.
- Lines: The
Section Plot and
Curtain Plot extract data using lines. The
draw tool can be used by:
- Left-click: add a new vertex to the line (or start a new line if there is no active line)
- Right-click: finish line
- Ctrl + left-click: reset the active line (denoted by the
pencil symbol in the draw tool menu) and start a new line.
- Escape: exit the draw tool.
- The
Draw Tool menu will be populated with drawn items and can be used to toggle visibility, share drawn items across plots, choose which item is editable, and to remove drawn items.

- Points: The
Available Results: Used to select which loaded results to plot from.
Available Result Types: Used to select which result types to plot. All available result types for select results will be listed, however this does not necessarily mean that all result types will be available in all the selected results. For example, there could be two results open and one of the results has a hazard output, and the other does not.
Note: The plot window uses PyTUFLOW to query the available result types. PyTUFLOW uses its own standardised naming conventions (this keeps result types consistent across formats, software etc) and the available result types names may not match exactly the result type names shown in QGIS. For example, when TUFLOW FV writes "Water Surface Elevation", this will be shown as "water level" in thedata types menu.
17.11 Plot Grid Lines¶
The plot grid lines can be toggled on/off by right-clicking within the main plot window and selecting Plot Options ► Grid ► Show X Grid and/or Plot Options ► Grid ► Show Y Grid. It is also possible to change the opacity of the grid lines by moving the thumb on the opacity slider.
The secondary axis grid lines are controlled by the same options i.e. it is not possible to toggle the primary and secondary axis grid lines independently.
17.12 Exporting and Copying Data¶
It is possible to export or copy the current plot window as either raw data or an image. The export option allows the plot data to be saved to a file, and in the case of images, choose the image format. The copy option will copy the data to the clipboard.
It is also possible to export any drawn items to a vector layer file (e.g. as a .shp or .gpkg). In the case of drawn items, the copy option will create a temporary memory layer in QGIS with the drawn item geometry.
The export and plot options can be accessed via the right-click context menu in the plot window.
17.13 Time Series Plot Specific Options¶
17.13.1 Using a Date Axis¶
It is possible to change the x-axis of the Time Series Plot from time (hrs) to date via the right-click context menu.
17.13.2 Displaying the Current Time¶
The current time in the Time Series Plot can be toggled on via the right-click context menu.
The time slider can be clicked and dragged to change the current time.
17.14 Section Plot Specific Options¶
17.14.1 Branch Selection¶
TUFLOW Viewer will pick up multiple branches, if they exist, when plotting 1D long sections. By default, the "primary" branch will be visible, and other branches will be hidden. The "primary" branch can vary depending on the result format. For TPC results, the primary branch is determined by TUFLOW and written to the plot/csv/*_1d_Chan.csv file. For results that do not have a primary branch defined in the result format, the first branch will be set as the primary branch.
Branches can be toggled on/off in the branches menu. The
branches menu will only appear if more than one branch is available.
17.15 Profile Plot Specific Options¶
17.15.1 Vertical Interpolation¶
By default, the Profile Plot use constant interpolation between vertical levels. This can be switched to linear interpolation via the right-click context menu.
17.15.2 Displaying Vertical Levels¶
The vertical levels can be toggled on/off in the Profile Plot via the right-click context menu. The vertical levels are displayed as dashed lines across the plot at the elevation of each vertical level in the model.
17.16 Curtain Plot Specific Options¶
17.16.1 Changing the Colour Scheme¶
The colours used for the contours in the Curtain Plot match the colour scheme used for the same result type in the QGIS Map Canvas. Therefore, changing the colour scheme in the QGIS Map Canvas will also change the colour scheme in the
Curtain Plot.
17.16.2 Show Vectors¶
Vectors can be overlaid on the contours in the Curtain Plot if the displayed result is a vector result type (e.g. velocity). The vectors will be plotted as arrows with the direction of the arrow representing the direction of the vector in relation to the section line.
The vector arrows will match the colour and style of the vectors used for the same result type in the QGIS Map Canvas. Although, only the arrow symbology type is supported.
17.16.3 Vertical Velocity Scale¶
The vertical velocity component of the vectors in the Curtain Plot can be scaled by toggling on the "Scale vertical velocity" option in the right-click context menu. This option will only have an effect if the result has a vertical velocity data type. If the scale is set to zero, the vertical velocity results will not be queried, which can improve performance.
17.16.4 Curtain Grid Line Thickness¶
The thickness of the grid lines in the Curtain Plot can be adjusted via the right-click context menu.