{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Annotation Labels on Pie-Chart\n", " Annotation Labels on Pie-Chart specifies content of the annotations.\n", " \n", " 1. [Default presentation](#1.Default-presentation)\n", " \n", " 2. [Change default annotation](#2.-Change-default-annotation)\n", " \n", " 3. [Use colors of the flavor scheme](#3.-Use-colors-of-the-flavor-scheme)\n", " \n", " 4. [Annotations for Pie-Chart with explode parameter](#4.-Annotations-for-Pie-Chart-with-explode-parameter)\n", " \n", " 5. [Annotations on scatter pie plot](#5.-Annotations-on-scatter-pie-plot)\n", " \n", " 6. [Annotations for Pie-Chart with different sector's size](#6.-Annotations-for-Pie-Chart-with-different-sector's-size) \n", " " ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2024-04-26T11:40:09.503554Z", "iopub.status.busy": "2024-04-26T11:40:09.503554Z", "iopub.status.idle": "2024-04-26T11:40:10.635269Z", "shell.execute_reply": "2024-04-26T11:40:10.635269Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from lets_plot import *\n", "from lets_plot.mapping import *\n", "\n", "LetsPlot.setup_html() " ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "execution": { "iopub.execute_input": "2024-04-26T11:40:10.650897Z", "iopub.status.busy": "2024-04-26T11:40:10.650897Z", "iopub.status.idle": "2024-04-26T11:40:10.682229Z", "shell.execute_reply": "2024-04-26T11:40:10.682229Z" } }, "outputs": [], "source": [ "blank_theme = theme(line=element_blank(), axis_text=element_blank(), axis_title=element_blank(),\n", " legend_position='none')" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "execution": { "iopub.execute_input": "2024-04-26T11:40:10.682229Z", "iopub.status.busy": "2024-04-26T11:40:10.682229Z", "iopub.status.idle": "2024-04-26T11:40:10.839479Z", "shell.execute_reply": "2024-04-26T11:40:10.839479Z" } }, "outputs": [ { "data": { "text/html": [ "\n", " | Unnamed: 0 | \n", "manufacturer | \n", "model | \n", "displ | \n", "year | \n", "cyl | \n", "trans | \n", "drv | \n", "cty | \n", "hwy | \n", "fl | \n", "class | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "1 | \n", "audi | \n", "a4 | \n", "1.8 | \n", "1999 | \n", "4 | \n", "auto(l5) | \n", "f | \n", "18 | \n", "29 | \n", "p | \n", "compact | \n", "
1 | \n", "2 | \n", "audi | \n", "a4 | \n", "1.8 | \n", "1999 | \n", "4 | \n", "manual(m5) | \n", "f | \n", "21 | \n", "29 | \n", "p | \n", "compact | \n", "
2 | \n", "3 | \n", "audi | \n", "a4 | \n", "2.0 | \n", "2008 | \n", "4 | \n", "manual(m6) | \n", "f | \n", "20 | \n", "31 | \n", "p | \n", "compact | \n", "
3 | \n", "4 | \n", "audi | \n", "a4 | \n", "2.0 | \n", "2008 | \n", "4 | \n", "auto(av) | \n", "f | \n", "21 | \n", "30 | \n", "p | \n", "compact | \n", "
4 | \n", "5 | \n", "audi | \n", "a4 | \n", "2.8 | \n", "1999 | \n", "6 | \n", "auto(l5) | \n", "f | \n", "16 | \n", "26 | \n", "p | \n", "compact | \n", "