{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Rotation of axis labels\n", "\n", "The `angle` parameter in `element_text()` function allows to rotate the text. This functionality is currently available to rotate axis labels (i.e. for the `axis_text, axis_text_x, axis_text_y` parameters in a `theme()`)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. [Default axis labels layout](#1.-Default-Axis-Labels-Layout) \n", "\n", "2. [Layout labels for the discrete axis](#2.-Layout-labels-for-the-discrete-axis) \n", " \n", "3. [Layout labels for continuous axis](#3.-Layout-labels-for-continuous-axis)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "\n", "from lets_plot import *" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()\n", "LetsPlot.set_theme(theme_light())" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | Unnamed: 0 | \n", "PID | \n", "county | \n", "state | \n", "area | \n", "poptotal | \n", "popdensity | \n", "popwhite | \n", "popblack | \n", "popamerindian | \n", "... | \n", "percollege | \n", "percprof | \n", "poppovertyknown | \n", "percpovertyknown | \n", "percbelowpoverty | \n", "percchildbelowpovert | \n", "percadultpoverty | \n", "percelderlypoverty | \n", "inmetro | \n", "category | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", "1 | \n", "561 | \n", "ADAMS | \n", "IL | \n", "0.052 | \n", "66090 | \n", "1270.961540 | \n", "63917 | \n", "1702 | \n", "98 | \n", "... | \n", "19.631392 | \n", "4.355859 | \n", "63628 | \n", "96.274777 | \n", "13.151443 | \n", "18.011717 | \n", "11.009776 | \n", "12.443812 | \n", "0 | \n", "AAR | \n", "
| 1 | \n", "2 | \n", "562 | \n", "ALEXANDER | \n", "IL | \n", "0.014 | \n", "10626 | \n", "759.000000 | \n", "7054 | \n", "3496 | \n", "19 | \n", "... | \n", "11.243308 | \n", "2.870315 | \n", "10529 | \n", "99.087145 | \n", "32.244278 | \n", "45.826514 | \n", "27.385647 | \n", "25.228976 | \n", "0 | \n", "LHR | \n", "
| 2 | \n", "3 | \n", "563 | \n", "BOND | \n", "IL | \n", "0.022 | \n", "14991 | \n", "681.409091 | \n", "14477 | \n", "429 | \n", "35 | \n", "... | \n", "17.033819 | \n", "4.488572 | \n", "14235 | \n", "94.956974 | \n", "12.068844 | \n", "14.036061 | \n", "10.852090 | \n", "12.697410 | \n", "0 | \n", "AAR | \n", "
3 rows × 29 columns
\n", "