Skip to content

Commit

Permalink
[tutorials] Move some tutorials to better suiting directories.
Browse files Browse the repository at this point in the history
  • Loading branch information
martamaja10 committed Jan 17, 2025
1 parent f3ef7fd commit b69754e
Show file tree
Hide file tree
Showing 24 changed files with 34 additions and 111 deletions.
2 changes: 1 addition & 1 deletion core/base/src/TColor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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:**
Expand Down
2 changes: 1 addition & 1 deletion graf2d/gpad/src/TAnnotation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ End_Macro
Another example:
Begin_Macro(source)
../../../tutorials/visualisation/graphs/annotation3d.C
../../../tutorials/visualisation/graphics/annotation3d.C
End_Macro
*/

Expand Down
4 changes: 2 additions & 2 deletions graf2d/graf/src/TGaxis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -675,15 +675,15 @@ 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
The following macro illustrates the use, with histograms axis, of the time mode on the axis
with different time intervals and time formats.
Begin_Macro(source)
../../../tutorials/visualisation/graphs/timeonaxis.C
../../../tutorials/hist/hist061_TH1_timeonaxis.C
End_Macro
*/
Expand Down
2 changes: 1 addition & 1 deletion test/stressGUI.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tutorials/demos.C
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion tutorials/demos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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' )
Expand Down
3 changes: 3 additions & 0 deletions tutorials/hist/hist004_TH1_labels.C
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -23,7 +23,7 @@

#include <time.h>

void timeonaxis()
void hist061_TH1_timeonaxis()
{

time_t script_time;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// \file
/// \ingroup tutorial_graphs
/// \ingroup tutorial_hist
/// \notebook
/// Define the time offset as 2003, January 1st.
///
Expand All @@ -8,7 +8,7 @@
///
/// \author Olivier Couet

void timeonaxis2()
void hist062_TH1_timeonaxis2()
{
auto ct2 = new TCanvas("ct2", "ct2", 10, 10, 700, 500);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// \file
/// \ingroup tutorial_graphs
/// \ingroup tutorial_hist
/// \notebook -js
/// Strip chart example.
///
Expand All @@ -17,7 +17,7 @@
#include "TRandom.h"
#include <cstdio>

void seism()
void hist063_TH1_seism()
{

TStopwatch sw;
Expand Down
7 changes: 4 additions & 3 deletions tutorials/hist/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tutorials/legacy/benchmarks.C
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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");
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// \file
/// \ingroup tutorial_hist
/// \ingroup tutorial_graphics
/// \notebook
/// Draw parametric functions with log scales.
///
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// \file
/// \ingroup tutorial_graphs
/// \ingroup tutorial_graphics
/// \notebook
/// Draw color plots using different color palettes.
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// \file
/// \ingroup tutorial_graphs
/// \ingroup tutorial_graphics
/// \notebook
/// Examples of use of the spline classes.
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// \file
/// \ingroup tutorial_graphs
/// \ingroup tutorial_graphics
/// \notebook
/// Draw 2-Dim functions.
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## \file
## \ingroup tutorial_graphs
## \ingroup tutorial_graphics
## \notebook
## Surfaces example
##
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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).
Expand All @@ -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);

Expand Down
37 changes: 0 additions & 37 deletions tutorials/visualisation/graphs/labels1.C

This file was deleted.

44 changes: 0 additions & 44 deletions tutorials/visualisation/graphs/labels2.C

This file was deleted.

0 comments on commit b69754e

Please sign in to comment.