pymemtrace.util.gnuplot

Provides gnuplot support to command line tools.

pymemtrace.util.gnuplot._num_columns(table: Sequence[Sequence[Any]]) int[source]

Returns the number of columns of the table. Will raise a ValueError if the table is uneven.

pymemtrace.util.gnuplot.add_gnuplot_to_argument_parser(parser: ArgumentParser) None[source]

Adds --gnuplot=<DIRECTORY_FOR_GNUPLOT_OUTPUT> to the argument parser as args.gnuplot.

pymemtrace.util.gnuplot.create_gnuplot_dat(table: Sequence[Sequence[Any]]) str[source]

Returns a pretty formatted string of the data in the given table suitable for use as a gnuplot .dat file.

pymemtrace.util.gnuplot.invoke_gnuplot(path: str, name: str, table: Sequence[Sequence[Any]], plt: str) int[source]

Create the plot for name. path - the directory to write the data and plot files to. name - the name of those files. table - the table of values to write to the data file.

Returns the gnuplot error code.

pymemtrace.util.gnuplot.version() bytes[source]

For example: b’gnuplot 5.2 patchlevel 6’

pymemtrace.util.gnuplot.write_test_file(path: str, typ: str) int[source]

Writes out a Gnuplot test file.