The contours values are drawn next to each contour.
It shows that 6 contours and 12 graphs were found.
TotalConts = 6
Contour 0 has 2 Graphs
Contour 1 has 2 Graphs
Contour 2 has 2 Graphs
Contour 3 has 2 Graphs
Contour 4 has 2 Graphs
Contour 5 has 2 Graphs
Z-Level Passed in as: Z = -0.100000
Graph: 1 -- 147 Elements
Graph: 2 -- 147 Elements
Z-Level Passed in as: Z = -0.500000
Graph: 3 -- 93 Elements
Graph: 4 -- 93 Elements
Z-Level Passed in as: Z = -0.700000
Graph: 5 -- 65 Elements
Graph: 6 -- 65 Elements
Z-Level Passed in as: Z = 0.100000
Graph: 7 -- 147 Elements
Graph: 8 -- 147 Elements
Z-Level Passed in as: Z = 0.400000
Graph: 9 -- 107 Elements
Graph: 10 -- 107 Elements
Z-Level Passed in as: Z = 0.800000
Graph: 11 -- 49 Elements
Graph: 12 -- 49 Elements
Extracted 6 Contours and 12 Graphs
(TCanvas *) 0x55845373a800
for ( i = 0; i < nZsamples; i++) {
z[i] = (i)*dZ - HofZwavelength/2.0;
HofZ[i] = SawTooth(z[i], HofZwavelength);
}
for(
Int_t i=0; i < nPhiSamples; i++){
phi[i] = (i)*dPhi;
FofPhi[i] = sin(phi[i]);
}
TH2D *HistStreamFn =
new TH2D(
"HstreamFn",
"#splitline{Histogram with negative and positive contents. Six contours are defined.}{It is plotted with options CONT LIST to retrieve the contours points in TGraphs}",
nZsamples, z[0], z[nZsamples-1], nPhiSamples, phi[0], phi[nPhiSamples-1]);
for (
Int_t i = 0; i < nZsamples; i++) {
for(
Int_t j = 0; j < nPhiSamples; j++){
}
}
contours[0] = -0.7;
contours[1] = -0.5;
contours[2] = -0.1;
contours[3] = 0.1;
contours[4] = 0.4;
contours[5] = 0.8;
HistStreamFn->
Draw(
"CONT Z LIST");
if (!conts){
printf("*** No Contours Were Extracted!\n");
return nullptr;
}
TList* contLevel =
nullptr;
printf("TotalConts = %d\n", TotalConts);
for(i = 0; i < TotalConts; i++){
printf(
"Contour %d has %d Graphs\n", i, contLevel->
GetSize());
}
nGraphs = 0;
"#splitline{Negative contours are returned first (highest to lowest). Positive contours are returned from}{lowest to highest. On this plot Negative contours are drawn in red and positive contours in blue.}",
2, -2, 2, 2, 0, 6.5);
char val[20];
for(i = 0; i < TotalConts; i++){
if (i<3) zval0 = contours[2-i];
else zval0 = contours[i];
printf("Z-Level Passed in as: Z = %f\n", zval0);
for(j = 0; j < contLevel->
GetSize(); j++){
nGraphs ++;
printf(
"\tGraph: %d -- %d Elements\n", nGraphs,curv->
GetN());
sprintf(val,"%g",zval0);
l.DrawLatex(xval0,yval0,val);
}
}
printf("\n\n\tExtracted %d Contours and %d Graphs \n", TotalConts, nGraphs );
}
if ( (
x < -WaveLen/2) || (
x > WaveLen/2))
y = -99999999;
}
else if ((
x > -WaveLen/4) && (
x <= WaveLen/4)) {
}
else if ((
x > WaveLen/4) && (
x <= WaveLen/2)) {
}
}
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void gc
R__EXTERN TStyle * gStyle
Array of doubles (64 bits per element).
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
A TGraph is an object made of two arrays X and Y with npoints each.
virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y) const
Get x and y values for point number i.
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual void SetContour(Int_t nlevels, const Double_t *levels=nullptr)
Set the number and values of contour levels.
2-D histogram with a double per channel (see TH1 documentation)}
2-D histogram with a float per channel (see TH1 documentation)}
void SetBinContent(Int_t bin, Double_t content) override
Set bin content.
To draw Mathematical Formula.
TObject * After(const TObject *obj) const override
Returns the object after object obj.
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
TObject * Clone(const char *newname="") const override
Make a clone of an object using the Streamer facility.
TObject * At(Int_t idx) const override
TObject * FindObject(const char *name) const override
Find an object in this collection using its name.
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
void SetTitleW(Float_t w=0)
void SetTitleH(Float_t h=0)