single_chart - bruno-beloff/scs_analysis GitHub Wiki
docs > software repositories > scs_analysis > commands > charting
DESCRIPTION
The single_chart utility is used to display a Matplotlib categorical chart for one or more data sources. Data is provided by a sequence of JSON documents on stdin. The charting source is specified by a path to a leaf node in the JSON document.
An optional "batch" ("-b") flag can be set, causing the plotting only to take place when all data points have been received.
A "relative" ("-r") option ploys the first data point at y position zero, and all subsequent points relative to the first point. This is useful when examining noise on a signal whose absolute values may be far from zero.
Note that the chart is a simple approximation to a timeline chart - values are plotted successively, with no account taken of the interval between samples.
On Linux, it may be necessary to install tkinter in order for the chart to be displayed:
sudo apt-get install python3-tk
Depending on operating system, it may be necessary to use a matplotlibrc file, which specifies the Matplotlib back-end graphics system.
SYNOPSIS
single_chart.py [-b] [-r] [-x POINTS] [-y MIN MAX] [-e] [-t TITLE] [-v] [PATH]
Options | |
---|---|
--version | show program's version number and exit |
-h, --help | show this help message and exit |
-b, --batch | wait for all data before displaying chart |
-r, --relative | display relative values (first value is 0) |
-x X, --x=X | number of x points (default 600) |
-y Y, --y=Y | set y-axis to min / max (default -10, 10) |
-e, --echo | echo stdin to stdout |
-t TITLE, --title=TITLE | optional chart title |
-v, --verbose | report narrative to stderr |
EXAMPLES
socket_receiver.py | ./single_chart.py -r val.afe.sns.CO.cnc
FILES
~/SCS/scs_analysis/src/scs_analysis/matplotlibrc
SEE ALSO
scs_analysis/histo_chart
scs_analysis/multi_chart
RESOURCES
Matplotlib: What is a backend?
Stackoverflow: "UserWarning: Matplotlib is currently using agg, which is a non-gui backend...
BUGS
On some operating systems, the chart will remain as the uppermost window until all data have been received.