{ "cells": [ { "cell_type": "markdown", "id": "4a4a06ee-e0ed-44a9-849b-ed6a140b3a55", "metadata": {}, "source": [ "# String Values of Legend Justification\n", "\n", "The `legend_justification` parameter of `theme()` accepts the following string values: `'center'` (the default), `'top'`, `'right'`, `'bottom'`, and `'left'`." ] }, { "cell_type": "code", "execution_count": 1, "id": "a4abc978-2120-48f9-8065-01e15fd058b6", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from lets_plot import *\n", "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 2, "id": "efdc411b-630d-42c3-966e-5066f375371e", "metadata": {}, "outputs": [], "source": [ "data = {'x': [0, 0.4, 1], 'y': [0, 0.6, 1], 'Color': ['A', 'B', 'C']}\n", "p = ggplot(data, aes('x', 'y', color='Color')) + \\\n", " geom_point() + \\\n", " theme(plot_title=element_text(hjust=0.5)) + \\\n", " ggsize(500, 300)" ] }, { "cell_type": "code", "execution_count": 3, "id": "016c234c-2ffd-496e-a4be-270bbd7fbab9", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "