{ "cells": [ { "cell_type": "markdown", "id": "287ae541", "metadata": {}, "source": [ "# hist005_TH1_palettecolor\n", "\n", "Palette coloring for histogram is activated thanks to the options `PFC`\n", "(Palette Fill Color), `PLC` (Palette Line Color) and `PMC` (Palette Marker Color).\n", "When one of these options is given to `TH1::Draw` the histogram gets its color\n", "from the current color palette defined by `gStyle->SetPalette(...)`. The color\n", "is determined according to the number of objects having palette coloring in\n", "the current pad.\n", "\n", "In this example five histograms are displayed with palette coloring for lines and\n", "and marker. The histograms are drawn with markers and error bars and one can see\n", "the color of each histogram is picked inside the default palette `kBird`.\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:11 PM." ] }, { "cell_type": "code", "execution_count": 1, "id": "df2ea869", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:11:55.179739Z", "iopub.status.busy": "2026-05-19T20:11:55.179597Z", "iopub.status.idle": "2026-05-19T20:11:55.550673Z", "shell.execute_reply": "2026-05-19T20:11:55.550268Z" } }, "outputs": [], "source": [ "auto *canvas = new TCanvas();" ] }, { "cell_type": "markdown", "id": "8805597f", "metadata": {}, "source": [ "Disable drawing the title of the canvas" ] }, { "cell_type": "code", "execution_count": 2, "id": "901705f9", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:11:55.571104Z", "iopub.status.busy": "2026-05-19T20:11:55.570959Z", "iopub.status.idle": "2026-05-19T20:11:55.774793Z", "shell.execute_reply": "2026-05-19T20:11:55.774199Z" } }, "outputs": [], "source": [ "gStyle->SetOptTitle(kFALSE);" ] }, { "cell_type": "markdown", "id": "7a1a7147", "metadata": {}, "source": [ "Disable drawing the stats box" ] }, { "cell_type": "code", "execution_count": 3, "id": "0afc642a", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:11:55.777023Z", "iopub.status.busy": "2026-05-19T20:11:55.776897Z", "iopub.status.idle": "2026-05-19T20:11:55.981067Z", "shell.execute_reply": "2026-05-19T20:11:55.980072Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "