{ "cells": [ { "cell_type": "markdown", "id": "f162df66-e14a-4bd5-83d0-4364521c9cee", "metadata": {}, "source": [ "# Layer Labels (Annotations) in `geom_crossbar`" ] }, { "cell_type": "code", "execution_count": 1, "id": "bd9d5917-f099-423e-9184-70dc95e2c703", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from lets_plot import *\n", "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 2, "id": "7c946601-4186-464b-a449-ef5a737b3ef8", "metadata": {}, "outputs": [], "source": [ "data = {\n", " 'vertical_category': ['Without midline', 'Above midline', 'Below midline', 'Above bar', 'Below bar'],\n", " 'horisontal_category': ['Without midline', 'Right of midline', 'Left of midline', 'Right of bar', 'Left of bar'],\n", " 'ymin': [0, 5, 5, 0, 20],\n", " 'ymax': [20, 20, 20, 2, 22],\n", " 'y': [None, 6, 19, 1, 21],\n", " 'value': [20, 15, 15, 2, 2]\n", "}" ] }, { "cell_type": "markdown", "id": "fb64f03d-9f79-4e91-8677-0a1c761a6b72", "metadata": {}, "source": [ "### Automatic Text Positioning" ] }, { "cell_type": "code", "execution_count": 3, "id": "2cd062c4-cb02-43db-9b34-81ca0627962c", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "