ConicBundle
|
for generating LaTeX figures with successive box plots and corresponding tables More...
#include <BoxPlot.hxx>
Public Member Functions | |
Constructors | |
BoxPlot () | |
~BoxPlot () | |
methods | |
void | set_use_samplesz (bool us) |
if set to true (==default), the samples size is used for the width of the box polots | |
void | set_use_logscale (bool ls) |
if set to true (default is false), the values are plotted with log scale | |
void | set_use_minmax (bool mm) |
if set to true (==default), min and max are plotted as outliers irrespective of whether they are outliers or not, but no outliers are plotted | |
int | standalone_preamble (std::ostream &out) |
to generate LaTeX source that results in a seperate pdf-file of the plot use this to output the corresponding LaTeX preamble | |
int | standalone_postamble (std::ostream &out) |
if things were started with standalone_preamble() finish the document with calling this | |
int | start_plot (std::ostream &out, const char *options=0) |
output the LaTeX commands for starting a new plot More... | |
int | end_plot (std::ostream &out) |
when, after start_plot() all plots have been added by add_plot(), this ouputs the closing part of the plot | |
int | next_data (const CH_Matrix_Classes::Matrix &datavector) |
input the next data group to be used in add_plot or add_tabularline; from this data the routine computes min, lwhisker, lquartile, median, uquartile, uwhisker, max, samplesz | |
int | add_plot (std::ostream &out, CH_Matrix_Classes::Real pos, const char *color=0, const char *name=0, CH_Matrix_Classes::Real val=0.) |
output the box plot to the data of the last call to next_data(); multiple calls without intermediate calls to next_data() all output the same data More... | |
int | add_tabularline (std::ostream &out, int prec=6) |
output minval & lquartile & median & uquartile & maxval as computed by the latest previous next_data() call. The number of significant digits is given in precision. | |
Private Attributes | |
CH_Matrix_Classes::Real | median |
as set in the last call to next_data() | |
CH_Matrix_Classes::Real | lquartile |
as set in the last call to next_data() | |
CH_Matrix_Classes::Real | uquartile |
as set in the last call to next_data() | |
CH_Matrix_Classes::Real | lwhisker |
as set in the last call to next_data() | |
CH_Matrix_Classes::Real | uwhisker |
as set in the last call to next_data() | |
CH_Matrix_Classes::Real | minval |
as set in the last call to next_data() | |
CH_Matrix_Classes::Real | maxval |
as set in the last call to next_data() | |
CH_Matrix_Classes::Matrix | outliers |
as set in the last call to next_data() | |
CH_Matrix_Classes::Integer | samplesz |
as set in the last call to next_data() | |
bool | use_samplesz |
if true [=default], the box plot width depends on the relative sample size | |
bool | use_logscale |
if true [default:false], the values of the box plot are output in log scale | |
bool | use_minmax |
if true [=default], min and max are plotted as outliers irrespective of whether they are outliers or not, but no outliers are plotted | |
for generating LaTeX figures with successive box plots and corresponding tables
Each call to next_data() with a vector of dimension samplesz computes the values minval,lwhisker, lquartile, median, uquartile, uwhisker, maxval and collects the vector outliers.
For creating the full LaTeX source for a pdf-file of a single plot that displays the statistics of several vectors use, in this sequence
There is limited support for adding some options. Once the data has been set in next_data, it can be used for several add_plot() calls to different out streams and some of the data can be output to a table by add_tabularline().
int CH_Tools::BoxPlot::add_plot | ( | std::ostream & | out, |
CH_Matrix_Classes::Real | pos, | ||
const char * | color = 0 , |
||
const char * | name = 0 , |
||
CH_Matrix_Classes::Real | val = 0. |
||
) |
output the box plot to the data of the last call to next_data(); multiple calls without intermediate calls to next_data() all output the same data
out | outstream (the file) |
pos | the "draw position" of pgfplots |
color | the color to be used for this box |
name | the name of the data to this box, printed in rotated form |
val | the name will be printed downwards starting from this value |
Referenced by set_use_minmax().
int CH_Tools::BoxPlot::start_plot | ( | std::ostream & | out, |
const char * | options = 0 |
||
) |
output the LaTeX commands for starting a new plot
out | outstream (the file) |
options | as |
Referenced by set_use_minmax().