{ "cells": [ { "cell_type": "markdown", "id": "71ae9054", "metadata": {}, "source": [ "# `geom_spoke()` As a Layer of `geom_livemap()`" ] }, { "cell_type": "code", "execution_count": 1, "id": "52aa8a3e", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "from lets_plot import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "daf9e052", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "d3b828e2", "metadata": {}, "outputs": [], "source": [ "X, Y = np.meshgrid([10, 20, 30, 40], [10, 20, 30, 40])\n", "\n", "angle = np.pi / 180 * np.array([[0, 0, 5, 20],\n", " [5, 10, 20, 50],\n", " [35, 50, 65, 75],\n", " [25, 30, 50, 80]])\n", "amplitude = np.array([[1.5, 2.0, 2.5, 5.0],\n", " [2.0, 2.5, 3.0, 6.0],\n", " [2.5, 3.6, 5.0, 7.0],\n", " [3.0, 4.5, 5.0, 5.0]])\n", "data = dict(x=X.reshape(-1), y=Y.reshape(-1), amplitude=amplitude.reshape(-1), angle=angle.reshape(-1))" ] }, { "cell_type": "code", "execution_count": 4, "id": "e76870c5", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "