{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## The `extent` parameter in `geom_imshow()` \n", "\n", "A list of four numbers: `[left, right, bottom, top]` that\n", "defines the image bounding box\n", "in terms of 'data coordinates'." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2025-11-05T13:40:54.582211Z", "iopub.status.busy": "2025-11-05T13:40:54.582116Z", "iopub.status.idle": "2025-11-05T13:40:54.585941Z", "shell.execute_reply": "2025-11-05T13:40:54.585766Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import numpy as np\n", "from lets_plot import *\n", "\n", "LetsPlot.setup_html()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The default `extent` is derived from the image's array dimentions: `[-0.5, ncol-0.5, -0.5, nrow-0.5]`.\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "execution": { "iopub.execute_input": "2025-11-05T13:40:54.599200Z", "iopub.status.busy": "2025-11-05T13:40:54.599115Z", "iopub.status.idle": "2025-11-05T13:40:54.631203Z", "shell.execute_reply": "2025-11-05T13:40:54.630980Z" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "