{ "cells": [ { "cell_type": "markdown", "id": "50816dd6", "metadata": {}, "source": [ "# `stroke` aesthetic\n", "\n", "Affects the thickness of the point boundaries (in case the given shape has a boundary).\n", "\n", "Available for the following geometries: `geom_point()`, `geom_jitter()`, `geom_qq()`, `geom_qq2()`, `geom_pointrange()`, `geom_dotplot()`, `geom_ydotplot()`." ] }, { "cell_type": "code", "execution_count": 1, "id": "4548aaa5", "metadata": { "execution": { "iopub.execute_input": "2024-11-01T20:13:39.473531Z", "iopub.status.busy": "2024-11-01T20:13:39.473440Z", "iopub.status.idle": "2024-11-01T20:13:39.801890Z", "shell.execute_reply": "2024-11-01T20:13:39.801541Z" } }, "outputs": [], "source": [ "from lets_plot import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "e5021e9e", "metadata": { "execution": { "iopub.execute_input": "2024-11-01T20:13:39.803147Z", "iopub.status.busy": "2024-11-01T20:13:39.803039Z", "iopub.status.idle": "2024-11-01T20:13:39.805272Z", "shell.execute_reply": "2024-11-01T20:13:39.805095Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "7ca0b26d", "metadata": { "execution": { "iopub.execute_input": "2024-11-01T20:13:39.806183Z", "iopub.status.busy": "2024-11-01T20:13:39.806110Z", "iopub.status.idle": "2024-11-01T20:13:39.807737Z", "shell.execute_reply": "2024-11-01T20:13:39.807556Z" } }, "outputs": [], "source": [ "data1 = {\n", " 'x': (list(range(7)) * 4)[:26],\n", " 'y': ([3] * 7 + [2] * 7 + [1] * 7 + [0] * 7)[:26],\n", " 'shape': list(range(26)),\n", "}" ] }, { "cell_type": "code", "execution_count": 4, "id": "1829f639", "metadata": { "execution": { "iopub.execute_input": "2024-11-01T20:13:39.808543Z", "iopub.status.busy": "2024-11-01T20:13:39.808468Z", "iopub.status.idle": "2024-11-01T20:13:39.809928Z", "shell.execute_reply": "2024-11-01T20:13:39.809756Z" } }, "outputs": [], "source": [ "p1 = ggplot(data1, aes('x', 'y')) + scale_shape_identity() + \\\n", " xlim(-1, 7) + ylim(-1, 4) + \\\n", " theme(legend_position='none')" ] }, { "cell_type": "markdown", "id": "c184ec7a", "metadata": {}, "source": [ "#### 1. Default Stroke" ] }, { "cell_type": "code", "execution_count": 5, "id": "4784b085", "metadata": { "execution": { "iopub.execute_input": "2024-11-01T20:13:39.810681Z", "iopub.status.busy": "2024-11-01T20:13:39.810604Z", "iopub.status.idle": "2024-11-01T20:13:39.844534Z", "shell.execute_reply": "2024-11-01T20:13:39.844322Z" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "