{ "cells": [ { "cell_type": "markdown", "id": "1e15f4c3", "metadata": {}, "source": [ "# hist033_TRatioPlot_fit_confidence\n", "the method `TRatioPlot::SetConfidenceIntervalColors`.\n", "\n", "\n", "\n", "\n", "**Author:** Paul Gessinger \n", "This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Tuesday, May 19, 2026 at 08:12 PM." ] }, { "cell_type": "code", "execution_count": 1, "id": "f2a305d4", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:12:47.094396Z", "iopub.status.busy": "2026-05-19T20:12:47.094254Z", "iopub.status.idle": "2026-05-19T20:12:47.667628Z", "shell.execute_reply": "2026-05-19T20:12:47.666931Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "****************************************\n", "Minimizer is Minuit2 / Migrad\n", "Chi2 = 22.1778\n", "NDf = 33\n", "Edm = 6.53577e-08\n", "NCalls = 55\n", "Constant = 158.988 +/- 4.47298 \n", "Mean = 0.00662197 +/- 0.0225355 \n", "Sigma = 0.993481 +/- 0.0169678 \t (limited)\n" ] } ], "source": [ "gStyle->SetOptStat(0);\n", "auto c1 = new TCanvas(\"c1\", \"fit residual simple\");\n", "auto h1 = new TH1D(\"h1\", \"h1\", 50, -5, 5);\n", "h1->FillRandom(\"gaus\", 2000);\n", "h1->Fit(\"gaus\", \"0\");\n", "h1->GetXaxis()->SetTitle(\"x\");\n", "h1->GetYaxis()->SetTitle(\"y\");\n", "auto rp1 = new TRatioPlot(h1);\n", "rp1->SetConfidenceIntervalColors(kBlue, kRed);\n", "rp1->Draw();" ] }, { "cell_type": "markdown", "id": "fa8ea3e5", "metadata": {}, "source": [ "Draw all canvases " ] }, { "cell_type": "code", "execution_count": 2, "id": "710b9d91", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:12:47.669240Z", "iopub.status.busy": "2026-05-19T20:12:47.669112Z", "iopub.status.idle": "2026-05-19T20:12:47.989032Z", "shell.execute_reply": "2026-05-19T20:12:47.974797Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "