# Newbie

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

[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:** 89

---

## [Exponential fit not showing](https://root-forum.cern.ch/t/exponential-fit-not-showing/41314)

<div class="topic-metadata">

**Author:** [@Cepheides](https://root-forum.cern.ch/u/Cepheides)\
**Replies:** 4\
**Last updated:** [September 7, 2020, 3:46pm UTC](https://root-forum.cern.ch/t/exponential-fit-not-showing/41314 "2020-09-07T15:46:44Z")

</div>

I am trying to apply an exponential fit to a series of points that display exponential decay: 2 95 4 75 6 76 8 64 10 74 12 66 14 43 16 38 Here is my code: // Plot C1\_exppick.dat # include \<iostream\> # include \<fstrea…

---

## [Fitline not showing](https://root-forum.cern.ch/t/fitline-not-showing/41312)

<div class="topic-metadata">

**Author:** [@Cepheides](https://root-forum.cern.ch/u/Cepheides)\
**Replies:** 5\
**Last updated:** [September 7, 2020, 2:34pm UTC](https://root-forum.cern.ch/t/fitline-not-showing/41312 "2020-09-07T14:34:18Z")

</div>

I am trying to plot a linear fit through five points that have error bars. But it does not appear. Here is my code: # include \<iostream\> # include \<fstream\> # include \<math.h\> # include \<iomanip\> # include \<cmath\> # inc…

---

## [Fitline not appearing in Root](https://root-forum.cern.ch/t/fitline-not-appearing-in-root/41307)

<div class="topic-metadata">

**Author:** [@Cepheides](https://root-forum.cern.ch/u/Cepheides)\
**Replies:** 2\
**Last updated:** [September 6, 2020, 4:36pm UTC](https://root-forum.cern.ch/t/fitline-not-appearing-in-root/41307 "2020-09-06T16:36:28Z")

</div>

I am trying to write a code that simply places a linear fit across five data points. Here is the input file I am reading from: 1 2 3 2 4 5 3 7 2 4 7 1 And here is my code: # include \<iostream\> # includ…

---

## [Setting mean and median manually in violin plot](https://root-forum.cern.ch/t/setting-mean-and-median-manually-in-violin-plot/41178)

<div class="topic-metadata">

**Author:** [@youngrootuser](https://root-forum.cern.ch/u/youngrootuser)\
**Replies:** 6\
**Last updated:** [September 3, 2020, 10:06am UTC](https://root-forum.cern.ch/t/setting-mean-and-median-manually-in-violin-plot/41178 "2020-09-03T10:06:21Z")

</div>

Dear ROOTers, I want to plot some data using a violin plot. In the documentation of the THistPainter class, it is written, that the properties like mean and median are calculated from the binned data stored in the TH2 a…

---

## [Zoom individual pads of a canvas in a GUI](https://root-forum.cern.ch/t/zoom-individual-pads-of-a-canvas-in-a-gui/41209)

<div class="topic-metadata">

**Author:** [@rafopar](https://root-forum.cern.ch/u/rafopar)\
**Replies:** 9\
**Last updated:** [September 3, 2020, 6:55am UTC](https://root-forum.cern.ch/t/zoom-individual-pads-of-a-canvas-in-a-gui/41209 "2020-09-03T06:55:48Z")

</div>

Hi, I want to be able to zoom individual pads to see objects in individual pads better. When it is just a single canvas no sub psds, i.e. only one figure instead of 6, I use the ProcessedEvent(Int\_t event,Int\_t ix, In…

---

## [Quantify the flatness of an agreement plot](https://root-forum.cern.ch/t/quantify-the-flatness-of-an-agreement-plot/41247)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 3\
**Last updated:** [September 2, 2020, 6:29pm UTC](https://root-forum.cern.ch/t/quantify-the-flatness-of-an-agreement-plot/41247 "2020-09-02T18:29:44Z")

</div>

Dear, I’m comparing two TH1 distributions that should be very similar (typically a data/MC plot). In order to check the agreement, I also plot the ratio of the entries of these distributions in each bin, which in the be…

---

## [How to set Y axis of a histogram](https://root-forum.cern.ch/t/how-to-set-y-axis-of-a-histogram/41198)

<div class="topic-metadata">

**Author:** [@Afzaal786](https://root-forum.cern.ch/u/Afzaal786)\
**Replies:** 3\
**Last updated:** [September 2, 2020, 1:31pm UTC](https://root-forum.cern.ch/t/how-to-set-y-axis-of-a-histogram/41198 "2020-09-02T13:31:59Z")

</div>

How one can set the Y axis scale of a histogram?

---

## [Ubuntu 20 fail to update plot automatically when using animate()](https://root-forum.cern.ch/t/ubuntu-20-fail-to-update-plot-automatically-when-using-animate/41132)

<div class="topic-metadata">

**Author:** [@Zhenhao](https://root-forum.cern.ch/u/Zhenhao)\
**Replies:** 4\
**Last updated:** [September 2, 2020, 11:46am UTC](https://root-forum.cern.ch/t/ubuntu-20-fail-to-update-plot-automatically-when-using-animate/41132 "2020-09-02T11:46:25Z")

</div>

ROOT Version: 6.22.0 Platform: windows Compiler: Cling Hello, I am trying to combine tutorials example graphics/anim.C and hist/h2proj.C. I find something strange: the animate can update the plot automatically on W…

---

## [Is there any serial port library suport Cling on windows?](https://root-forum.cern.ch/t/is-there-any-serial-port-library-suport-cling-on-windows/41254)

<div class="topic-metadata">

**Author:** [@Zhenhao](https://root-forum.cern.ch/u/Zhenhao)\
**Replies:** 4\
**Last updated:** [September 2, 2020, 11:38am UTC](https://root-forum.cern.ch/t/is-there-any-serial-port-library-suport-cling-on-windows/41254 "2020-09-02T11:38:06Z")

</div>

Hello, I try to communicate to COM port on windows. I find there are some c++ library for serial communication. I try some of them but neither can work in Cling. For example the " wjwwood serial" in the github and anoth…

---

## [Output Histogram as Txt](https://root-forum.cern.ch/t/output-histogram-as-txt/41082)

<div class="topic-metadata">

**Author:** [@clkong](https://root-forum.cern.ch/u/clkong)\
**Replies:** 2\
**Last updated:** [September 2, 2020, 10:29am UTC](https://root-forum.cern.ch/t/output-histogram-as-txt/41082 "2020-09-02T10:29:55Z")

</div>

Hello everyone, I have created a subtracted histogram through an C file that “the histogram is made by getting data from a root file (named A.root), then it is subtracted by data in other two roots (named B.root and C.r…

---

## [How to get handle to the dynamic link library?](https://root-forum.cern.ch/t/how-to-get-handle-to-the-dynamic-link-library/41244)

<div class="topic-metadata">

**Author:** [@Zhenhao](https://root-forum.cern.ch/u/Zhenhao)\
**Replies:** 2\
**Last updated:** [September 1, 2020, 7:34pm UTC](https://root-forum.cern.ch/t/how-to-get-handle-to-the-dynamic-link-library/41244 "2020-09-01T19:34:13Z")

</div>

Hi, I have a dynamic link library which can be loaded to ROOT using gSystem-\>Load (). Then I need to apply GetProcAddress(handle, "FunctionName"). How can I get handle to the dynamic link library? Thank you very much…

---

## [Tolerance vs precision in Minimizer?](https://root-forum.cern.ch/t/tolerance-vs-precision-in-minimizer/41233)

<div class="topic-metadata">

**Author:** [@eggsAndCoffee](https://root-forum.cern.ch/u/eggsAndCoffee)\
**Replies:** 2\
**Last updated:** [September 1, 2020, 4:32pm UTC](https://root-forum.cern.ch/t/tolerance-vs-precision-in-minimizer/41233 "2020-09-01T16:32:31Z")

</div>

Hello, I am using the ROOT::Math::Minimizer class and I’m not sure what the difference is between SetTolerance() and SetPrecision(). I can’t quite find this in the documentation. Can someone please clarify this? Thank …

---

## [Permission error while building Root from source](https://root-forum.cern.ch/t/permission-error-while-building-root-from-source/40981)

<div class="topic-metadata">

**Author:** [@henrysp](https://root-forum.cern.ch/u/henrysp)\
**Replies:** 2\
**Last updated:** [September 1, 2020, 12:09pm UTC](https://root-forum.cern.ch/t/permission-error-while-building-root-from-source/40981 "2020-09-01T12:09:09Z")

</div>

Hello, I tried to build Root from the source with cmake --build . --target install and got this error: Install the project… – Install configuration: “Release” – Up-to-date: /lib CMake Error at cmake\_install.cmake:…

---

## [Setting a gate on a cube](https://root-forum.cern.ch/t/setting-a-gate-on-a-cube/40980)

<div class="topic-metadata">

**Author:** [@lum\_totzin](https://root-forum.cern.ch/u/lum_totzin)\
**Replies:** 2\
**Last updated:** [September 1, 2020, 10:43am UTC](https://root-forum.cern.ch/t/setting-a-gate-on-a-cube/40980 "2020-09-01T10:43:19Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.18 Platform: Not Provided Compiler: Not Provided Good day May you please help. I want to set a gate on a cube that is in a ro…

---

## [Set Scale along x & y axis](https://root-forum.cern.ch/t/set-scale-along-x-y-axis/40989)

<div class="topic-metadata">

**Author:** [@Afzaal786](https://root-forum.cern.ch/u/Afzaal786)\
**Replies:** 1\
**Last updated:** [September 1, 2020, 8:08am UTC](https://root-forum.cern.ch/t/set-scale-along-x-y-axis/40989 "2020-09-01T08:08:00Z")

</div>

Hi, i want to set scales along x & y axis of my histograms in ROOT TBrowser for merging two histograms into one pad how can i do that?

---

## [Histogram error](https://root-forum.cern.ch/t/histogram-error/40941)

<div class="topic-metadata">

**Author:** [@NewRootUser](https://root-forum.cern.ch/u/NewRootUser)\
**Replies:** 8\
**Last updated:** [September 1, 2020, 8:02am UTC](https://root-forum.cern.ch/t/histogram-error/40941 "2020-09-01T08:02:05Z")

</div>

I’m trying to draw two histograms (h1) on the same canvas from two different root files(1.root and 2.root). I used two macros (1.C and 2.C) but both are resulting in error. I’m attaching root files. 1.root (36.8 KB) 2.…

---

## [TH3D histogram: Lego plot issue](https://root-forum.cern.ch/t/th3d-histogram-lego-plot-issue/41104)

<div class="topic-metadata">

**Author:** [@Liam\_hayden](https://root-forum.cern.ch/u/Liam_hayden)\
**Replies:** 2\
**Last updated:** [August 31, 2020, 3:24pm UTC](https://root-forum.cern.ch/t/th3d-histogram-lego-plot-issue/41104 "2020-08-31T15:24:27Z")

</div>

I am trying to plot lego plots in 3D. But my lego plot looks like this Can anyone tell me what to do to get the normal ones. like i want a continuous one and the why i am getting such a plot. I used the option “Lego…

---

## [Using Root in Windows Visual Studio 2019](https://root-forum.cern.ch/t/using-root-in-windows-visual-studio-2019/37621)

<div class="topic-metadata">

**Author:** [@Rhiannon](https://root-forum.cern.ch/u/Rhiannon)\
**Replies:** 20\
**Last updated:** [August 31, 2020, 8:54am UTC](https://root-forum.cern.ch/t/using-root-in-windows-visual-studio-2019/37621 "2020-08-31T08:54:30Z")

</div>

Hello, I started learning C++/Visual Studio about 3 weeks ago and Root yesterday, so please assume I have no idea about anything. My problem in a short summary: How do I connect root to an existing C++ Code in Windows…

---

## [Looping over the bins of two 2D hists in a root file](https://root-forum.cern.ch/t/looping-over-the-bins-of-two-2d-hists-in-a-root-file/41169)

<div class="topic-metadata">

**Author:** [@hep\_1](https://root-forum.cern.ch/u/hep_1)\
**Replies:** 9\
**Last updated:** [August 31, 2020, 7:55am UTC](https://root-forum.cern.ch/t/looping-over-the-bins-of-two-2d-hists-in-a-root-file/41169 "2020-08-31T07:55:47Z")

</div>

So I have a root file named histfile.root that has two histograms named myhist1 and myhist2. So what I want to do now is loop over the bins of first histogram. Then, loop over the bins of the second histogram in the same…

---

## [Creating a new type?](https://root-forum.cern.ch/t/creating-a-new-type/41204)

<div class="topic-metadata">

**Author:** [@Knew](https://root-forum.cern.ch/u/Knew)\
**Replies:** 4\
**Last updated:** [August 29, 2020, 7:00pm UTC](https://root-forum.cern.ch/t/creating-a-new-type/41204 "2020-08-29T19:00:24Z")

</div>

Hello. I am trying to create a new type with Event \*event= new Event(); Inside a tree, but I face this error, error : Unknown type name ‘Event’ . Can anyone help me to fix it? Thanks in advance.

---

## [How to read a tree file, and fill histogram with leaf](https://root-forum.cern.ch/t/how-to-read-a-tree-file-and-fill-histogram-with-leaf/41199)

<div class="topic-metadata">

**Author:** [@SpookyCat23](https://root-forum.cern.ch/u/SpookyCat23)\
**Replies:** 1\
**Last updated:** [August 29, 2020, 6:23pm UTC](https://root-forum.cern.ch/t/how-to-read-a-tree-file-and-fill-histogram-with-leaf/41199 "2020-08-29T18:23:14Z")

</div>

I have a file named “WW” that contains a tree named “mini” that contains leaves with information. I want to write a script that reads this file and then plots multiple leaves into a histogram. Thanks

---

## [Problem with Fitting background + signal](https://root-forum.cern.ch/t/problem-with-fitting-background-signal/41200)

<div class="topic-metadata">

**Author:** [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Replies:** 1\
**Last updated:** [August 28, 2020, 9:34pm UTC](https://root-forum.cern.ch/t/problem-with-fitting-background-signal/41200 "2020-08-28T21:34:35Z")

</div>

Hello, I fit background data with a function. Then I performed a signal injection, and now I want to fit it with background+signal (pol5+Gauss), but I am getting an error with the Fit method. from ROOT import \* import …

---

## [Low Chi Squared/NDF](https://root-forum.cern.ch/t/low-chi-squared-ndf/41187)

<div class="topic-metadata">

**Author:** [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Replies:** 3\
**Last updated:** [August 28, 2020, 3:07pm UTC](https://root-forum.cern.ch/t/low-chi-squared-ndf/41187 "2020-08-28T15:07:23Z")

</div>

Hello, I fitted a graph in ROOT and I display test statistics. I discover a chi-square/ndf value close to 0, but the fit looks pretty good, why is this? It also says Prob 1, what does that mean? Any help is appreciated. …

---

## [Merging Datasets using RDataFrame](https://root-forum.cern.ch/t/merging-datasets-using-rdataframe/41163)

<div class="topic-metadata">

**Author:** [@vcroft](https://root-forum.cern.ch/u/vcroft)\
**Replies:** 6\
**Last updated:** [August 27, 2020, 12:06pm UTC](https://root-forum.cern.ch/t/merging-datasets-using-rdataframe/41163 "2020-08-27T12:06:29Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided Howdy folks, I’m looking for a nice way of merging the output from mul…

---

## [How to find the pointer of current histogram created by 'TMatrixD::Draw()'?](https://root-forum.cern.ch/t/how-to-find-the-pointer-of-current-histogram-created-by-tmatrixd-draw/41177)

<div class="topic-metadata">

**Author:** [@Zhenhao](https://root-forum.cern.ch/u/Zhenhao)\
**Replies:** 3\
**Last updated:** [August 27, 2020, 9:48am UTC](https://root-forum.cern.ch/t/how-to-find-the-pointer-of-current-histogram-created-by-tmatrixd-draw/41177 "2020-08-27T09:48:30Z")

</div>

Hi, I put a 2D data in a TMatrixD Matrix and plot it using TMatrixD::Draw() method. Then I want to change the x and y ticks and tickslabel, and bining the data inside because the interval of x axis is not averaged. How…

---

## [Writing TH1's while opening multiple TFiles](https://root-forum.cern.ch/t/writing-th1s-while-opening-multiple-tfiles/41167)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 2\
**Last updated:** [August 26, 2020, 7:59pm UTC](https://root-forum.cern.ch/t/writing-th1s-while-opening-multiple-tfiles/41167 "2020-08-26T19:59:32Z")

</div>

Dear, I have an issue here when trying to Write TH1’s in a rootfile: for i in range(0,len(rootfile\_list): file1 = ROOT.TFile(rootfile\_list\[i\], “read”) ihist = file1.Get(“hist”) Hists\_list.append(ihist) outfile = RO…

---

## [Make histogram with data stored in branch using PyROOT](https://root-forum.cern.ch/t/make-histogram-with-data-stored-in-branch-using-pyroot/41166)

<div class="topic-metadata">

**Author:** [@daymos93](https://root-forum.cern.ch/u/daymos93)\
**Replies:** 1\
**Last updated:** [August 26, 2020, 4:32pm UTC](https://root-forum.cern.ch/t/make-histogram-with-data-stored-in-branch-using-pyroot/41166 "2020-08-26T16:32:24Z")

</div>

Hello guys! First of all, sorry if the question is very obvious, I am a newbie using PyROOT. I am trying to make a histogram with data stored in a branch (see code) Turns out it doesn’t read the values. Read the numbe…

---

## [Getting parameter values between iterations (Minuit2)](https://root-forum.cern.ch/t/getting-parameter-values-between-iterations-minuit2/41050)

<div class="topic-metadata">

**Author:** [@david90](https://root-forum.cern.ch/u/david90)\
**Replies:** 3\
**Last updated:** [August 26, 2020, 7:40am UTC](https://root-forum.cern.ch/t/getting-parameter-values-between-iterations-minuit2/41050 "2020-08-26T07:40:26Z")

</div>

HI All, I am fitting a function to data using minuit2, I define my parameters using ROOT::Minuit2::MnUserParameters mnPars; then for the fitting process I use ROOT::Minuit2::MnMigrad, The fitter works perfectly fine, b…

---

## ['gSystem-\>Load()' cause 'cout\<\<anything\<\<endl;' crash root comand line on Win10](https://root-forum.cern.ch/t/gsystem-load-cause-cout-anything-endl-crash-root-comand-line-on-win10/41134)

<div class="topic-metadata">

**Author:** [@Zhenhao](https://root-forum.cern.ch/u/Zhenhao)\
**Replies:** 18\
**Last updated:** [August 25, 2020, 2:34pm UTC](https://root-forum.cern.ch/t/gsystem-load-cause-cout-anything-endl-crash-root-comand-line-on-win10/41134 "2020-08-25T14:34:19Z")

</div>

ROOT Version: 6.16.0 and 6.22 Platform: win 10 Compiler: Cling Hello, I am troubled by a strange behavior. Root comand line will crash for “cout\<\<anything\<\<endl;” if I use ‘gSystem-\>Load()’ to load a dll or lib fi…

---

## [dirs.C from root tutorials-how the histograms are filled and how to access to their entries?](https://root-forum.cern.ch/t/dirs-c-from-root-tutorials-how-the-histograms-are-filled-and-how-to-access-to-their-entries/41067)

<div class="topic-metadata">

**Author:** [@who\_cares](https://root-forum.cern.ch/u/who_cares)\
**Replies:** 6\
**Last updated:** [August 25, 2020, 12:27pm UTC](https://root-forum.cern.ch/t/dirs-c-from-root-tutorials-how-the-histograms-are-filled-and-how-to-access-to-their-entries/41067 "2020-08-25T12:27:12Z")

</div>

I checked the file “dirs.C” from root tutorials. Although I understand how the directories/folders are generated, I have many questions about the histograms generated, When checking the generated histograms, why there …

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

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