g.gui.tplot
Plots the values of temporal datasets.
g.gui.tplot [-hl] [stvds=name [,name,...]] [strds=name [,name,...]] [coordinates=east,north] [cats=string] [attr=string] [output=name] [csv=name] [title=string] [xlabel=string] [ylabel=string] [size=string] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
g.gui.tplot
grass.script.run_command("g.gui.tplot", stvds=None, strds=None, coordinates=None, cats=None, attr=None, output=None, csv=None, title=None, xlabel=None, ylabel=None, size=None, flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)
Example:
gs.run_command("g.gui.tplot")
Parameters
stvds=name [,name,...]
Name of the input space time vector datasets
strds=name [,name,...]
Name of the input space time raster datasets
coordinates=east,north
Coordinates
cats=string
Categories of vectors features
To use only with stvds
attr=string
Name of attribute
Name of attribute which represent data for plotting
output=name
Name for output graphical file
Full path for output file containing the plot, ddd extension to specify format (.png, .pdf, .svg)
csv=name
Name for output CSV file
Full path for the CSV file containing the plotted data
title=string
Title for plot
The title for the output plot
xlabel=string
Label for x axis
The x axis label for the output plot
ylabel=string
Label for y axis
The y axis label for the output plot
size=string
Size of output image as width,height in pixels
It works only with output parameter
-h
Set the header of CSV file, to be used with csv option
-l
Show simple linear regression model line
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
stvds : str | list[str], optional
Name of the input space time vector datasets
Used as: input, stvds, name
strds : str | list[str], optional
Name of the input space time raster datasets
Used as: input, strds, name
coordinates : tuple[float, float] | list[float] | str, optional
Coordinates
Used as: input, coords, east,north
cats : str, optional
Categories of vectors features
To use only with stvds
attr : str, optional
Name of attribute
Name of attribute which represent data for plotting
output : str, optional
Name for output graphical file
Full path for output file containing the plot, ddd extension to specify format (.png, .pdf, .svg)
Used as: output, file, name
csv : str, optional
Name for output CSV file
Full path for the CSV file containing the plotted data
Used as: output, file, name
title : str, optional
Title for plot
The title for the output plot
xlabel : str, optional
Label for x axis
The x axis label for the output plot
ylabel : str, optional
Label for y axis
The y axis label for the output plot
size : str, optional
Size of output image as width,height in pixels
It works only with output parameter
flags : str, optional
Allowed values: h, l
h
Set the header of CSV file, to be used with csv option
l
Show simple linear regression model line
overwrite: bool, optional
Allow output files to overwrite existing files
Default: False
verbose: bool, optional
Verbose module output
Default: False
quiet: bool, optional
Quiet module output
Default: False
superquiet: bool, optional
Very quiet module output
Default: False
wxGUI Temporal Plot Tool
DESCRIPTION
The Temporal Plot Tool is a wxGUI component that queries and plots the values of a point, defined by a coordinate pair, in one or more temporal datasets (strds, stvds, str3ds).
Supported features:
-
temporal datasets with interval/point and absolute/relative time,
-
show simple linear regression model line with calculated formula
y = a + b*x
(y is dependent variable, a is intercept, b is slope, x is explanatory variable) andr-squared
(parameter of goodness-of-fit measure for linear regression model) -
pop-up annotations with values information,
-
query and plot multiple points via the command line,
-
zoom and pan,
-
change labels to x and y axes,
-
add title to the plot, and
-
export the time series values to a CSV file (x axis data has date time string format, if you want to use for calculating simple regression model in the R environment, LibreOffice etc., you will obtain a different calculated formula
y = a + b*x
because these software packages use a reference date other than the UNIX Epoch time (00:00:00 UTC on 1 January 1970)).
To optionally add a title to the temporal plot and/or change the x and y axes labels, first type the desired text and then click Draw as showed below.
Figure: Add title and labels to a time series plot
To export the time series data to a text file (date and data values), type a name for the file and click Draw again. Optionally, set the check-box to print headers, as well.
g.gui.tplot export time series as csv file
Figure: Export time series values to a text file
NOTES
g.gui.tplot requires the Python plotting library Matplotlib.
SEE ALSO
Temporal data processing, wxGUI, wxGUI components
AUTHOR
Luca Delucchi, Fondazione Edmund Mach, Italy
SOURCE CODE
Available at: g.gui.tplot source code
(history)
Latest change: Thursday Mar 13 07:41:16 2025 in commit ba50307