{ "cells": [ { "cell_type": "markdown", "id": "558d28c0", "metadata": {}, "source": [ "# Geometries with Dual Orientation\n", "\n", "- `geom_linerange()`\n", "- `geom_pointrange()`\n", "- `geom_errorbar()`\n", "- `geom_crossbar()`\n", "- `geom_ribbon()`\n", "\n", "You can flip opientation of these geometries simply by flipping their positional aesthetics mapping.\n", "\n", "**Note:** when flipping aesthetics, in certain cases, you will have to also change the **position adjustment** of the geometry.\n", "\n", "For example, when flipping orientation from vertical to horizontal, `position_dodge()` \\\n", "should be replaced with `position_dodgev()` (i.e. \"vertical dodge\").\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "da3d73f3", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "\n", "from lets_plot import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "38f3f8b6", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "99409355", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " | supp | \n", "dose | \n", "len_min | \n", "len_max | \n", "length | \n", "
---|---|---|---|---|---|
0 | \n", "OJ | \n", "0.5 | \n", "8.2 | \n", "21.5 | \n", "12.25 | \n", "
1 | \n", "OJ | \n", "1.0 | \n", "14.5 | \n", "27.3 | \n", "23.45 | \n", "
2 | \n", "OJ | \n", "2.0 | \n", "22.4 | \n", "30.9 | \n", "25.95 | \n", "
3 | \n", "VC | \n", "0.5 | \n", "4.2 | \n", "11.5 | \n", "7.15 | \n", "
4 | \n", "VC | \n", "1.0 | \n", "13.6 | \n", "22.5 | \n", "16.50 | \n", "
5 | \n", "VC | \n", "2.0 | \n", "18.5 | \n", "33.9 | \n", "25.95 | \n", "