Skip to content

Latest commit

 

History

History
140 lines (95 loc) · 3.4 KB

dmplot.adoc

File metadata and controls

140 lines (95 loc) · 3.4 KB

dmplot(1) Manual Page

NAME

dmplot - creates plots from observations in database

SYNOPSIS

dmplot --help

dmplot --version

dmplot --database file --node id --sensor id --target id --response name --from timestamp --to timestamp --terminal terminal [--output file] [--background color] [--foreground color] [--font name] [--title title] [--width n] [--height n]

dmplot --config file [--name name]

DESCRIPTION

The dmplot program is a front-end to gnuplot(1) that creates plots of observations read from database. Plots are either written to file or displayed in terminal or X11 window.

Depending on the selected terminal backend, you may have to set the environment variable GDFONTPATH to the local font directory first:

$ export GDFONTPATH=/usr/local/share/fonts/webfonts/

Plotting parameters passed via command-line have priority over those from configuration file.

OPTIONS

--background, -G color

Optional background color of the plot (for example, #ff0000 or red).

--config, -c file

File path to the configuration file.

--database, -d file

File path to the SQLite observation database.

--font, -A name

Optional font name (for example, Open Sans, arial.ttf, or monospace).

--foreground, -P color

Optional foreground color of the plot (for example, #ffffff or white).

--from, -B timestamp

Start of time range in ISO 8601.

--height, -H n

Optional plot height in pixels.

--help, -h

Output available command-line arguments and quit.

--name, -n name

Name of program instance and configuration (default is dmplot).

--node, -N id

Node id.

--output, -o file

File path of the output image. Required for the terminals gif, png, and pngcairo. Additional format descriptors are replaced with their values to set date and time dynamically (%Y, %M, %D, %h, %m, %s).

--response, -R name

Response name.

--sensor, -S id

Sensor id.

--target, -T id

Target id.

--terminal, -m [ansi|ascii|gif|png|pngcairo|sixelgd|svg|x11]

Output terminal, either ANSI, ASCII, GIF, PNG, PNG (using Cairo), Sixel, SVG, or X11. The terminal must be supported by gnuplot(1).

--title, -C title

Plot title.

--to, -E timestamp

End of time range in ISO 8601.

--version, -v

Output version information and quit.

--width, -W n

Optional plot width in pixels.

EXIT STATUS

0

Success. Plot has been created.

1

Failure. Plot creation failed.

EXAMPLE

Create a plot of observations selected from database observ.sqlite in PNG terminal, and write the file to /tmp/plot.png:

$ dmplot --node dummy-node --sensor dummy-sensor --target dummy-target \
  --response dummy --from 2020 --to 2021 --database observ.sqlite \
  --terminal pngcairo --output /tmp/plot.png

Output the plot directly to terminal, with the configuration loaded from file:

$ dmplot --name dmplot --config dmplot.conf --terminal sixelgd

Output in sixelgd format requires a terminal emulator with Sixel support.

RESOURCES

Project web site: https://www.dabamos.de/

COPYING

Copyright © 2024 Philipp Engel.
Free use of this software is granted under the terms of the ISC Licence.