{ "cells": [ { "cell_type": "markdown", "id": "c4c21432", "metadata": {}, "source": [ "## Marker Rotation\n", "\n", "Specify marker rotation (in degrees) using the `angle` aesthetic." ] }, { "cell_type": "code", "execution_count": 1, "id": "96f6596f", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "from lets_plot import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "09704322", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "7ccad20f", "metadata": {}, "outputs": [], "source": [ "data = {\n", " 'x': [1, 2, 3, 4],\n", " 'y': [1, 1, 1, 1],\n", " 'angle': [-30, 0, 30, 60]\n", "}" ] }, { "cell_type": "code", "execution_count": 4, "id": "4bddfeb1", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " " ], "text/plain": [ "" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ggplot(data) +\\\n", "geom_point(aes(x='x', y='y', angle='angle'), size=20, shape=13.0) +\\\n", "geom_point(x=5, y=1.0, angle=90, size=20, shape=2.0, color='red')" ] } ], "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.8.19" } }, "nbformat": 4, "nbformat_minor": 5 }