{ "cells": [ { "cell_type": "markdown", "id": "b3162237", "metadata": {}, "source": [ "# first\n", "\n", "\n", "\n", "\n", "**Author:** Rene Brun \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:37 PM." ] }, { "cell_type": "code", "execution_count": 1, "id": "f5baed44", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:03.671342Z", "iopub.status.busy": "2026-05-19T20:37:03.671237Z", "iopub.status.idle": "2026-05-19T20:37:04.246872Z", "shell.execute_reply": "2026-05-19T20:37:04.246408Z" } }, "outputs": [], "source": [ "TCanvas *nut = new TCanvas(\"nut\", \"FirstSession\", 100, 10, 700, 900);\n", "nut->Range(0, 0, 20, 24);\n", "nut->SetFillColor(10);\n", "nut->SetBorderSize(2);\n", "\n", "TPaveLabel *pl = new TPaveLabel(3, 22, 17, 23.7, \"My first ROOT interactive session\", \"br\");\n", "pl->SetFillColor(18);\n", "pl->Draw();\n", "\n", "TText t(0, 0, \"a\");\n", "t.SetTextFont(62);\n", "t.SetTextSize(0.025);\n", "t.SetTextAlign(12);\n", "t.DrawText(2, 20.3, \"ROOT is based on CLING, a powerful C/C++ interpreter.\");\n", "t.DrawText(2, 19.3, \"Blocks of lines can be entered within {...}.\");\n", "t.DrawText(2, 18.3, \"Previous typed lines can be recalled.\");\n", "\n", "t.SetTextFont(72);\n", "t.SetTextSize(0.026);\n", "t.DrawText(3, 17, \"Root > float x=5; float y=7;\");\n", "t.DrawText(3, 16, \"Root > x*sqrt(y)\");\n", "t.DrawText(3, 14, \"Root > for (int i=2;i<7;i++) printf(\\\"sqrt(%d) = %f\\\\n\\\",i,sqrt(i));\");\n", "t.DrawText(3, 10, \"Root > TF1 f1(\\\"f1\\\",\\\"sin(x)/x\\\",0,10)\");\n", "t.DrawText(3, 9, \"Root > f1.Draw()\");\n", "t.SetTextFont(81);\n", "t.SetTextSize(0.018);\n", "t.DrawText(4, 15, \"(float) 13.2288f\");\n", "t.DrawText(4, 13.3, \"sqrt(2) = 1.414214\");\n", "t.DrawText(4, 12.7, \"sqrt(3) = 1.732051\");\n", "t.DrawText(4, 12.1, \"sqrt(4) = 2.000000\");\n", "t.DrawText(4, 11.5, \"sqrt(5) = 2.236068\");\n", "t.DrawText(4, 10.9, \"sqrt(6) = 2.449490\");\n", "\n", "TPad *pad = new TPad(\"pad\", \"pad\", .2, .05, .8, .35);\n", "pad->Draw();\n", "pad->cd();\n", "pad->SetGrid();\n", "TF1 *f1 = new TF1(\"f1\", \"sin(x)/x\", 0, 10);\n", "f1->Draw();" ] }, { "cell_type": "markdown", "id": "53cf5ece", "metadata": {}, "source": [ "Draw all canvases " ] }, { "cell_type": "code", "execution_count": 2, "id": "963ce1b7", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:04.268380Z", "iopub.status.busy": "2026-05-19T20:37:04.268237Z", "iopub.status.idle": "2026-05-19T20:37:04.502011Z", "shell.execute_reply": "2026-05-19T20:37:04.501646Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n", "
\n", "\n", "\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%jsroot on\n", "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 }