{ "cells": [ { "cell_type": "markdown", "id": "ddd7bbc3-b7c1-4b3b-8ac0-24c37e8c6cc5", "metadata": {}, "source": [ "# Multiline Axis Labels\n", "\n", "Multiline axis labels allow better visualization of long categorical values. Instead of overcrowding the axis, labels can now be formatted across multiple lines, enhancing readability. \n", "\n", "* To create a multiline axis label, simply add \"\\n\" inside the string where you want the line break." ] }, { "cell_type": "code", "execution_count": 1, "id": "e83da232-c578-4c48-848e-53fb1199a51c", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from lets_plot import *\n", "import pandas as pd\n", "import numpy as np\n", "\n", "LetsPlot.setup_html()" ] }, { "cell_type": "markdown", "id": "63f9d1ac-de82-4cda-85f1-3f3d8998eef0", "metadata": {}, "source": [ "## Quarters & Years" ] }, { "cell_type": "code", "execution_count": 2, "id": "8ea6aa2f-e6b9-42d1-acb0-8984bd93d2d6", "metadata": {}, "outputs": [ { "data": { "text/html": [ "| \n", " | Quarter_Year | \n", "Type | \n", "Amount | \n", "
|---|---|---|---|
| 0 | \n", "Q1-2022 | \n", "Income | \n", "11564 | \n", "
| 1 | \n", "Q1-2022 | \n", "Expenses | \n", "9924 | \n", "
| 2 | \n", "Q2-2022 | \n", "Income | \n", "11365 | \n", "
| 3 | \n", "Q2-2022 | \n", "Expenses | \n", "10432 | \n", "