{ "cells": [ { "cell_type": "markdown", "id": "0f7426d7-4987-4b9f-ab69-cf3924d48a29", "metadata": {}, "source": [ "# Scientific Notation\n", "\n", "Default format for exponents changed from e-notation to power of 10." ] }, { "cell_type": "code", "execution_count": 1, "id": "f128c69b-f753-4f8d-b08e-306f91431703", "metadata": {}, "outputs": [], "source": [ "from lets_plot import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "10e77858-570a-443d-b7fb-c53be8d14d89", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "9ec8add6-9971-476f-8015-27d620c9fb1c", "metadata": {}, "outputs": [], "source": [ "data = dict(\n", " name = [\"electron\", \"muon\", \"tau\"],\n", " mass = [9.1e-28, 1.9e-25, 3.2e-24],\n", ")" ] }, { "cell_type": "code", "execution_count": 4, "id": "6e84c515-7de1-4e95-9321-a8c4b379a8a5", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " " ], "text/plain": [ "" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ggplot(data) + \\\n", " geom_point(aes(x=\"mass\"), y=0, tooltips=layer_tooltips().line(\"@name\").line(\"@|@{mass}g\")) + \\\n", " theme(axis_title_y='blank', axis_text_y='blank') + \\\n", " ggtitle(\"Masses of charged leptons in grams\")" ] } ], "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.10.12" } }, "nbformat": 4, "nbformat_minor": 5 }