{ "cells": [ { "cell_type": "markdown", "id": "1c5474f7-dcb1-41ad-9ede-70a1b146f618", "metadata": {}, "source": [ "# Axis Label Justification (`hjust`, `vjust`)\n", "\n", "The `hjust` and `vjust` parameters control the horizontal and vertical justification of axis labels.\n", "\n", "- **`hjust` (Horizontal Justification):** \n", " Adjusts the horizontal alignment of the label relative to its default position. \n", " - `hjust = 0.0` aligns the label to the left. \n", " - `hjust = 0.5` centers the label. \n", " - `hjust = 1.0` aligns the label to the right. \n", "\n", "\n", "- **`vjust` (Vertical Justification):** \n", " Adjusts the vertical alignment of the label relative to its default position. \n", " - `vjust = 0.0` aligns the label to the bottom. \n", " - `vjust = 0.5` centers the label vertically. \n", " - `vjust = 1.0` aligns the label to the top.\n", "\n", "Both parameters accept values between 0.0 and 1.0 for precise positioning, allowing for fine-tuned control over label placement in your plots.\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "de90a7f0-1e1d-4c26-acc0-8da15c2a96fc", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%useLatestDescriptors\n", "%use dataframe\n", "%use lets-plot" ] }, { "cell_type": "code", "execution_count": 2, "id": "8ce1bc38-6aaa-4f06-8f30-469bc98250c8", "metadata": {}, "outputs": [ { "data": { "application/kotlindataframe+json": "{\"nrow\":3,\"ncol\":12,\"columns\":[\"untitled\",\"manufacturer\",\"model\",\"displ\",\"year\",\"cyl\",\"trans\",\"drv\",\"cty\",\"hwy\",\"fl\",\"class\"],\"kotlin_dataframe\":[{\"untitled\":1,\"manufacturer\":\"audi\",\"model\":\"a4\",\"displ\":1.8,\"year\":1999,\"cyl\":4,\"trans\":\"auto(l5)\",\"drv\":\"f\",\"cty\":18,\"hwy\":29,\"fl\":\"p\",\"class\":\"compact\"},{\"untitled\":2,\"manufacturer\":\"audi\",\"model\":\"a4\",\"displ\":1.8,\"year\":1999,\"cyl\":4,\"trans\":\"manual(m5)\",\"drv\":\"f\",\"cty\":21,\"hwy\":29,\"fl\":\"p\",\"class\":\"compact\"},{\"untitled\":3,\"manufacturer\":\"audi\",\"model\":\"a4\",\"displ\":2.0,\"year\":2008,\"cyl\":4,\"trans\":\"manual(m6)\",\"drv\":\"f\",\"cty\":20,\"hwy\":31,\"fl\":\"p\",\"class\":\"compact\"}]}", "text/html": [ " \n", " \n", " \n", " \n", " \n", "DataFrame: rowsCount = 3, columnsCount = 12
\n", "| untitled | manufacturer | model | displ | year | cyl | trans | drv | cty | hwy | fl | class |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | audi | a4 | 1.800000 | 1999 | 4 | auto(l5) | f | 18 | 29 | p | compact |
| 2 | audi | a4 | 1.800000 | 1999 | 4 | manual(m5) | f | 21 | 29 | p | compact |
| 3 | audi | a4 | 2.000000 | 2008 | 4 | manual(m6) | f | 20 | 31 | p | compact |