{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "4eafc254-849a-499c-ba99-e074920fbb83", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n", "
\n", "
\n", " \n", "
\n", " \n", "
\n", "
\n", " \n", " \n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import numpy as np\n", "\n", "from lets_plot import *\n", "LetsPlot.setup_html()\n", "\n", "arr = np.array([\n", " [[150, 0, 0, 255], [0, 150, 0, 255]],\n", " [[0, 0, 150, 255], [150, 150, 0, 255]]\n", " ])\n", "\n", "p = ggplot() + geom_imshow(arr) + ggsize(300, 200)\n", "p" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.11" } }, "nbformat": 4, "nbformat_minor": 5 }