PYTHIA  8.312
Public Member Functions | List of all members
HistPlot Class Reference

#include <Basics.h>

Public Member Functions

 HistPlot (string pythonName, bool useLegacyIn=false)
 Constructor requires name of Python program (and adds .py).
 
 ~HistPlot ()
 Destructor should do final close.
 
void frame (string frameIn, string titleIn="", string xLabIn="", string yLabIn="", double xSizeIn=8., double ySizeIn=6.)
 New plot frame, with title, x and y labels, x and y sizes.
 
void add (const Hist &histIn, string styleIn="h", string legendIn="void")
 Add a histogram to the current plot, with optional style and legend.
 
void addFile (string fileIn, string styleIn="o", string legendIn="void", string xyerrIn="")
 Add a file of (x, y) values not from a histogram, e.g. data points.
 
void plot (bool logY=false, bool logX=false, bool userBorders=false)
 Plot a frame given the information from the new and add calls. More...
 
void plot (double xMinUserIn, double xMaxUserIn, double yMinUserIn, double yMaxUserIn, bool logY=false, bool logX=false)
 
void plotFrame (string frameIn, const Hist &histIn, string titleIn="", string xLabIn="", string yLabIn="", string styleIn="h", string legendIn="void", bool logY=false)
 Omnibus single call when only one histogram in the frame.
 

Detailed Description

HistPlot class. Writes a Python program that can generate PDF plots from Hist histograms.

Member Function Documentation

void plot ( bool  logY = false,
bool  logX = false,
bool  userBorders = false 
)

Plot a frame given the information from the new and add calls.

Generate the Python code for plotting a frame.

HistPlot class. Writes a Python program that can generate PDF plots from Hist histograms.

Start new file or add to existing one.

Loop through the vector of histograms.

Histogram information for plotting, especially x and y borders.

Split plotting style and potential colour information.

Write histogram itself to a data file as two columns of (x,y) values.

Write code to plot histogram.

Loop through the vector of already existing files, if any.

Split plotting style and potential colour information.

Find out whether and what kind of error bars should be plotted.

Write code to plot existing file. Trivial but tedious error bars.

Set borders and write axes.

Write title and labels, and create plot.

Update table counter. Done.


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