{ "cells": [ { "cell_type": "markdown", "id": "0b89f005", "metadata": {}, "source": [ "# gr004_errors_asym\n", "The errors for the x values are divided into low (left side of the marker) and high (right side of the marker) errors.\n", "Similarly, for the y values, there are low (lower side of the marker) and high (upper side of the marker) errors.\n", "\n", "\n", "\n", "\n", "**Author:** Miro Helbich \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": "74254189", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:44.920803Z", "iopub.status.busy": "2026-05-19T20:37:44.920682Z", "iopub.status.idle": "2026-05-19T20:37:45.373859Z", "shell.execute_reply": "2026-05-19T20:37:45.373268Z" } }, "outputs": [], "source": [ "TCanvas *c2 = new TCanvas(\"c2\",\"\", 700, 500);\n", "\n", "c2->SetGrid();\n", "const Int_t npoints=3;\n", "Double_t xaxis[npoints] = {1.,2.,3.};\n", "Double_t yaxis[npoints] = {10.,20.,30.};\n", "\n", "Double_t exl[npoints] = {0.5,0.2,0.1}; //Lower x errors\n", "Double_t exh[npoints] = {0.5,0.3,0.4}; //Higher x errors\n", "Double_t eyl[npoints] = {3.,5.,4.}; //Lower y errors\n", "Double_t eyh[npoints] = {3.,5.,4.}; //Higher y errors\n", "\n", "TGraphAsymmErrors *gr = new TGraphAsymmErrors(npoints,xaxis,yaxis,exl,exh,eyl,eyh); //Create the TGraphAsymmErrors object with data and asymmetrical errors\n", "\n", "gr->SetTitle(\"A simple graph with asymmetrical errors\");\n", "gr->Draw(\"A*\"); //\"A\" = draw axes and \"*\" = draw markers at the points with error bars" ] }, { "cell_type": "markdown", "id": "e154b04d", "metadata": {}, "source": [ "Draw all canvases " ] }, { "cell_type": "code", "execution_count": 2, "id": "cdf29d71", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:45.381659Z", "iopub.status.busy": "2026-05-19T20:37:45.381516Z", "iopub.status.idle": "2026-05-19T20:37:45.594911Z", "shell.execute_reply": "2026-05-19T20:37:45.594469Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "