#include <gnuplot.h>

Public Member Functions

void write_flowcell (std::ostream &out, const model::plot::flowcell_data &data, const std::string &output_image_path="")
 
void write_flowcell_tile_id (std::ostream &out, const model::plot::flowcell_data &data, const std::string &output_image_path="")
 
void write_heatmap (std::ostream &out, const model::plot::heatmap_data &data, const std::string &output_image_path="")
 
template<typename Point >
void write_chart (std::ostream &out, const model::plot::plot_data< Point > &data, const std::string &output_image_path="")
 

Protected Member Functions

template<typename Point >
void write_plot_data (std::ostream &out, const model::plot::plot_data< Point > &data)
 
template<typename Point >
void write_plot_description (std::ostream &out, const model::plot::plot_data< Point > &data)
 
void write_axes (std::ostream &out, const model::plot::axes &axes)
 
void write_axis (std::ostream &out, const model::plot::axis &axis, const char axis_label)
 
template<typename PlotData >
void write_title (std::ostream &out, const PlotData &data)
 
void write_output_format (std::ostream &out, const std::string &output_image_path)
 
void write_plot_series (std::ostream &out, const model::plot::series< model::plot::candle_stick_point > &series)
 
template<typename P >
void write_plot_line (std::ostream &out, const model::plot::series< P > &series)
 
template<typename X , typename Y >
void write_plot_series (std::ostream &out, const model::plot::series< model::plot::data_point< X, Y > > &series)
 
void write_plot_series (std::ostream &out, const model::plot::series< model::plot::bar_point > &series)
 
void write_end_of_series (std::ostream &out)
 
template<typename P >
void write_type (std::ostream &out, const model::plot::series< P > &series, const char sep= ' ')
 
template<typename P >
void write_additional (std::ostream &out, const model::plot::series< P > &series, const char sep= ' ')
 
template<typename P >
void write_label (std::ostream &out, const model::plot::series< P > &series, const char sep= ' ')
 
template<typename P >
void write_color (std::ostream &out, const model::plot::series< P > &series, const char sep= ' ')
 
std::string normalize_color (const std::string &color)
 

Detailed Description

Write a plot in the GNUPlot scripting language

Member Function Documentation

std::string normalize_color ( const std::string &  color)
inlineprotected

Normalize the camel case color to lower case and seperated with a dash (-)

Parameters
colorcamel case color name
Returns
GNUPlot color name
void write_additional ( std::ostream &  out,
const model::plot::series< P > &  series,
const char  sep = ' ' 
)
inlineprotected

Write additional features of the plot based on the plot type

This function determines the plot type from the series_type() function

Parameters
outoutput stream
seriesseries data for a line, candlestick or bar plot
sepseperator between features
void write_axes ( std::ostream &  out,
const model::plot::axes axes 
)
inlineprotected

Write the label and range for each axis to the output stream

Parameters
outoutput stream
axespair of axis objects
void write_axis ( std::ostream &  out,
const model::plot::axis axis,
const char  axis_label 
)
inlineprotected

Write the label and range for an axis to the output stream

Parameters
outoutput stream
axisrange and label of the axis
axis_label'x' or 'y' to denote either x- or y-axis
void write_chart ( std::ostream &  out,
const model::plot::plot_data< Point > &  data,
const std::string &  output_image_path = "" 
)
inline

Write a generic chart (line, candlestick or bar) to the output stream

Parameters
outoutput stream
dataplot data for a line, candlestick or bar plot
output_image_pathoptional output image path for the script
void write_color ( std::ostream &  out,
const model::plot::series< P > &  series,
const char  sep = ' ' 
)
inlineprotected

Write the color of the series

Parameters
outoutput stream
seriesseries data for a line, candlestick or bar plot
sepseparator between features
void write_end_of_series ( std::ostream &  out)
inlineprotected

Write the end of series indicator to the output stream

Parameters
outoutput stream
void write_flowcell ( std::ostream &  out,
const model::plot::flowcell_data data,
const std::string &  output_image_path = "" 
)
inline

Write the flowcell heat map of a specific metric to the output stream using the GNUPlot format

Parameters
outoutput stream
dataflowcell heatmap data
output_image_pathoptional output image path for the script
void write_flowcell_tile_id ( std::ostream &  out,
const model::plot::flowcell_data data,
const std::string &  output_image_path = "" 
)
inline

Write the flowcell heat map to the output stream using the GNUPlot format

Note
, not currently supported!
Parameters
outoutput stream
dataflowcell heatmap data
output_image_pathoptional output image path for the script
void write_heatmap ( std::ostream &  out,
const model::plot::heatmap_data data,
const std::string &  output_image_path = "" 
)
inline

Write a heat map to the output stream

Parameters
outoutput stream
dataheat map data
output_image_pathoptional output image path for the script
void write_label ( std::ostream &  out,
const model::plot::series< P > &  series,
const char  sep = ' ' 
)
inlineprotected

Write the label for the series

If there is no label, notitle is written instead.

Parameters
outoutput stream
seriesseries data for a line, candlestick or bar plot
sepseperator between features
void write_output_format ( std::ostream &  out,
const std::string &  output_image_path 
)
inlineprotected

Write the output format for GNUPlot

This tells GNUPlot to write the plot as an image in PNG format

Parameters
outoutput stream
output_image_pathoutput filename of the image
void write_plot_data ( std::ostream &  out,
const model::plot::plot_data< Point > &  data 
)
inlineprotected

Write each series contained within plot_data to the output stram

Parameters
outoutput stream
dataplot data for a line, candlestick or bar plot
void write_plot_description ( std::ostream &  out,
const model::plot::plot_data< Point > &  data 
)
inlineprotected

Write a description of the plot data to the output stream

Parameters
outoutput stream
dataplot data for a line, candlestick or bar plot
void write_plot_line ( std::ostream &  out,
const model::plot::series< P > &  series 
)
inlineprotected

Write a series of line plot points to the output stream

Parameters
outoutput stream
seriesseries of line plot points
void write_plot_series ( std::ostream &  out,
const model::plot::series< model::plot::candle_stick_point > &  series 
)
inlineprotected

Write a series of candlestick points to the output stream

Parameters
outoutput stream
seriesseries of candlestick points
void write_plot_series ( std::ostream &  out,
const model::plot::series< model::plot::data_point< X, Y > > &  series 
)
inlineprotected

Write a series of line plot points to the output stream

Parameters
outoutput stream
seriesseries of line plot points
void write_plot_series ( std::ostream &  out,
const model::plot::series< model::plot::bar_point > &  series 
)
inlineprotected

Write a series of bar plot points to the output stream

Parameters
outoutput stream
seriesseries of bar plot points
void write_title ( std::ostream &  out,
const PlotData &  data 
)
inlineprotected

Write the title of the plot to the output stream

Parameters
outoutput stream
dataplot data for a line, candlestick, bar plot, heat map or flowcell heat map
void write_type ( std::ostream &  out,
const model::plot::series< P > &  series,
const char  sep = ' ' 
)
inlineprotected

Write the plot type to the output stream

This function determines the plot type from the series_type() function

Parameters
outoutput stream
seriesseries data for a line, candlestick or bar plot
sepseparator between features

The documentation for this class was generated from the following file: