Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exponent format #964

Merged
merged 4 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor update for superscript.ipynb and future_changes.md
  • Loading branch information
IKupriyanov-HORIS committed Dec 13, 2023
commit d1d8b915f2a42fe5cd6bf0892ccdaeea53fadf85
24 changes: 12 additions & 12 deletions docs/f-23f/superscript.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"metadata": {},
"source": [
"# Exponent format in Lets-Plot\n",
"The exponent format can be configured via theme function parameter `exponent_format`. \n",
"The exponent format can be configured using the theme function parameter `exponent_format`. \n",
"Available values:\n",
"- `'e'` for E notation, e.g. 1.23e+3. This is a default format.\n",
"- `'pow'` for power notation via superscript (see example below)\n",
"- `'e'` for E notation, e.g. 1.23e+3. This is a default format\n",
"- `'pow'` for superscript power notation\n",
"\n",
"The exponent format is automatically applied to each value, formatted in scientific notation (either if the format is user defined or selected by lets-plot based on the data) and affects every part of a plot - geoms, scales, labels, tooltips.\n",
"\n",
Expand Down Expand Up @@ -92,7 +92,7 @@
{
"data": {
"text/html": [
" <div id=\"oCU0Uq\"></div>\n",
" <div id=\"qkBW7R\"></div>\n",
" <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
" (function() {\n",
" var plotSpec={\n",
Expand Down Expand Up @@ -125,15 +125,15 @@
"}],\n",
"\"metainfo_list\":[]\n",
"};\n",
" var plotContainer = document.getElementById(\"oCU0Uq\");\n",
" var plotContainer = document.getElementById(\"qkBW7R\");\n",
" window.letsPlotCall(function() {{\n",
" LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer);\n",
" }});\n",
" })(); \n",
" </script>"
],
"text/plain": [
"<lets_plot.plot.core.PlotSpec at 0x127cb75b0>"
"<lets_plot.plot.core.PlotSpec at 0x1211b8820>"
]
},
"execution_count": 4,
Expand Down Expand Up @@ -163,7 +163,7 @@
{
"data": {
"text/html": [
" <div id=\"yKuh0a\"></div>\n",
" <div id=\"fUYa4e\"></div>\n",
" <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
" (function() {\n",
" var plotSpec={\n",
Expand Down Expand Up @@ -200,15 +200,15 @@
"}],\n",
"\"metainfo_list\":[]\n",
"};\n",
" var plotContainer = document.getElementById(\"yKuh0a\");\n",
" var plotContainer = document.getElementById(\"fUYa4e\");\n",
" window.letsPlotCall(function() {{\n",
" LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer);\n",
" }});\n",
" })(); \n",
" </script>"
],
"text/plain": [
"<lets_plot.plot.core.PlotSpec at 0x1362693a0>"
"<lets_plot.plot.core.PlotSpec at 0x127c2d3d0>"
]
},
"execution_count": 5,
Expand Down Expand Up @@ -240,7 +240,7 @@
{
"data": {
"text/html": [
" <div id=\"OoFgFz\"></div>\n",
" <div id=\"AeuDRG\"></div>\n",
" <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
" (function() {\n",
" var plotSpec={\n",
Expand Down Expand Up @@ -289,15 +289,15 @@
"}],\n",
"\"metainfo_list\":[]\n",
"};\n",
" var plotContainer = document.getElementById(\"OoFgFz\");\n",
" var plotContainer = document.getElementById(\"AeuDRG\");\n",
" window.letsPlotCall(function() {{\n",
" LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer);\n",
" }});\n",
" })(); \n",
" </script>"
],
"text/plain": [
"<lets_plot.plot.core.PlotSpec at 0x136269e80>"
"<lets_plot.plot.core.PlotSpec at 0x127c2dbe0>"
]
},
"execution_count": 6,
Expand Down
8 changes: 4 additions & 4 deletions future_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@



- Formatting: add scientific superscript option [[#743](https://github.com/JetBrains/lets-plot/issues/743)].

See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-23f/superscript.ipynb).

### Changed

- The `plot_margin` parameter in `theme()` and the `margin` parameter in `element_text()` accept a number or a list of numbers:
Expand All @@ -45,10 +49,6 @@
See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-23f/margins.ipynb).


- Superscript for powers of 10 instead of e-notation.

See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-23f/superscript.ipynb).


### Fixed
- Jitter reproducibility in geom_jitter, position_jitter, position_jitterdodge [[#911](https://github.com/JetBrains/lets-plot/issues/911)].
Expand Down