88 memcpy(
fColor, col, bufsize);
125 if (distance <= 5)
return distance;
163 double rwxmin, rwymin, rwxmax, rwymax;
165 fGraph->ComputeRange(rwxmin, rwymin, rwxmax, rwymax);
166 double dx = (rwxmax-rwxmin)*
fMargin;
167 double dy = (rwymax-rwymin)*
fMargin;
170 h->SetDirectory(
nullptr);
184 return h ?
h->GetXaxis() :
nullptr;
194 return h ?
h->GetYaxis() :
nullptr;
204 return h ?
h->GetZaxis() :
nullptr;
226 printf(
"x[%d]=%g, y[%d]=%g", i,
X[i], i, Y[i]);
228 if (
fSize) printf(
", size[%d]=%g", i,
fSize[i]);
267 out <<
" scat->SetMargin(" <<
GetMargin() <<
");\n";
272 static int histcnt = 0;
276 out <<
" scat->SetHistogram(" <<
fHistogram->GetName() <<
");\n";
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
const char Option_t
Option string (const char).
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
virtual void SaveMarkerAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1)
Class to manage histogram axis.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a line.
@ kNoStats
Don't draw stats box.
2-D histogram with a float per channel (see TH1 documentation)
void SavePrimitiveNameTitle(std::ostream &out, const char *variable_name)
Save object name and title into the output stream "out".
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
static void SavePrimitiveDraw(std::ostream &out, const char *variable_name, Option_t *option=nullptr)
Save invocation of primitive Draw() method Skipped if option contains "nodraw" string.
static void SavePrimitiveConstructor(std::ostream &out, TClass *cl, const char *variable_name, const char *constructor_agrs="", Bool_t empty_line=kTRUE)
Save object constructor in the output stream "out".
static TString SavePrimitiveVector(std::ostream &out, const char *prefix, Int_t len, Double_t *arr, Int_t flag=0)
Save array in the output stream "out" as vector.
TGraph * GetGraph() const
Get the graph holding X and Y positions.
Int_t fMaxSize
!Current dimension of arrays fX and fY
Double_t GetMaxMarkerSize() const
Get the largest marker size used to paint the markers.
Double_t fMaxMarkerSize
Largest marker size used to paint the markers.
void Print(Option_t *chopt="") const override
Print TNamed name and title.
void Paint(Option_t *chopt="") override
This method must be overridden if a class wants to paint itself.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to an event at (px,py).
TGraph * fGraph
Pointer to graph holding X and Y positions.
TH2F * GetHistogram() const
Get the graph histogram used for drawing axis.
Double_t * fColor
[fNpoints] array of colors
Double_t GetMinMarkerSize() const
Get the smallest marker size used to paint the markers.
Double_t * fSize
[fNpoints] array of marker sizes
Double_t fMargin
Margin around the plot in %.
Double_t GetMargin() const
Set the margin around the plot in %.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Computes distance from point (px,py) to the object.
Double_t fMinMarkerSize
Smallest marker size used to paint the markers.
Int_t fNpoints
Number of points <= fMaxSize.
TH2F * fHistogram
Pointer to histogram used for drawing axis.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
virtual void ExecuteEventHelper(TGraph *theGraph, Int_t event, Int_t px, Int_t py)=0
virtual Int_t DistancetoPrimitiveHelper(TGraph *theGraph, Int_t px, Int_t py)=0
virtual void PaintScatter(TScatter *theScatter, Option_t *option)=0
static TVirtualGraphPainter * GetPainter()
Static function returning a pointer to the current graph painter.