Xephyr style TMultiGraph. More...
#include <XeCore.h>
Public Member Functions | |
void | add (XeMultiGraph *mg) |
Add a multiGraph to the current one. | |
void | add (XeGraph *g, int color, string legend="") |
Add an existing XeGraph, setting its color and legend. | |
void | add (XeGraph *g, double z=UNDEFINED) |
Add an existing XeGraph. | |
void | applyStyle () |
Virtual method applying the XeStyle to the object. | |
void | draw (string options="L", int withLegend=0) |
Draw the Multigraph. | |
void | forceAxes (int which=0) |
Forces the labels according to those of one of the graphs (usually the 1st one). | |
string | generatedXLabel () |
automatic generation of X label | |
string | generatedYLabel () |
automatic generation of Y label | |
XeGraph * | getGraph (int i) |
Get a graph. | |
double | getMaxX () |
Get maximum overall X. | |
double | getMaxY () |
Get maximum overall Y. | |
double | getMinX () |
Get minimum overall X. | |
double | getMinY () |
Get minimum overall Y. | |
double | getMinYNotZero () |
Get minimum overall Y, ignoring zeros. | |
XeGraph * | getReferenceGraph () |
Get the reference graph. | |
vector< double > * | getVx () |
Access to vector of x-values. | |
vector< double > * | getVz () |
Access to vector of z-values. | |
double * | getX () |
Access to array of x-values. | |
double | getX (int g) |
Access to invidual x-value. | |
double * | getZ () |
Access to array of z-values. | |
double | getZ (int g) |
Access to invidual z-value. | |
void | modifyLineColor (int color=DEFAULT_LINE_COLOR) |
void | modifyLineStyle (int style=DEFAULT_LINE_STYLE) |
void | modifyLineWidth (int width=DEFAULT_LINE_WIDTH) |
XeMultiGraph * | normalize (int i=AUTO) |
Normarlize to one of its graphs, XeMultiGraph, ie divide each of this graphs by this one. | |
XeMultiGraph * | normalize (XeGraph *reference) |
Normalize to an XeGraph, ie divide each of this graphs by this one. | |
bool | printIt (int level=1) |
Dump the graphs. | |
void | setAsymmetricRainbowColors () |
void | setRainbowColors (int mode=ASYMMETRIC) |
Set the colors according the rainbow. | |
void | setReferenceGraph (int i) |
Set the reference graph from its own list. | |
void | setReferenceGraph (XeGraph *g) |
Set the reference graph (for further normalization). | |
void | setSymmetricRainbowColors () |
Set the colors according the symmetric rainbow. | |
XeMultiGraph * | transpose () |
Transpose the multigraph by changing its rows and columns. | |
XeMultiGraph (string name, vector< XeGraph * > &v, vector< double > *vz=NULL, string xA="", string yA="", string zA="") | |
Constructor of an XeMultiGraph from a list of existing graphs. | |
XeMultiGraph (string name, int ng, XeGraph **g, double *z=NULL, string xA="", string yA="", string zA="") | |
Constructor of an XeMultiGraph from a list of existing graphs. | |
XeMultiGraph (string name, string xA="", string yA="", string zA="") | |
Constructor of an XeMultiGraph from scratch. | |
Protected Member Functions | |
bool | addLegend (string leg) |
Internal method : push one legent. | |
void | resetTheLegends () |
Reset all legends. | |
Protected Attributes | |
XeGraph * | referenceGraph |
set< string > | theLegends |
vector< double > | Vx |
vector< double > | Vz |
Xephyr style TMultiGraph.
It is made of XeGraphs with all the same x vectors (known as Vx vector) Each graph differs from the other one by a z value (konwn as Vz vector)
XeMultiGraph::XeMultiGraph | ( | string | name, | |
string | xA = "" , |
|||
string | yA = "" , |
|||
string | zA = "" | |||
) |
Constructor of an XeMultiGraph from scratch.
name | name of the object | |
xA | x-Label | |
yA | y-Label | |
zA | z-Label (name of parameter varying from graph to graph) |
XeMultiGraph::XeMultiGraph | ( | string | name, | |
int | ng, | |||
XeGraph ** | g, | |||
double * | z = NULL , |
|||
string | xA = "" , |
|||
string | yA = "" , |
|||
string | zA = "" | |||
) |
Constructor of an XeMultiGraph from a list of existing graphs.
name | name of the object | |
ng | Number of pre-existing Xefraphs | |
g | pointer to pre-existing XeGraphs | |
z | z-values; if NULL assume 0,1,2,3 ... | |
xA | x-Label | |
yA | y-Label | |
zA | z-Label (name of parameter varying from graph to graph) |
XeMultiGraph::XeMultiGraph | ( | string | name, | |
vector< XeGraph * > & | v, | |||
vector< double > * | vz = NULL , |
|||
string | xA = "" , |
|||
string | yA = "" , |
|||
string | zA = "" | |||
) |
Constructor of an XeMultiGraph from a list of existing graphs.
name | name of the object | |
v | vector of pre-existing XeGraphs | |
vz | z-values; if NULL assume 0,1,2,3 ... | |
xA | x-Label | |
yA | y-Label | |
zA | z-Label (name of parameter varying from graph to graph) |
void XeMultiGraph::add | ( | XeMultiGraph * | mg | ) |
Add a multiGraph to the current one.
detailed | in detail |
void XeMultiGraph::add | ( | XeGraph * | g, | |
int | color, | |||
string | legend = "" | |||
) |
void XeMultiGraph::add | ( | XeGraph * | g, | |
double | z = UNDEFINED | |||
) |
bool XeMultiGraph::addLegend | ( | string | leg | ) | [protected] |
Internal method : push one legent.
leg | Legend to be added |
void XeMultiGraph::draw | ( | string | options = "L" , |
|
int | withLegend = 0 | |||
) | [virtual] |
Draw the Multigraph.
options | drawing options | |
withLegend | with the legend box |
Implements XeStylized.
void XeMultiGraph::forceAxes | ( | int | which = 0 |
) |
Forces the labels according to those of one of the graphs (usually the 1st one).
which | index of the reference graph |
XeGraph* XeMultiGraph::getGraph | ( | int | i | ) |
XeGraph* XeMultiGraph::getReferenceGraph | ( | ) |
Get the reference graph.
vector<double>* XeMultiGraph::getVx | ( | ) |
Access to vector of x-values.
vector<double>* XeMultiGraph::getVz | ( | ) |
Access to vector of z-values.
double* XeMultiGraph::getX | ( | ) |
Access to array of x-values.
double XeMultiGraph::getX | ( | int | g | ) |
Access to invidual x-value.
g | graph index |
double* XeMultiGraph::getZ | ( | ) |
Access to array of z-values.
double XeMultiGraph::getZ | ( | int | g | ) |
Access to invidual z-value.
g | graph index |
XeMultiGraph* XeMultiGraph::normalize | ( | int | i = AUTO |
) |
Normarlize to one of its graphs, XeMultiGraph, ie divide each of this graphs by this one.
i | sequence number (if AUTO), use the reference histogram |
XeMultiGraph* XeMultiGraph::normalize | ( | XeGraph * | reference | ) |
bool XeMultiGraph::printIt | ( | int | level = 1 |
) | [virtual] |
void XeMultiGraph::setRainbowColors | ( | int | mode = ASYMMETRIC |
) |
Set the colors according the rainbow.
mode | ASYMMETRIC or SYMMETRIC, whether we have one or two rainbows |
void XeMultiGraph::setReferenceGraph | ( | int | i | ) |
Set the reference graph from its own list.
i | sequence number of reference graph |
void XeMultiGraph::setReferenceGraph | ( | XeGraph * | g | ) |
Set the reference graph (for further normalization).
g | the graph |
XeMultiGraph* XeMultiGraph::transpose | ( | ) |
Transpose the multigraph by changing its rows and columns.
XeGraph* XeMultiGraph::referenceGraph [protected] |
Pointer to reference graph
set<string> XeMultiGraph::theLegends [protected] |
Legends of indiviudal graphs
vector<double> XeMultiGraph::Vx [protected] |
Vector of reference X value
vector<double> XeMultiGraph::Vz [protected] |
Vector of "z" values