# Newbie

**URL:** https://root-forum.cern.ch/c/newbie/26.md?page=71

[Latest](https://root-forum.cern.ch/latest.md) · [Categories](https://root-forum.cern.ch/categories.md) · [Tags](https://root-forum.cern.ch/tags.md)

**Page:** 72

---

## [Plotting multiple palettes on the same TCanvas](https://root-forum.cern.ch/t/plotting-multiple-palettes-on-the-same-tcanvas/45454)

<div class="topic-metadata">

**Author:** [@uwagura](https://root-forum.cern.ch/u/uwagura)\
**Replies:** 3\
**Last updated:** [June 18, 2021, 2:08pm UTC](https://root-forum.cern.ch/t/plotting-multiple-palettes-on-the-same-tcanvas/45454 "2021-06-18T14:08:39Z")

</div>

Hello, I am trying to make two plots on a single TCanvas, one with a kBird color palette and one with a custom defined color palette, using the following lines of code: // Draw histogram c2-\>Divide(2,2); c2-\>c…

---

## [Problems with h2root](https://root-forum.cern.ch/t/problems-with-h2root/43676)

<div class="topic-metadata">

**Author:** [@R\_L](https://root-forum.cern.ch/u/R_L)\
**Replies:** 14\
**Last updated:** [June 17, 2021, 4:00pm UTC](https://root-forum.cern.ch/t/problems-with-h2root/43676 "2021-06-17T16:00:16Z")

</div>

Hello, I installed Root Version 6.22/06 using homebrew on MacOS 10.15.7. I need to convert hbook files to root files with h2root. I get the following error message when I try to convert a file: Converting directory //e…

---

## [ROOT lags when creating large multi-dimensional vector of TH1 pointers](https://root-forum.cern.ch/t/root-lags-when-creating-large-multi-dimensional-vector-of-th1-pointers/45429)

<div class="topic-metadata">

**Author:** [@zepyoorkhechadoorian](https://root-forum.cern.ch/u/zepyoorkhechadoorian)\
**Replies:** 2\
**Last updated:** [June 17, 2021, 1:56pm UTC](https://root-forum.cern.ch/t/root-lags-when-creating-large-multi-dimensional-vector-of-th1-pointers/45429 "2021-06-17T13:56:58Z")

</div>

Hi all, I am trying to create a large multi-dimensional vector of TH1D pointers. I’d like to be able to declare each histogram with a name, title, and bin specifications (as the example shows below). However, I have not…

---

## [Snapshot a friend tree with RDataFrame and ImplicitMT enabled](https://root-forum.cern.ch/t/snapshot-a-friend-tree-with-rdataframe-and-implicitmt-enabled/45428)

<div class="topic-metadata">

**Author:** [@Massimo\_Girola](https://root-forum.cern.ch/u/Massimo_Girola)\
**Replies:** 6\
**Last updated:** [June 17, 2021, 1:31pm UTC](https://root-forum.cern.ch/t/snapshot-a-friend-tree-with-rdataframe-and-implicitmt-enabled/45428 "2021-06-17T13:31:35Z")

</div>

Hi, I have a TTree with two branches and I want to add a friend tree in the same root file with new branches. I am using RDataFrames to define the new columns in the friend tree but I can’t figure out how to correctly …

---

## [Saving complex numbers on a TBranch](https://root-forum.cern.ch/t/saving-complex-numbers-on-a-tbranch/45349)

<div class="topic-metadata">

**Author:** [@ed20](https://root-forum.cern.ch/u/ed20)\
**Replies:** 2\
**Last updated:** [June 16, 2021, 8:24pm UTC](https://root-forum.cern.ch/t/saving-complex-numbers-on-a-tbranch/45349 "2021-06-16T20:24:47Z")

</div>

What is the fastest way to write a complex variable to a branch in ROOT? I have real and complex variables, and custom structs containing arrays of real and complex variables, as follows (simplified version): template\<t…

---

## [Accessing TNonSplitBrowsable](https://root-forum.cern.ch/t/accessing-tnonsplitbrowsable/45425)

<div class="topic-metadata">

**Author:** [@stephen-mul](https://root-forum.cern.ch/u/stephen-mul)\
**Replies:** 10\
**Last updated:** [June 16, 2021, 2:33pm UTC](https://root-forum.cern.ch/t/accessing-tnonsplitbrowsable/45425 "2021-06-16T14:33:23Z")

</div>

Please read tips for efficient and successful posting and posting code \_ROOT Version: 16.08/05 \_Platform: Scientific Linux \_Compiler: Unsure I’m trying to write a macro where I would plot a 2D histogram. The data I…

---

## [ROOT not opening display/graphics when run from ssh](https://root-forum.cern.ch/t/root-not-opening-display-graphics-when-run-from-ssh/45380)

<div class="topic-metadata">

**Author:** [@vd128](https://root-forum.cern.ch/u/vd128)\
**Replies:** 9\
**Last updated:** [June 16, 2021, 1:25pm UTC](https://root-forum.cern.ch/t/root-not-opening-display-graphics-when-run-from-ssh/45380 "2021-06-16T13:25:55Z")

</div>

Hi, I started having an issue in the graphic display when running ROOT in ssh. I am using macOS (Big Sur 11.4), everything was working well until I did an update of XQuartz (2.8.1). From that moment, when I try to open…

---

## [ROOT fails recovering a file](https://root-forum.cern.ch/t/root-fails-recovering-a-file/45232)

<div class="topic-metadata">

**Author:** [@EVTO](https://root-forum.cern.ch/u/EVTO)\
**Replies:** 4\
**Last updated:** [June 16, 2021, 8:36am UTC](https://root-forum.cern.ch/t/root-fails-recovering-a-file/45232 "2021-06-16T08:36:29Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided Hi. I think I have accidentally made ROOT crash. I downloaded a .root …

---

## [How to install root on windows 10?](https://root-forum.cern.ch/t/how-to-install-root-on-windows-10/45411)

<div class="topic-metadata">

**Author:** [@Jaggs\_K](https://root-forum.cern.ch/u/Jaggs_K)\
**Replies:** 4\
**Last updated:** [June 16, 2021, 5:20am UTC](https://root-forum.cern.ch/t/how-to-install-root-on-windows-10/45411 "2021-06-16T05:20:47Z")

</div>

Hello! I know this question has been asked before, but I couldn’t find any proper answer to this question. How to install root on windows 10, is there a guide or a video that explains every step? Please read tips for e…

---

## [Saving a TTree to a TFile every 100 ms](https://root-forum.cern.ch/t/saving-a-ttree-to-a-tfile-every-100-ms/45407)

<div class="topic-metadata">

**Author:** [@Anno](https://root-forum.cern.ch/u/Anno)\
**Replies:** 4\
**Last updated:** [June 15, 2021, 1:54pm UTC](https://root-forum.cern.ch/t/saving-a-ttree-to-a-tfile-every-100-ms/45407 "2021-06-15T13:54:33Z")

</div>

For our experiment multiple devices are read out every 100 ms, their data is transferred to some buffers and these are then filled into a TTree, at the moment a couple of thousand Double\_t per event. This TTree is then s…

---

## [How do I change the title of my plot?](https://root-forum.cern.ch/t/how-do-i-change-the-title-of-my-plot/45344)

<div class="topic-metadata">

**Author:** [@fabstr](https://root-forum.cern.ch/u/fabstr)\
**Replies:** 3\
**Last updated:** [June 15, 2021, 9:09am UTC](https://root-forum.cern.ch/t/how-do-i-change-the-title-of-my-plot/45344 "2021-06-15T09:09:09Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.22/00 Platform: Ubuntu WSL2 Compiler: gedit, nano. Hello, I’m new to ROOT. I’m trying to change the title, xlabel and ylabel of…

---

## [Help me save my semester](https://root-forum.cern.ch/t/help-me-save-my-semester/45311)

<div class="topic-metadata">

**Author:** [@Ali\_Awada](https://root-forum.cern.ch/u/Ali_Awada)\
**Replies:** 2\
**Last updated:** [June 15, 2021, 8:45am UTC](https://root-forum.cern.ch/t/help-me-save-my-semester/45311 "2021-06-15T08:45:01Z")

</div>

Create exponential random number generator using these macros and example from previous slide ❑ Use uniform\_generator and TRandom::Uniform() and compare their performances ❑ Plot generated X distribution and compare …

---

## [Ploting just the error bar, without the histogram](https://root-forum.cern.ch/t/ploting-just-the-error-bar-without-the-histogram/45307)

<div class="topic-metadata">

**Author:** [@Cesar1](https://root-forum.cern.ch/u/Cesar1)\
**Replies:** 2\
**Last updated:** [June 15, 2021, 8:41am UTC](https://root-forum.cern.ch/t/ploting-just-the-error-bar-without-the-histogram/45307 "2021-06-15T08:41:54Z")

</div>

Dear experts, I need to plot just the error bars from the histogram, without piloting the histogram. There is a way to do this?.

---

## [Centralize TH2 polar plot](https://root-forum.cern.ch/t/centralize-th2-polar-plot/45274)

<div class="topic-metadata">

**Author:** [@Keyvan\_Tabaei](https://root-forum.cern.ch/u/Keyvan_Tabaei)\
**Replies:** 2\
**Last updated:** [June 15, 2021, 8:16am UTC](https://root-forum.cern.ch/t/centralize-th2-polar-plot/45274 "2021-06-15T08:16:19Z")

</div>

hello i ploted TH2 polar plot like this : by using this code : TFile\* f =new TFile("result.root"); TCanvas\* c1 = new TCanvas("c1", ""); c1-\>SetTheta(90); c1-\>SetPhi(0.); TH3D\* h3polar = (TH3D\*)f-\>Get…

---

## [Problem with DRAW Option "CONT4Z"](https://root-forum.cern.ch/t/problem-with-draw-option-cont4z/45264)

<div class="topic-metadata">

**Author:** [@abaf](https://root-forum.cern.ch/u/abaf)\
**Replies:** 8\
**Last updated:** [June 15, 2021, 7:55am UTC](https://root-forum.cern.ch/t/problem-with-draw-option-cont4z/45264 "2021-06-15T07:55:42Z")

</div>

Hi, I am trying to Draw a scatter plot with CONT4Z option, however, it show I have negative entries even though the minimum is 0 With the draw option “SCAT” I get only + values. Would like the same with the CONT draw o…

---

## [Automatically include header files while compiling using g++](https://root-forum.cern.ch/t/automatically-include-header-files-while-compiling-using-g/45322)

<div class="topic-metadata">

**Author:** [@pkalbhor](https://root-forum.cern.ch/u/pkalbhor)\
**Replies:** 1\
**Last updated:** [June 15, 2021, 7:33am UTC](https://root-forum.cern.ch/t/automatically-include-header-files-while-compiling-using-g/45322 "2021-06-15T07:33:10Z")

</div>

When running a macro using root -l macro.cc, I do not need to explicitly mention #include header.h lines for using ROOT classes. I have no idea how ROOT does that internally. But if I want to compile this macro using g+…

---

## [Show fitted function works differently (?) than before](https://root-forum.cern.ch/t/show-fitted-function-works-differently-than-before/45373)

<div class="topic-metadata">

**Author:** [@ACalcaterra](https://root-forum.cern.ch/u/ACalcaterra)\
**Replies:** 3\
**Last updated:** [June 15, 2021, 7:16am UTC](https://root-forum.cern.ch/t/show-fitted-function-works-differently-than-before/45373 "2021-06-15T07:16:32Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 5.34/36 Platform: cygwin Compiler: 10.2.0 Hi, I have a funny problem, see this example: TH1F\* h1 = new TH1F("h1","h1",10,0.,1.);…

---

## [Drawing TH2 slow on windows](https://root-forum.cern.ch/t/drawing-th2-slow-on-windows/45396)

<div class="topic-metadata">

**Author:** [@ming](https://root-forum.cern.ch/u/ming)\
**Replies:** 2\
**Last updated:** [June 15, 2021, 7:01am UTC](https://root-forum.cern.ch/t/drawing-th2-slow-on-windows/45396 "2021-06-15T07:01:09Z")

</div>

Hello, I am trying to develop a Qt application using ROOT for plotting. Basically, the program will process the real time data, reconstruct a 2d image and draw it with “COLZ” option. I started from this code and simply …

---

## [RDataFrame loop over vector to test all possible combinations](https://root-forum.cern.ch/t/rdataframe-loop-over-vector-to-test-all-possible-combinations/45392)

<div class="topic-metadata">

**Author:** [@tancredi](https://root-forum.cern.ch/u/tancredi)\
**Replies:** 1\
**Last updated:** [June 14, 2021, 3:39pm UTC](https://root-forum.cern.ch/t/rdataframe-loop-over-vector-to-test-all-possible-combinations/45392 "2021-06-14T15:39:03Z")

</div>

Hello, I would like to write a simple Kzero finder in RDataFrame. I have a vector of all tracks and I need to compute the invariant mass of all pairs. Something like for i in tracks: for j in track: mass=Mass(i,j) …

---

## [1D histogram questions](https://root-forum.cern.ch/t/1d-histogram-questions/45365)

<div class="topic-metadata">

**Author:** [@obitter16](https://root-forum.cern.ch/u/obitter16)\
**Replies:** 3\
**Last updated:** [June 13, 2021, 4:34pm UTC](https://root-forum.cern.ch/t/1d-histogram-questions/45365 "2021-06-13T16:34:26Z")

</div>

Dear Experts, I’m new to drawing 1D histograms in ROOT and I’m having trouble finding out how to maintain the same size of the bins on the x-axis. Also, how would one draw vertical lines separating said bins? I’d grea…

---

## [Cut 2D-histogram](https://root-forum.cern.ch/t/cut-2d-histogram/45368)

<div class="topic-metadata">

**Author:** [@javivilladamigo](https://root-forum.cern.ch/u/javivilladamigo)\
**Replies:** 7\
**Last updated:** [June 13, 2021, 3:37pm UTC](https://root-forum.cern.ch/t/cut-2d-histogram/45368 "2021-06-13T15:37:47Z")

</div>

Hi, I am currently trying to analyze the energy loss of electrons in an active target gas. When I drew a 2D histogram with the ∆E/∆s versus ∑∆s (i.e. energy loss per step divided by the length of the step, versus the ac…

---

## [TKDE example in pyroot](https://root-forum.cern.ch/t/tkde-example-in-pyroot/45360)

<div class="topic-metadata">

**Author:** [@dertexaner](https://root-forum.cern.ch/u/dertexaner)\
**Replies:** 2\
**Last updated:** [June 13, 2021, 8:58am UTC](https://root-forum.cern.ch/t/tkde-example-in-pyroot/45360 "2021-06-13T08:58:27Z")

</div>

Dear experts, Could you point me to a snippet of TKDE use in pyroot? i.e. something like this ROOT: tutorials/math/exampleTKDE.C File Reference It’s not clear to me how the syntax would work in python for the construc…

---

## [Lxplus problems](https://root-forum.cern.ch/t/lxplus-problems/45367)

<div class="topic-metadata">

**Author:** [@Sima\_Bashiri](https://root-forum.cern.ch/u/Sima_Bashiri)\
**Replies:** 1\
**Last updated:** [June 12, 2021, 9:02am UTC](https://root-forum.cern.ch/t/lxplus-problems/45367 "2021-06-12T09:02:58Z")

</div>

hi, i have some questions around working with lxplus. is there any forum for asking and answering questions like this site?

---

## [Help with TF2 integral](https://root-forum.cern.ch/t/help-with-tf2-integral/45326)

<div class="topic-metadata">

**Author:** [@rpitta](https://root-forum.cern.ch/u/rpitta)\
**Replies:** 6\
**Last updated:** [June 12, 2021, 7:34am UTC](https://root-forum.cern.ch/t/help-with-tf2-integral/45326 "2021-06-12T07:34:43Z")

</div>

I’m not sure if It’s the right place to ask this question. I’m trying to write a TF2 function for integration purposes. It is something like this: Integral = \\int\_0^umx du u f(u) \\int\_fmin(u)^fmax(u) dE crossection(E) …

---

## [Pull Distribution in binned fits (not using Roofit)](https://root-forum.cern.ch/t/pull-distribution-in-binned-fits-not-using-roofit/45093)

<div class="topic-metadata">

**Author:** [@sanjeeda](https://root-forum.cern.ch/u/sanjeeda)\
**Replies:** 9\
**Last updated:** [June 11, 2021, 2:50pm UTC](https://root-forum.cern.ch/t/pull-distribution-in-binned-fits-not-using-roofit/45093 "2021-06-11T14:50:48Z")

</div>

Dear Experts, I am trying to do a binned fit using the functions that I have written. I am able to do the fit but I am not able to make the pull distributions for this fit. I do.t want to use Roofit for this case Would…

---

## [How do I produce multiple canvas from a macro?](https://root-forum.cern.ch/t/how-do-i-produce-multiple-canvas-from-a-macro/45355)

<div class="topic-metadata">

**Author:** [@fabstr](https://root-forum.cern.ch/u/fabstr)\
**Replies:** 2\
**Last updated:** [June 11, 2021, 9:25am UTC](https://root-forum.cern.ch/t/how-do-i-produce-multiple-canvas-from-a-macro/45355 "2021-06-11T09:25:54Z")

</div>

Please read tips for efficient and successful posting and posting code \_ROOT Version:\_6.22/00 Platform: Ubuntu WSL2 Compiler: gedit, nano. Hello, how do I produce two or more canvas from a macro? My data is loade…

---

## [Issues with void function inside macro](https://root-forum.cern.ch/t/issues-with-void-function-inside-macro/45347)

<div class="topic-metadata">

**Author:** [@AriM](https://root-forum.cern.ch/u/AriM)\
**Replies:** 3\
**Last updated:** [June 11, 2021, 6:03am UTC](https://root-forum.cern.ch/t/issues-with-void-function-inside-macro/45347 "2021-06-11T06:03:47Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.16 Platform: linux8664gcc Hello, I’ve been having an error when trying to use a void function inside a macro “testing.c”. Here…

---

## [High memory usage when performing simulation and TTree filling](https://root-forum.cern.ch/t/high-memory-usage-when-performing-simulation-and-ttree-filling/45341)

<div class="topic-metadata">

**Author:** [@loopset](https://root-forum.cern.ch/u/loopset)\
**Replies:** 2\
**Last updated:** [June 10, 2021, 4:07pm UTC](https://root-forum.cern.ch/t/high-memory-usage-when-performing-simulation-and-ttree-filling/45341 "2021-06-10T16:07:32Z")

</div>

Hello: First time using this forum! I’m having an issue, performing a simulation (creating random Double\_t) and filling then into a TTree (with several Branches). However, I have to run the simulation many times to get…

---

## [Plot variable distribution with histogram under unknown range of this variable](https://root-forum.cern.ch/t/plot-variable-distribution-with-histogram-under-unknown-range-of-this-variable/45336)

<div class="topic-metadata">

**Author:** [@Chipper](https://root-forum.cern.ch/u/Chipper)\
**Replies:** 2\
**Last updated:** [June 10, 2021, 12:21pm UTC](https://root-forum.cern.ch/t/plot-variable-distribution-with-histogram-under-unknown-range-of-this-variable/45336 "2021-06-10T12:21:00Z")

</div>

How to plot variable distribution with Histgram in the case that I dont know the range of this variable? Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: No…

---

## [I want to know the command to moving pad](https://root-forum.cern.ch/t/i-want-to-know-the-command-to-moving-pad/45334)

<div class="topic-metadata">

**Author:** [@IKoro](https://root-forum.cern.ch/u/IKoro)\
**Replies:** 4\
**Last updated:** [June 10, 2021, 11:39am UTC](https://root-forum.cern.ch/t/i-want-to-know-the-command-to-moving-pad/45334 "2021-06-10T11:39:40Z")

</div>

Hello everyone, I use the function gstyle and it’s works but i want to move the pad on left. When i can do that ? gStyle-\>SetOptStat(0); gStyle-\>SetOptFit(1111); TCanvas \*c1 = new TCanvas();

[Previous page](https://root-forum.cern.ch/c/newbie/26.md?page=70)

[Next page](https://root-forum.cern.ch/c/newbie/26.md?page=72)
