{ "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": "2024-04-17T07:28:29.354536Z", "iopub.status.busy": "2024-04-17T07:28:29.354415Z", "iopub.status.idle": "2024-04-17T07:28:29.672629Z", "shell.execute_reply": "2024-04-17T07:28:29.672374Z" } }, "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": "2024-04-17T07:28:29.685375Z", "iopub.status.busy": "2024-04-17T07:28:29.685243Z", "iopub.status.idle": "2024-04-17T07:28:29.717330Z", "shell.execute_reply": "2024-04-17T07:28:29.717077Z" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "