{ "cells": [ { "cell_type": "markdown", "id": "ddd7bbc3-b7c1-4b3b-8ac0-24c37e8c6cc5", "metadata": {}, "source": [ "# Axis Label Justification (`hjust`, `vjust`)\n", "\n", "The `hjust` and `vjust` parameters control the horizontal and vertical justification of axis labels in lets-plot.\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": "c56e4f8d-96d0-4d9b-b7a3-d09b1f4ffa43", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
| \n", " | Unnamed: 0 | \n", "manufacturer | \n", "model | \n", "displ | \n", "year | \n", "cyl | \n", "trans | \n", "drv | \n", "cty | \n", "hwy | \n", "fl | \n", "class | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", "1 | \n", "audi | \n", "a4 | \n", "1.8 | \n", "1999 | \n", "4 | \n", "auto(l5) | \n", "f | \n", "18 | \n", "29 | \n", "p | \n", "compact | \n", "
| 1 | \n", "2 | \n", "audi | \n", "a4 | \n", "1.8 | \n", "1999 | \n", "4 | \n", "manual(m5) | \n", "f | \n", "21 | \n", "29 | \n", "p | \n", "compact | \n", "
| 2 | \n", "3 | \n", "audi | \n", "a4 | \n", "2.0 | \n", "2008 | \n", "4 | \n", "manual(m6) | \n", "f | \n", "20 | \n", "31 | \n", "p | \n", "compact | \n", "