diff --git a/core/base/src/TColor.cxx b/core/base/src/TColor.cxx index c2133ded05f84..a148d4474684d 100644 --- a/core/base/src/TColor.cxx +++ b/core/base/src/TColor.cxx @@ -315,7 +315,7 @@ display plots using different palettes on the same pad. The tutorial multipalette.C illustrates this feature. Begin_Macro(source) -../../../tutorials/visualisation/graphs/multipalette.C +../../../tutorials/visualisation/graphics/multipalette.C End_Macro \since **6.26:** diff --git a/graf2d/gpad/src/TAnnotation.cxx b/graf2d/gpad/src/TAnnotation.cxx index bd1fecdb5491a..c5f8de6dd7ed7 100644 --- a/graf2d/gpad/src/TAnnotation.cxx +++ b/graf2d/gpad/src/TAnnotation.cxx @@ -50,7 +50,7 @@ End_Macro Another example: Begin_Macro(source) -../../../tutorials/visualisation/graphs/annotation3d.C +../../../tutorials/visualisation/graphics/annotation3d.C End_Macro */ diff --git a/graf2d/graf/src/TGaxis.cxx b/graf2d/graf/src/TGaxis.cxx index a5f74619dc652..959560f18ffc6 100644 --- a/graf2d/graf/src/TGaxis.cxx +++ b/graf2d/graf/src/TGaxis.cxx @@ -675,7 +675,7 @@ and `localtime` give with what gives `TGaxis`. It can be used as referenced test to check if the time option of `TGaxis` is working properly. Begin_Macro(source) -../../../tutorials/visualisation/graphs/timeonaxis3.C +../../../tutorials/visualisation/graphics/timeonaxis3.C End_Macro @@ -683,7 +683,7 @@ The following macro illustrates the use, with histograms axis, of the time mode with different time intervals and time formats. Begin_Macro(source) -../../../tutorials/visualisation/graphs/timeonaxis.C +../../../tutorials/hist/hist061_TH1_timeonaxis.C End_Macro */ diff --git a/test/stressGUI.cxx b/test/stressGUI.cxx index 6f005d587dc29..bf34b7d8bdb35 100644 --- a/test/stressGUI.cxx +++ b/test/stressGUI.cxx @@ -2206,7 +2206,7 @@ void testControlBars() bar->AddButton("hsimple", ".x hsimple.C", "An Example Creating Histograms/Ntuples on File"); bar->AddButton("hsum", ".x hist/hsum.C", "Filling Histograms and Some Graphics Options"); bar->AddButton("formula1", ".x visualisation/graphics/formula1.C","Simple Formula and Functions"); - bar->AddButton("surfaces", ".x visualisation/graphs/surfaces.C", "Surface Drawing Options"); + bar->AddButton("surfaces", ".x visualisation/graphics/surfaces.C", "Surface Drawing Options"); bar->AddButton("fillrandom",".x hist/fillrandom.C", "Histograms with Random Numbers from a Function"); bar->AddButton("fit1", ".x fit/fit1.C", "A Simple Fitting Example"); bar->AddButton("multifit", ".x fit/multifit.C", "Fitting in Subranges of Histograms"); diff --git a/tutorials/CMakeLists.txt b/tutorials/CMakeLists.txt index 940aa0e1d9cc0..002bb2312e9b4 100644 --- a/tutorials/CMakeLists.txt +++ b/tutorials/CMakeLists.txt @@ -516,7 +516,7 @@ set(returncode_1 math/fit/fit2a.C hist/hist102_TH2_contour_list.C hist/hist006_TH1_bar_charts.C hist/hist037_TH2Poly_boxes.C - hist/hist060_TH1_Stats.C + hist/hist060_TH1_stats.C hist/hist014_TH1_cumulative.C hist/hist004_TH1_labels.C hist/hist036_TH2_labels.C diff --git a/tutorials/demos.C b/tutorials/demos.C index 391b50761d424..dab17c27c2eba 100644 --- a/tutorials/demos.C +++ b/tutorials/demos.C @@ -23,7 +23,7 @@ void demos() { bar->AddButton("hsimple", ".x hsimple.C", "An Example Creating Histograms/Ntuples on File"); bar->AddButton("hsum", ".x hist/hsum.C", "Filling Histograms and Some Graphics Options"); bar->AddButton("formula1", ".x visualisation/graphics/formula1.C", "Simple Formula and Functions"); - bar->AddButton("surfaces", ".x visualisation/graphs/surfaces.C", "Surface Drawing Options"); + bar->AddButton("surfaces", ".x visualisation/graphics/surfaces.C", "Surface Drawing Options"); bar->AddButton("fillrandom", ".x hist/fillrandom.C", "Histograms with Random Numbers from a Function"); bar->AddButton("fit1", ".x math/fit/fit1.C", "A Simple Fitting Example"); bar->AddButton("multifit", ".x math/fit/multifit.C", "Fitting in Subranges of Histograms"); diff --git a/tutorials/demos.py b/tutorials/demos.py index 93f77bb561e35..c79f37a4cb0bd 100644 --- a/tutorials/demos.py +++ b/tutorials/demos.py @@ -34,7 +34,7 @@ bar.AddButton( 'hsimple', r'TPython::Exec( "' + to_run.format('hsimple.py') + '" );', 'Creating histograms/Ntuples on file', "button" ) bar.AddButton( 'hsum', r'TPython::Exec( "' + to_run.format('hist/hsum.py') + '" );', 'Filling Histograms and Some Graphics Options' ) bar.AddButton( 'formula1', r'TPython::Exec( "' + to_run.format('visualisation/graphics/formula1.py') + '" );', 'Simple Formula and Functions' ) -bar.AddButton( 'surfaces', r'TPython::Exec( "' + to_run.format('visualisation/graphs/surfaces.py') + '" );', 'Surface Drawing Options' ) +bar.AddButton( 'surfaces', r'TPython::Exec( "' + to_run.format('visualisation/graphics/surfaces.py') + '" );', 'Surface Drawing Options' ) bar.AddButton( 'fillrandom', r'TPython::Exec( "' + to_run.format('hist/fillrandom.py') + '" );','Histograms with Random Numbers from a Function' ) bar.AddButton( 'fit1', r'TPython::Exec( "' + to_run.format('math/fit/fit1.py') + '" );', 'A Simple Fitting Example' ) bar.AddButton( 'multifit', r'TPython::Exec( "' + to_run.format('math/fit/multifit.py') + '" );', 'Fitting in Subranges of Histograms' ) diff --git a/tutorials/hist/hist004_TH1_labels.C b/tutorials/hist/hist004_TH1_labels.C index 7d96d46aa660b..c4aef18d4534b 100644 --- a/tutorials/hist/hist004_TH1_labels.C +++ b/tutorials/hist/hist004_TH1_labels.C @@ -52,6 +52,9 @@ TCanvas *hist004_TH1_labels() pt->SetFillColor(18); pt->SetTextAlign(12); pt->AddText("Use the axis Context Menu LabelsOption"); + pt->AddText(" \"a\" to sort by alphabetic order"); + pt->AddText(" \">\" to sort by decreasing values"); + pt->AddText(" \"<\" to sort by increasing values"); pt->Draw(); return c1; diff --git a/tutorials/hist/hist060_TH1_Stats.C b/tutorials/hist/hist060_TH1_stats.C similarity index 97% rename from tutorials/hist/hist060_TH1_Stats.C rename to tutorials/hist/hist060_TH1_stats.C index b552ed6c873e1..2a154871cea8a 100644 --- a/tutorials/hist/hist060_TH1_Stats.C +++ b/tutorials/hist/hist060_TH1_stats.C @@ -13,7 +13,7 @@ /// \date August 2016 /// \author Olivier Couet -TCanvas *hist060_TH1_Stats() +TCanvas *hist060_TH1_stats() { // Create and plot a test histogram with stats TCanvas *se = new TCanvas; diff --git a/tutorials/visualisation/graphs/timeonaxis.C b/tutorials/hist/hist061_TH1_timeonaxis.C similarity index 98% rename from tutorials/visualisation/graphs/timeonaxis.C rename to tutorials/hist/hist061_TH1_timeonaxis.C index 1ce5835da78aa..87051d89d4b9e 100644 --- a/tutorials/visualisation/graphs/timeonaxis.C +++ b/tutorials/hist/hist061_TH1_timeonaxis.C @@ -1,5 +1,5 @@ /// \file -/// \ingroup tutorial_graphs +/// \ingroup tutorial_hist /// \notebook -js /// This macro illustrates the use of the time mode on the axis /// with different time intervals and time formats. @@ -23,7 +23,7 @@ #include -void timeonaxis() +void hist061_TH1_timeonaxis() { time_t script_time; diff --git a/tutorials/visualisation/graphs/timeonaxis2.C b/tutorials/hist/hist062_TH1_timeonaxis2.C similarity index 93% rename from tutorials/visualisation/graphs/timeonaxis2.C rename to tutorials/hist/hist062_TH1_timeonaxis2.C index 556d728925707..d4bb1e715b5c7 100644 --- a/tutorials/visualisation/graphs/timeonaxis2.C +++ b/tutorials/hist/hist062_TH1_timeonaxis2.C @@ -1,5 +1,5 @@ /// \file -/// \ingroup tutorial_graphs +/// \ingroup tutorial_hist /// \notebook /// Define the time offset as 2003, January 1st. /// @@ -8,7 +8,7 @@ /// /// \author Olivier Couet -void timeonaxis2() +void hist062_TH1_timeonaxis2() { auto ct2 = new TCanvas("ct2", "ct2", 10, 10, 700, 500); diff --git a/tutorials/visualisation/graphs/seism.C b/tutorials/hist/hist063_TH1_seism.C similarity index 96% rename from tutorials/visualisation/graphs/seism.C rename to tutorials/hist/hist063_TH1_seism.C index 6f9155f7ef81f..7469d44a73202 100644 --- a/tutorials/visualisation/graphs/seism.C +++ b/tutorials/hist/hist063_TH1_seism.C @@ -1,5 +1,5 @@ /// \file -/// \ingroup tutorial_graphs +/// \ingroup tutorial_hist /// \notebook -js /// Strip chart example. /// @@ -17,7 +17,7 @@ #include "TRandom.h" #include -void seism() +void hist063_TH1_seism() { TStopwatch sw; diff --git a/tutorials/hist/index.md b/tutorials/hist/index.md index ce133f9dcd32c..c0af4d4334779 100644 --- a/tutorials/hist/index.md +++ b/tutorials/hist/index.md @@ -82,7 +82,10 @@ These examples shows some of the ratioplots |hist015_TH1_read_and_draw.C|hist015_TH1_read_and_draw.py|Read a 1D histogram from a ROOT File and draw it.| |hist016_TH1_different_scales_canvas.C||Draw two histograms on one canva using different y-axis scales.| |hist017_TH1_smooth.C||Histogram smoothing.| -|hist060_TH1_Stats.C||Edit statistics box.| +|hist060_TH1_stats.C||Edit statistics box.| +|hist061_TH1_timeonaxis.C||Use a time axis as an x axis.| +|hist062_TH1_timeonaxis2.C||Use a time axis as an x axis and use a time offset.| +|hist063_TH1_seism.C||Use a time axis as an x axis to show sine signal as a strip chart.| |hist101_TH1_autobinning.C||Fill multiple histograms with different functions and automatic binning.| \anchor th2 @@ -164,8 +167,6 @@ These examples shows some of the ratioplots |hist051_Graphics_candle_plot_stack.C|Create a THStack with candle plot option.| |hist052_Graphics_candle_plot_whiskers.C|Create a candle plot showing the whiskers definition.| |hist053_Graphics_candle_scaled.C|Illustrate what scaling effects on candle and violin charts.| -|hist054_Graphics_logscales.C|Draw parametric functions with log scales.| -|hist055_Graphics_xyplot.C|Draw a curve in an orthogonal axis system.| \anchor texec diff --git a/tutorials/legacy/benchmarks.C b/tutorials/legacy/benchmarks.C index e06e347e2107a..c1bc147c21b31 100644 --- a/tutorials/legacy/benchmarks.C +++ b/tutorials/legacy/benchmarks.C @@ -47,7 +47,7 @@ void benchmarks() { summary->AddText(" graphs/gr001_simple.C"); summary->AddText(" graphs/gr002_errors.C"); summary->AddText(" graphics/tornado.C"); - summary->AddText(" graphs/surfaces.C"); + summary->AddText(" graphics/surfaces.C"); summary->AddText(" graphs/gr303_zdemo.C"); summary->AddText(" geom/geometry.C"); summary->AddText(" geom/na49view.C"); @@ -63,7 +63,7 @@ void benchmarks() { bexec(dir,"graphs/gr001_simple.C"); bexec(dir,"graphs/gr002_errors.C"); bexec(dir,"graphics/tornado.C"); - bexec(dir,"graphs/surfaces.C"); + bexec(dir,"graphics/surfaces.C"); bexec(dir,"graphs/gr303_zdemo.C"); bexec(dir,"geom/geometry.C"); bexec(dir,"geom/na49view.C"); diff --git a/tutorials/visualisation/graphs/annotation3d.C b/tutorials/visualisation/graphics/annotation3d.C similarity index 98% rename from tutorials/visualisation/graphs/annotation3d.C rename to tutorials/visualisation/graphics/annotation3d.C index fd41560e0be54..14ef1e42b9cde 100644 --- a/tutorials/visualisation/graphs/annotation3d.C +++ b/tutorials/visualisation/graphics/annotation3d.C @@ -1,5 +1,5 @@ /// \file -/// \ingroup tutorial_graphs +/// \ingroup tutorial_graphics /// \notebook /// This example show how to put some annotation on a 3D plot using 3D /// polylines. It also demonstrates how the axis labels can be modified. diff --git a/tutorials/hist/hist054_Graphics_logscales.C b/tutorials/visualisation/graphics/logscales.C similarity index 98% rename from tutorials/hist/hist054_Graphics_logscales.C rename to tutorials/visualisation/graphics/logscales.C index 022ec788832a3..861ddd68a0f5f 100644 --- a/tutorials/hist/hist054_Graphics_logscales.C +++ b/tutorials/visualisation/graphics/logscales.C @@ -1,5 +1,5 @@ /// \file -/// \ingroup tutorial_hist +/// \ingroup tutorial_graphics /// \notebook /// Draw parametric functions with log scales. /// @@ -9,7 +9,7 @@ /// \date July 2016 /// \author Olivier Couet -void hist054_Graphics_logscales() +void logscales() { TCanvas *c1 = new TCanvas("c1", "Various options on LOG scales plots", 0, 0, 700, 900); c1->SetFillColor(30); diff --git a/tutorials/visualisation/graphs/multipalette.C b/tutorials/visualisation/graphics/multipalette.C similarity index 98% rename from tutorials/visualisation/graphs/multipalette.C rename to tutorials/visualisation/graphics/multipalette.C index 5caeffe66fb1a..1cd8b4904daa9 100644 --- a/tutorials/visualisation/graphs/multipalette.C +++ b/tutorials/visualisation/graphics/multipalette.C @@ -1,5 +1,5 @@ /// \file -/// \ingroup tutorial_graphs +/// \ingroup tutorial_graphics /// \notebook /// Draw color plots using different color palettes. /// diff --git a/tutorials/visualisation/graphs/splines_test.C b/tutorials/visualisation/graphics/splines_test.C similarity index 98% rename from tutorials/visualisation/graphs/splines_test.C rename to tutorials/visualisation/graphics/splines_test.C index de4623e9cb7d4..8a1f716ba0591 100644 --- a/tutorials/visualisation/graphs/splines_test.C +++ b/tutorials/visualisation/graphics/splines_test.C @@ -1,5 +1,5 @@ /// \file -/// \ingroup tutorial_graphs +/// \ingroup tutorial_graphics /// \notebook /// Examples of use of the spline classes. /// diff --git a/tutorials/visualisation/graphs/surfaces.C b/tutorials/visualisation/graphics/surfaces.C similarity index 98% rename from tutorials/visualisation/graphs/surfaces.C rename to tutorials/visualisation/graphics/surfaces.C index 5777e1babe01b..c3c6813cc802a 100644 --- a/tutorials/visualisation/graphs/surfaces.C +++ b/tutorials/visualisation/graphics/surfaces.C @@ -1,5 +1,5 @@ /// \file -/// \ingroup tutorial_graphs +/// \ingroup tutorial_graphics /// \notebook /// Draw 2-Dim functions. /// diff --git a/tutorials/visualisation/graphs/surfaces.py b/tutorials/visualisation/graphics/surfaces.py similarity index 97% rename from tutorials/visualisation/graphs/surfaces.py rename to tutorials/visualisation/graphics/surfaces.py index 2b45652dfe904..b3546331db4ab 100644 --- a/tutorials/visualisation/graphs/surfaces.py +++ b/tutorials/visualisation/graphics/surfaces.py @@ -1,5 +1,5 @@ ## \file -## \ingroup tutorial_graphs +## \ingroup tutorial_graphics ## \notebook ## Surfaces example ## diff --git a/tutorials/visualisation/graphs/timeonaxis3.C b/tutorials/visualisation/graphics/timeonaxis3.C similarity index 99% rename from tutorials/visualisation/graphs/timeonaxis3.C rename to tutorials/visualisation/graphics/timeonaxis3.C index eb1c0053a9493..7e8723551e993 100644 --- a/tutorials/visualisation/graphs/timeonaxis3.C +++ b/tutorials/visualisation/graphics/timeonaxis3.C @@ -1,5 +1,5 @@ /// \file -/// \ingroup tutorial_graphs +/// \ingroup tutorial_graphics /// \notebook /// This example compares what the system time function gmtime and localtime give /// with what gives TGaxis. It can be used as referenced test to check if TGaxis diff --git a/tutorials/hist/hist055_Graphics_xyplot.C b/tutorials/visualisation/graphics/xyplot.C similarity index 97% rename from tutorials/hist/hist055_Graphics_xyplot.C rename to tutorials/visualisation/graphics/xyplot.C index f5e0fbb90ab05..f1c5dcb59669b 100644 --- a/tutorials/hist/hist055_Graphics_xyplot.C +++ b/tutorials/visualisation/graphics/xyplot.C @@ -1,5 +1,5 @@ /// \file -/// \ingroup tutorial_hist +/// \ingroup tutorial_graphics /// \notebook /// Example showing how to produce a plot with an orthogonal axis system /// centered at (0,0). @@ -10,7 +10,7 @@ /// \date January 2017 /// \author Olivier Couet -void hist055_Graphics_xyplot() +void xyplot() { TCanvas *c = new TCanvas("c", "XY plot", 200, 10, 700, 500); diff --git a/tutorials/visualisation/graphs/labels1.C b/tutorials/visualisation/graphs/labels1.C deleted file mode 100644 index d1c70f9c3a4b8..0000000000000 --- a/tutorials/visualisation/graphs/labels1.C +++ /dev/null @@ -1,37 +0,0 @@ -/// \file -/// \ingroup tutorial_graphs -/// \notebook -/// Setting alphanumeric labels in a 1-d histogram. -/// -/// \macro_image -/// \macro_code -/// -/// \author Rene Brun - -void labels1() -{ - Int_t i; - const Int_t nx = 20; - const char *people[nx] = {"Jean", "Pierre", "Marie", "Odile", "Sebastien", "Fons", "Rene", - "Nicolas", "Xavier", "Greg", "Bjarne", "Anton", "Otto", "Eddy", - "Peter", "Pasha", "Philippe", "Suzanne", "Jeff", "Valery"}; - TCanvas *c1 = new TCanvas("c1", "demo bin labels", 10, 10, 900, 500); - c1->SetGrid(); - c1->SetBottomMargin(0.15); - TH1F *h = new TH1F("h", "test", nx, 0, nx); - h->SetFillColor(38); - for (i = 0; i < 5000; i++) - h->Fill(gRandom->Gaus(0.5 * nx, 0.2 * nx)); - h->SetStats(0); - for (i = 1; i <= nx; i++) - h->GetXaxis()->SetBinLabel(i, people[i - 1]); - h->Draw(); - TPaveText *pt = new TPaveText(0.6, 0.7, 0.98, 0.98, "brNDC"); - pt->SetFillColor(18); - pt->SetTextAlign(12); - pt->AddText("Use the axis Context Menu LabelsOption"); - pt->AddText(" \"a\" to sort by alphabetic order"); - pt->AddText(" \">\" to sort by decreasing values"); - pt->AddText(" \"<\" to sort by increasing values"); - pt->Draw(); -} diff --git a/tutorials/visualisation/graphs/labels2.C b/tutorials/visualisation/graphs/labels2.C deleted file mode 100644 index 78f15ab06f40b..0000000000000 --- a/tutorials/visualisation/graphs/labels2.C +++ /dev/null @@ -1,44 +0,0 @@ -/// \file -/// \ingroup tutorial_graphs -/// \notebook -/// Setting alphanumeric labels. -/// -/// \macro_image -/// \macro_code -/// -/// \author Rene Brun - -void labels2() -{ - Int_t i; - const Int_t nx = 12; - const Int_t ny = 20; - const char *month[nx] = {"January", "February", "March", "April", "May", "June", - "July", "August", "September", "October", "November", "December"}; - const char *people[ny] = {"Jean", "Pierre", "Marie", "Odile", "Sebastien", "Fons", "Rene", - "Nicolas", "Xavier", "Greg", "Bjarne", "Anton", "Otto", "Eddy", - "Peter", "Pasha", "Philippe", "Suzanne", "Jeff", "Valery"}; - TCanvas *c1 = new TCanvas("c1", "demo bin labels", 10, 10, 800, 800); - c1->SetGrid(); - c1->SetLeftMargin(0.15); - c1->SetBottomMargin(0.15); - TH2F *h = new TH2F("h", "test", nx, 0, nx, ny, 0, ny); - for (i = 0; i < 5000; i++) { - h->Fill(gRandom->Gaus(0.5 * nx, 0.2 * nx), gRandom->Gaus(0.5 * ny, 0.2 * ny)); - } - h->SetStats(0); - for (i = 1; i <= nx; i++) - h->GetXaxis()->SetBinLabel(i, month[i - 1]); - for (i = 1; i <= ny; i++) - h->GetYaxis()->SetBinLabel(i, people[i - 1]); - h->Draw("text"); - - TPaveText *pt = new TPaveText(0.6, 0.85, 0.98, 0.98, "brNDC"); - pt->SetFillColor(18); - pt->SetTextAlign(12); - pt->AddText("Use the axis Context Menu LabelsOption"); - pt->AddText(" \"a\" to sort by alphabetic order"); - pt->AddText(" \">\" to sort by decreasing values"); - pt->AddText(" \"<\" to sort by increasing values"); - pt->Draw(); -}