{ "cells": [ { "cell_type": "markdown", "id": "55e76ea5", "metadata": {}, "source": [ "# pdf003_2d_cdf\n", "Example describing how to use the different cumulative distribution functions in ROOT.\n", "The macro shows four of them with\n", "respect to their two variables. In order to run the macro type:\n", "\n", "```cpp\n", " root [0] .x mathcoreCDF.C\n", "```\n", "\n", "\n", "\n", "\n", "**Author:** Lorenzo Moneta \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:26 PM." ] }, { "cell_type": "code", "execution_count": 1, "id": "160bba7f", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:26:35.896314Z", "iopub.status.busy": "2026-05-19T20:26:35.896202Z", "iopub.status.idle": "2026-05-19T20:26:36.236585Z", "shell.execute_reply": "2026-05-19T20:26:36.235641Z" } }, "outputs": [], "source": [ "TF2 *f1a = new TF2(\"f1a\",\"ROOT::Math::breitwigner_cdf_c(x, y)\",-10,10,0,10);\n", "TF2 *f2a = new TF2(\"f2a\",\"ROOT::Math::cauchy_cdf(x,y)\",0,20, 0,20);\n", "TF2 *f3a = new TF2(\"f3a\",\"ROOT::Math::normal_cdf(x,y)\",-10,10,0,5);\n", "TF2 *f4a = new TF2(\"f4a\",\"ROOT::Math::exponential_cdf_c(x,y)\",0,10,0,5);\n", "\n", "TCanvas *c1 = new TCanvas(\"c1\",\"c1\",800,650);\n", "\n", "c1->Divide(2,2);\n", "c1->cd(1); f1a->SetLineWidth(1);\n", "f1a->Draw(\"surf1\");\n", "c1->cd(2); f2a->SetLineWidth(1);\n", "f2a->Draw(\"surf1\");\n", "c1->cd(3); f3a->SetLineWidth(1);\n", "f3a->Draw(\"surf1\");\n", "c1->cd(4); f4a->SetLineWidth(1);\n", "f4a->Draw(\"surf1\");" ] }, { "cell_type": "markdown", "id": "f68a2e3a", "metadata": {}, "source": [ "Draw all canvases " ] }, { "cell_type": "code", "execution_count": 2, "id": "b85ce6e2", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:26:36.238376Z", "iopub.status.busy": "2026-05-19T20:26:36.238254Z", "iopub.status.idle": "2026-05-19T20:26:36.551152Z", "shell.execute_reply": "2026-05-19T20:26:36.550678Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n", "
\n", "\n", "\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "gROOT->GetListOfCanvases()->Draw()" ] } ], "metadata": { "kernelspec": { "display_name": "ROOT C++", "language": "c++", "name": "root" }, "language_info": { "codemirror_mode": "text/x-c++src", "file_extension": ".C", "mimetype": " text/x-c++src", "name": "c++" } }, "nbformat": 4, "nbformat_minor": 5 }