{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from lets_plot import *\n", "import lets_plot.mapping as pm" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "data = {\n", " 'val': [1500, 1000, 1000, 500, 600, 700, 500, 600, 700, 700],\n", " 'order': [1, 1, 2, 2, 3, 3, 4, 4 , 5, 5],\n", " 'lon': [-82, -100, -82, -100, -82, -100, -82, -100, -82, -100],\n", " 'lat': [28, 31, 28, 31, 28, 31, 28, 31, 28, 31]\n", "}" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": false }, "outputs": [], "source": [ "ggplot(data) + geom_livemap(aes(x='lon', y='lat', sym_y='val', fill='val'), symbol='bar', size = 30)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ggplot(data) \\\n", " + geom_livemap(aes(x='lon', y='lat', sym_x='order', sym_y= 'val', fill='val'), symbol='bar', size=50) \\\n", " + scale_fill_gradient(low='yellow', high='red')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ggplot(data) \\\n", " + geom_livemap(aes(x='lon', y='lat', sym_x='order', sym_y='val', fill='val'), symbol='pie', size=32, color='orange') \\\n", " + scale_fill_gradient(low='yellow', high='red') + ggsize(600,200)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ggplot(data) \\\n", " + geom_livemap(aes(x='lon', y='lat', sym_y='val', fill='val'), symbol='pie', size=32, color='orange') \\\n", " + scale_fill_gradient(low='yellow', high='red') + ggsize(600,200)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "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.7.10" } }, "nbformat": 4, "nbformat_minor": 1 }