{ "cells": [ { "cell_type": "markdown", "id": "e00d3551", "metadata": {}, "source": [ "# Automatically Choose `orientation=\"y\"` When Aes Y Is Discrete" ] }, { "cell_type": "code", "execution_count": 1, "id": "ff95f57a", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "\n", "from lets_plot import *\n", "from lets_plot.mapping import as_discrete" ] }, { "cell_type": "code", "execution_count": 2, "id": "eae93dff", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "26cdc00e", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " | country | \n", "continent | \n", "year | \n", "lifeExp | \n", "pop | \n", "gdpPercap | \n", "
---|---|---|---|---|---|---|
0 | \n", "Afghanistan | \n", "Asia | \n", "1952 | \n", "28.801 | \n", "8425333 | \n", "779.445314 | \n", "
1 | \n", "Afghanistan | \n", "Asia | \n", "1957 | \n", "30.332 | \n", "9240934 | \n", "820.853030 | \n", "
2 | \n", "Afghanistan | \n", "Asia | \n", "1962 | \n", "31.997 | \n", "10267083 | \n", "853.100710 | \n", "