histo_chart - bruno-beloff/scs_analysis GitHub Wiki

docs > software repositories > scs_analysis > commands > charting


DESCRIPTION

The histo_chart utility is used to create Matplotlib histogram charts and comma-separated value (CSV) histogram files. The utility analyses a given path to a leaf node of the input JSON data stream.

For the domain MIN and MAX flag, a value is included if:

MIN <= value < MAX

An optional "batch" ("-b") flag can be set, causing the plotting only to take place when all data points have been received.

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

histo_chart.py [-b] [-x MIN MAX] [-c BIN_COUNT] [-p PRECISION] [-o FILENAME] [-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
-x X, --x=X set x-axis to min / max (default -1, 1)
-c BIN_COUNT, --bincount=BIN_COUNT number of bins (default 200)
-p PRECISION, --precision=PRECISION precision of reported deltas (default 3)
-o OUTFILE, --output=OUTFILE output histogram to CSV file
-e, --echo echo stdin to stdout
-t TITLE, --title=TITLE optional chart title
-v, --verbose report narrative to stderr

EXAMPLES

socket_receiver.py | ./histo_chart.py val.CO2.cnc -x -10 10 -e -o CO2.csv

FILES

~/SCS/scs_analysis/src/scs_analysis/matplotlibrc

SEE ALSO

scs_analysis/multi_chart
scs_analysis/single_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.