{ "cells": [ { "cell_type": "markdown", "id": "6a644d01", "metadata": {}, "source": [ "# xyplot\n", "centered at (0,0).\n", "\n", "\n", "\n", "\n", "**Author:** Olivier Couet \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": "4692b6a8", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:38.092161Z", "iopub.status.busy": "2026-05-19T20:37:38.092050Z", "iopub.status.idle": "2026-05-19T20:37:38.442989Z", "shell.execute_reply": "2026-05-19T20:37:38.441890Z" } }, "outputs": [], "source": [ "TCanvas *c = new TCanvas(\"c\", \"XY plot\", 200, 10, 700, 500);" ] }, { "cell_type": "markdown", "id": "dfdd3be4", "metadata": {}, "source": [ "Remove the frame" ] }, { "cell_type": "code", "execution_count": 2, "id": "8d2886de", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:38.444518Z", "iopub.status.busy": "2026-05-19T20:37:38.444390Z", "iopub.status.idle": "2026-05-19T20:37:38.656506Z", "shell.execute_reply": "2026-05-19T20:37:38.655437Z" } }, "outputs": [], "source": [ "c->SetFillColor(kWhite);\n", "c->SetFrameLineColor(kWhite);\n", "c->SetFrameBorderMode(0);" ] }, { "cell_type": "markdown", "id": "b2df2373", "metadata": {}, "source": [ "Define and draw a curve the frame" ] }, { "cell_type": "code", "execution_count": 3, "id": "dade5ff5", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:38.657991Z", "iopub.status.busy": "2026-05-19T20:37:38.657867Z", "iopub.status.idle": "2026-05-19T20:37:38.880900Z", "shell.execute_reply": "2026-05-19T20:37:38.867394Z" } }, "outputs": [], "source": [ "const Int_t n = 4;\n", "Double_t x[n] = {-1, -3, -9, 3};\n", "Double_t y[n] = {-1000, 900, 300, 300};\n", "TGraph *gr = new TGraph(n, x, y);\n", "gr->SetTitle(\"XY plot\");\n", "gr->SetMinimum(-1080);\n", "gr->SetMaximum(1080);\n", "gr->SetLineColor(kRed);\n", "gr->Draw(\"AC*\");" ] }, { "cell_type": "markdown", "id": "d7b40ee7", "metadata": {}, "source": [ "Remove the frame's axis" ] }, { "cell_type": "code", "execution_count": 4, "id": "6b09a475", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:38.882433Z", "iopub.status.busy": "2026-05-19T20:37:38.882306Z", "iopub.status.idle": "2026-05-19T20:37:39.094037Z", "shell.execute_reply": "2026-05-19T20:37:39.093447Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "