{ "cells": [ { "cell_type": "markdown", "id": "98bee0e1", "metadata": {}, "source": [ "# gr003_errors2\n", "\n", "We first draw an empty frame with the axes, then draw the graphs on top of it\n", "Note that the graphs should have the same or very close ranges (in both axis),\n", "otherwise they may not be visible in the frame.\n", "\n", "Alternatively, an automatic axis scaling can be achieved via a\n", "[TMultiGraph](https://root.cern/doc/master/classTMultiGraph.html)\n", "\n", "See the [TGraphErrors documentation](https://root.cern/doc/master/classTGraphErrors.html)\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": "9f195042", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:43.731280Z", "iopub.status.busy": "2026-05-19T20:37:43.731142Z", "iopub.status.idle": "2026-05-19T20:37:44.084907Z", "shell.execute_reply": "2026-05-19T20:37:44.084274Z" } }, "outputs": [], "source": [ "TCanvas *c1 = new TCanvas(\"c1\",\"2 graphs with errors\",200,10,700,500);\n", "c1->SetGrid();" ] }, { "cell_type": "markdown", "id": "685e979a", "metadata": {}, "source": [ "draw a frame to define the range" ] }, { "cell_type": "code", "execution_count": 2, "id": "4f164b94", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:44.092279Z", "iopub.status.busy": "2026-05-19T20:37:44.092157Z", "iopub.status.idle": "2026-05-19T20:37:44.308283Z", "shell.execute_reply": "2026-05-19T20:37:44.307645Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "