GnuplotEx.Plot.Renderer (gnuplot_ex v0.5.1)

Compiles Plot structs into gnuplot command lists.

This module transforms high-level Plot configurations into the low-level command lists that can be executed by GnuplotEx.Port.

Summary

Functions

Compile a Plot into {commands, datasets, binary_files} tuple.

Functions

compile(plot_or_mp, opts \\ [])

@spec compile(
  GnuplotEx.Plot.t() | GnuplotEx.MultiPlot.t(),
  keyword()
) :: {[list()], [Enumerable.t()], [String.t()]}

Compile a Plot into {commands, datasets, binary_files} tuple.

Returns:

  • commands - List of gnuplot commands
  • datasets - List of datasets to stream via stdin
  • binary_files - List of temp file paths for binary data (cleanup after render)

Example

{commands, datasets, binary_files} = Renderer.compile(plot)
result = GnuplotEx.plot(commands, datasets)
Binary.cleanup(binary_files)