A collection of static methods for gaphics. More...
#include <XeCore.h>
Static Public Member Functions | |
| static TH1F * | drawCumulated (TH1F *h, int color=kRed) |
| Draw the cumulated content of an histogram. | |
| static void | drawHist (TH2 *h, string tx="", string ty="", int zscale=LINEAR) |
| Draw a 2D histogram in a Canvas, with reasonable titles and options. | |
| static void | drawHist (TH1 *h, int ysc, string tx="", string ty="", string opt="") |
| Opotionnaly Draw a 1D histogram with reasonable titles and options. | |
| static void | drawHist (TH1 *h, string tx="", string ty="", string opt="") |
| Draw a 1D histogram with reasonable titles and options. | |
| static int | getFont () |
| Get the font. | |
| static int | isLog (int scale) |
| Return 0 or 1 for ROOT, depending on given scale. | |
| static bool | isScaleError (int flag, bool warn=true) |
| Return error if flag isn't either LOG or LINEAR Optionally Print a warning message if not. | |
| static bool | isScaleOK (int flag, bool warn=true) |
| Check that a flag is either LOG or LINEAR Optionally Print a warning message if not. | |
| static void | newCanvas (string name="", int nx=1, int ny=1, bool square=false) |
| Create a canvas and open it. | |
| static void | newFrame (string title, double xmi, double xma, double ymi, double yma, string tx="", string ty="", int xMode=LINEAR, int yMode=LINEAR) |
| Draw a frame with limits and legends. | |
| static void | newFrameZ (string title, double xmi, double xma, double ymi, double yma, double zmi, double zma, int zscale=LINEAR, string tx="", string ty="") |
| Draw a frame for 3 D flots with limits and legends. | |
| static void | nextSubCanvas () |
| Switches to next subCanvas. | |
| static void | saveCanvas (string header="") |
| Save current canvas in pnf format, looking for . | |
| static void | setFont (int font) |
| Set the font the cumulated content of an histogram. | |
| static void | subCanvas (double xmin, double xmax, double ymin, double ymax) |
| Define a floating sub canvas. | |
| static void | subCanvas (int window) |
| Switches to given subCanvas. | |
| static void | subCanvas (int nx, int ny, int window=0) |
| Define a sub canvas, and increment window; Called with no argument will keep divison an increment the sub canvas. | |
| static void | updateGraphics () |
| Update the graphics = force output. | |
Static Protected Attributes | |
| static TCanvas * | canvas |
| static int | font |
| static TPad * | pad |
| static int | wCanvas |
| static int | xCanvas |
| static int | yCanvas |
A collection of static methods for gaphics.
| static TH1F* XeGraphics::drawCumulated | ( | TH1F * | h, | |
| int | color = kRed | |||
| ) | [static] |
Draw the cumulated content of an histogram.
| color | which color to be drawn |
| static void XeGraphics::drawHist | ( | TH2 * | h, | |
| string | tx = "", |
|||
| string | ty = "", |
|||
| int | zscale = LINEAR | |||
| ) | [static] |
Draw a 2D histogram in a Canvas, with reasonable titles and options.
| h | pointer to scatter plot to be drawn | |
| tx | Title for x-axis | |
| ty | Title for y-axis | |
| zscale | LINEAR, LOG, or NONE (do nothing) |
| static void XeGraphics::drawHist | ( | TH1 * | h, | |
| int | ysc, | |||
| string | tx = "", |
|||
| string | ty = "", |
|||
| string | opt = "" | |||
| ) | [static] |
Opotionnaly Draw a 1D histogram with reasonable titles and options.
| h | pointer to histogram to be drawn | |
| ysc | yScale LINEAR, LOG, or NONE (do nothing) | |
| tx | Title for x-axis | |
| ty | Title for y-axis | |
| opt | option to be passed to h->Draw(); |
| static void XeGraphics::drawHist | ( | TH1 * | h, | |
| string | tx = "", |
|||
| string | ty = "", |
|||
| string | opt = "" | |||
| ) | [static] |
Draw a 1D histogram with reasonable titles and options.
| h | pointer to histogram to be drawn | |
| tx | Title for x-axis | |
| ty | Title for y-axis | |
| opt | option to be passed to h->Draw(); |
| static int XeGraphics::isLog | ( | int | scale | ) | [static] |
Return 0 or 1 for ROOT, depending on given scale.
| scale | graphic mode being checked |
| static bool XeGraphics::isScaleError | ( | int | flag, | |
| bool | warn = true | |||
| ) | [static] |
Return error if flag isn't either LOG or LINEAR Optionally Print a warning message if not.
| flag | value to be tested | |
| warn | print a warning in case of error |
| static bool XeGraphics::isScaleOK | ( | int | flag, | |
| bool | warn = true | |||
| ) | [static] |
Check that a flag is either LOG or LINEAR Optionally Print a warning message if not.
| flag | value to be tested | |
| warn | print a warning in case of error |
| static void XeGraphics::newCanvas | ( | string | name = "", |
|
| int | nx = 1, |
|||
| int | ny = 1, |
|||
| bool | square = false | |||
| ) | [static] |
Create a canvas and open it.
| name | canvas name | |
| nx | divide it in nx columns of sub canvases | |
| ny | divide it in ny rows of subcanvas | |
| square | make it square |
| static void XeGraphics::newFrame | ( | string | title, | |
| double | xmi, | |||
| double | xma, | |||
| double | ymi, | |||
| double | yma, | |||
| string | tx = "", |
|||
| string | ty = "", |
|||
| int | xMode = LINEAR, |
|||
| int | yMode = LINEAR | |||
| ) | [static] |
Draw a frame with limits and legends.
| title | frame title | |
| xmi | lower x limit | |
| xma | upper x limit | |
| ymi | lower y limit | |
| yma | upper y limit | |
| tx | x title | |
| ty | y title |
| static void XeGraphics::newFrameZ | ( | string | title, | |
| double | xmi, | |||
| double | xma, | |||
| double | ymi, | |||
| double | yma, | |||
| double | zmi, | |||
| double | zma, | |||
| int | zscale = LINEAR, |
|||
| string | tx = "", |
|||
| string | ty = "" | |||
| ) | [static] |
Draw a frame for 3 D flots with limits and legends.
| title | frame title | |
| xmi | lower x limit | |
| xma | upper x limit | |
| ymi | lower y limit | |
| yma | upper y limit | |
| zmi | lower z limit | |
| zma | upper z limit | |
| zscale | z scale, LOG or LINEAR? | |
| tx | x title | |
| ty | y title |
| static void XeGraphics::saveCanvas | ( | string | header = "" |
) | [static] |
Save current canvas in pnf format, looking for .
/pictures or pictures dir. If such directories don't exist, save in current directory
| header | string to be added to the name |
| static void XeGraphics::setFont | ( | int | font | ) | [static] |
Set the font the cumulated content of an histogram.
| font | which font to be used |
| static void XeGraphics::subCanvas | ( | double | xmin, | |
| double | xmax, | |||
| double | ymin, | |||
| double | ymax | |||
| ) | [static] |
Define a floating sub canvas.
| xmin | Lower x-edge in overall canvas, from 0. to 1. | |
| xmin | Upper y-edge in overall canvas, from 0. to 1. | |
| ymin | Lower y-edge in overall canvas, from 0. to 1. | |
| ymin | Upper y-edge in overall canvas, from 0. to 1. |
| static void XeGraphics::subCanvas | ( | int | window | ) | [static] |
Switches to given subCanvas.
| window | where to plot, starting at zero; can be SAME or NEXT |
| static void XeGraphics::subCanvas | ( | int | nx, | |
| int | ny, | |||
| int | window = 0 | |||
| ) | [static] |
Define a sub canvas, and increment window; Called with no argument will keep divison an increment the sub canvas.
| nx | Number of vertical sub-canvas; SAME means no change | |
| ny | Number of horizontal sub-canvas; SAME means no change | |
| window | where to plot, starting at zero; can be SAME or NEXT |
TCanvas* XeGraphics::canvas [static, protected] |
Current canvas
int XeGraphics::font [static, protected] |
Current font
TPad* XeGraphics::pad [static, protected] |
Current pad
int XeGraphics::wCanvas [static, protected] |
current subcanvas
int XeGraphics::xCanvas [static, protected] |
Number of vertical subCanvas in canvas
int XeGraphics::yCanvas [static, protected] |
Number of horizontal subCancs in canvas
1.6.1