Skip to content

Commit

Permalink
update samples notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiKingsley committed Mar 26, 2024
1 parent 727cbe0 commit 05ba9d2
Show file tree
Hide file tree
Showing 89 changed files with 32,467 additions and 5,440 deletions.
585 changes: 298 additions & 287 deletions examples/notebooks/lets-plot/quickstart.ipynb

Large diffs are not rendered by default.

534 changes: 492 additions & 42 deletions examples/notebooks/lets-plot/samples/area/area_fixed.ipynb

Large diffs are not rendered by default.

450 changes: 412 additions & 38 deletions examples/notebooks/lets-plot/samples/area/area_settings.ipynb

Large diffs are not rendered by default.

609 changes: 564 additions & 45 deletions examples/notebooks/lets-plot/samples/area/area_with_mark_line.ipynb

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,488 changes: 1,480 additions & 8 deletions examples/notebooks/lets-plot/samples/area/density_plot.ipynb

Large diffs are not rendered by default.

424 changes: 398 additions & 26 deletions examples/notebooks/lets-plot/samples/area/functional_area.ipynb

Large diffs are not rendered by default.

215 changes: 112 additions & 103 deletions examples/notebooks/lets-plot/samples/area/several_areas.ipynb

Large diffs are not rendered by default.

432 changes: 404 additions & 28 deletions examples/notebooks/lets-plot/samples/area/simple_area.ipynb

Large diffs are not rendered by default.

502 changes: 494 additions & 8 deletions examples/notebooks/lets-plot/samples/area/smoothed_area.ipynb

Large diffs are not rendered by default.

Large diffs are not rendered by default.

261 changes: 135 additions & 126 deletions examples/notebooks/lets-plot/samples/bars/bar_gradient.ipynb

Large diffs are not rendered by default.

185 changes: 97 additions & 88 deletions examples/notebooks/lets-plot/samples/bars/bar_settings.ipynb

Large diffs are not rendered by default.

179 changes: 94 additions & 85 deletions examples/notebooks/lets-plot/samples/bars/bar_with_reversed_axis.ipynb

Large diffs are not rendered by default.

118 changes: 60 additions & 58 deletions examples/notebooks/lets-plot/samples/bars/fixed_bar.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,44 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true,
"ExecuteTime": {
"end_time": "2023-12-04T16:33:03.811027Z",
"start_time": "2023-12-04T16:32:53.983364Z"
"end_time": "2024-03-26T09:33:09.404775Z",
"start_time": "2024-03-26T09:33:02.169852Z"
}
},
"outputs": [],
"source": [
"%use kandy"
]
],
"outputs": [],
"execution_count": 1
},
{
"cell_type": "code",
"execution_count": 2,
"source": [
"plot {\n",
" x(listOf(2017, 2018, 2019, 2020, 2021, 2022, 2023)) {\n",
" axis.breaks(format = \"d\")\n",
" }\n",
" bars {\n",
" y.constant(100)\n",
" width = 0.5\n",
" fillColor = Color.GREY\n",
" alpha = 0.3\n",
" }\n",
" bars {\n",
" y(listOf(20, 100, 50, 80, 70, 10, 30))\n",
" }\n",
"}"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-03-26T09:33:11.139144Z",
"start_time": "2024-03-26T09:33:09.416752Z"
}
},
"outputs": [
{
"data": {
Expand All @@ -28,7 +50,7 @@
" <script type="text/javascript" data-lets-plot-script="library" src="https://cdn.jsdelivr.net/gh/JetBrains/[email protected]/js-package/distr/lets-plot.min.js"></script>\n",
" </head>\n",
" <body>\n",
" <div id="4lHC5h"></div>\n",
" <div id="jAeAe0"></div>\n",
" <script type="text/javascript" data-lets-plot-script="plot">\n",
" var plotSpec={\n",
""mapping":{\n",
Expand Down Expand Up @@ -80,12 +102,11 @@
"}\n",
"}]\n",
"};\n",
" var plotContainer = document.getElementById("4lHC5h");\n",
" var plotContainer = document.getElementById("jAeAe0");\n",
" LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer);\n",
" </script>\n",
" </body>\n",
"&lt;/html>\"></iframe> \n",
" <svg id=22167890-ebf0-4d27-82b2-bb65874006d7 xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" class=\"plt-container\" width=\"600.0\" height=\"400.0\">\n",
"&lt;/html>\"></iframe> <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" class=\"plt-container\" id=15943207-9eee-40bf-9161-68e25db5732e width=\"100%\" height=\"100%\" style=\"max-width: 600.0px; max-height: 400.0px;\" viewBox=\"0 0 600.0 400.0\" preserveAspectRatio=\"xMinYMin meet\">\n",
" <style type=\"text/css\">\n",
" .plt-container {\n",
" font-family: Lucida Grande, sans-serif;\n",
Expand All @@ -97,112 +118,112 @@
"text {\n",
" text-rendering: optimizeLegibility;\n",
"}\n",
"#puGbF2Q .plot-title {\n",
"#pYAjdec .plot-title {\n",
" fill: #474747;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 16.0px;\n",
" font-weight: normal;\n",
" font-style: normal; \n",
"}\n",
"#puGbF2Q .plot-subtitle {\n",
"#pYAjdec .plot-subtitle {\n",
" fill: #474747;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 15.0px;\n",
" font-weight: normal;\n",
" font-style: normal; \n",
"}\n",
"#puGbF2Q .plot-caption {\n",
"#pYAjdec .plot-caption {\n",
" fill: #474747;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 13.0px;\n",
" font-weight: normal;\n",
" font-style: normal; \n",
"}\n",
"#puGbF2Q .legend-title {\n",
"#pYAjdec .legend-title {\n",
" fill: #474747;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 15.0px;\n",
" font-weight: normal;\n",
" font-style: normal; \n",
"}\n",
"#puGbF2Q .legend-item {\n",
"#pYAjdec .legend-item {\n",
" fill: #474747;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 13.0px;\n",
" font-weight: normal;\n",
" font-style: normal; \n",
"}\n",
"#puGbF2Q .axis-title-x {\n",
"#pYAjdec .axis-title-x {\n",
" fill: #474747;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 15.0px;\n",
" font-weight: normal;\n",
" font-style: normal; \n",
"}\n",
"#puGbF2Q .axis-text-x {\n",
"#pYAjdec .axis-text-x {\n",
" fill: #474747;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 13.0px;\n",
" font-weight: normal;\n",
" font-style: normal; \n",
"}\n",
"#dICvjXI .axis-tooltip-text-x {\n",
"#dvLQkFA .axis-tooltip-text-x {\n",
" fill: #ffffff;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 13.0px;\n",
" font-weight: normal;\n",
" font-style: normal; \n",
"}\n",
"#puGbF2Q .axis-title-y {\n",
"#pYAjdec .axis-title-y {\n",
" fill: #474747;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 15.0px;\n",
" font-weight: normal;\n",
" font-style: normal; \n",
"}\n",
"#puGbF2Q .axis-text-y {\n",
"#pYAjdec .axis-text-y {\n",
" fill: #474747;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 13.0px;\n",
" font-weight: normal;\n",
" font-style: normal; \n",
"}\n",
"#dICvjXI .axis-tooltip-text-y {\n",
"#dvLQkFA .axis-tooltip-text-y {\n",
" fill: #ffffff;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 13.0px;\n",
" font-weight: normal;\n",
" font-style: normal; \n",
"}\n",
"#puGbF2Q .facet-strip-text-x {\n",
"#pYAjdec .facet-strip-text-x {\n",
" fill: #474747;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 13.0px;\n",
" font-weight: normal;\n",
" font-style: normal; \n",
"}\n",
"#puGbF2Q .facet-strip-text-y {\n",
"#pYAjdec .facet-strip-text-y {\n",
" fill: #474747;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 13.0px;\n",
" font-weight: normal;\n",
" font-style: normal; \n",
"}\n",
"#dICvjXI .tooltip-text {\n",
"#dvLQkFA .tooltip-text {\n",
" fill: #474747;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 13.0px;\n",
" font-weight: normal;\n",
" font-style: normal; \n",
"}\n",
"#dICvjXI .tooltip-title {\n",
"#dvLQkFA .tooltip-title {\n",
" fill: #474747;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 13.0px;\n",
" font-weight: bold;\n",
" font-style: normal; \n",
"}\n",
"#dICvjXI .tooltip-label {\n",
"#dvLQkFA .tooltip-label {\n",
" fill: #474747;\n",
" font-family: Lucida Grande, sans-serif;\n",
" font-size: 13.0px;\n",
Expand All @@ -211,7 +232,7 @@
"}\n",
"\n",
" </style>\n",
" <g id=\"puGbF2Q\">\n",
" <g id=\"pYAjdec\">\n",
" <path fill-rule=\"evenodd\" fill=\"rgb(255,255,255)\" fill-opacity=\"1.0\" d=\"M0.0 0.0 L0.0 400.0 L600.0 400.0 L600.0 0.0 Z\">\n",
" </path>\n",
" <g transform=\"translate(23.0 10.0 ) \">\n",
Expand Down Expand Up @@ -350,9 +371,9 @@
" </g>\n",
" </g>\n",
" </g>\n",
" <g transform=\"translate(29.941816366404606 0.0 ) \" clip-path=\"url(#cWXs11y)\" clip-bounds-jfx=\"[rect (0.0, 0.0), (537.0581836335954, 344.0)]\">\n",
" <g transform=\"translate(29.941816366404606 0.0 ) \" clip-path=\"url(#ch853JP)\" clip-bounds-jfx=\"[rect (0.0, 0.0), (537.0581836335954, 344.0)]\">\n",
" <defs>\n",
" <clipPath id=\"cWXs11y\">\n",
" <clipPath id=\"ch853JP\">\n",
" <rect x=\"0.0\" y=\"0.0\" width=\"537.0581836335954\" height=\"344.0\">\n",
" </rect>\n",
" </clipPath>\n",
Expand All @@ -372,9 +393,9 @@
" <rect x=\"38.56346641376149\" y=\"16.380952380952408\" height=\"327.6190476190476\" width=\"35.37932698507211\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(163,153,153)\" fill-opacity=\"0.3\" stroke-width=\"1.6500000000000001\">\n",
" </rect>\n",
" </g>\n",
" <g transform=\"translate(29.941816366404606 0.0 ) \" clip-path=\"url(#cBLLeV3)\" clip-bounds-jfx=\"[rect (0.0, 0.0), (537.0581836335954, 344.0)]\">\n",
" <g transform=\"translate(29.941816366404606 0.0 ) \" clip-path=\"url(#c3Hw69J)\" clip-bounds-jfx=\"[rect (0.0, 0.0), (537.0581836335954, 344.0)]\">\n",
" <defs>\n",
" <clipPath id=\"cBLLeV3\">\n",
" <clipPath id=\"c3Hw69J\">\n",
" <rect x=\"0.0\" y=\"0.0\" width=\"537.0581836335954\" height=\"344.0\">\n",
" </rect>\n",
" </clipPath>\n",
Expand Down Expand Up @@ -408,10 +429,10 @@
" <path fill=\"rgb(0,0,0)\" fill-opacity=\"0.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" stroke-width=\"0.0\" d=\"M0.0 0.0 L0.0 400.0 L600.0 400.0 L600.0 0.0 Z\">\n",
" </path>\n",
" </g>\n",
" <g id=\"dICvjXI\">\n",
" <g id=\"dvLQkFA\">\n",
" </g>\n",
"</svg>\n",
" <script>document.getElementById(\"22167890-ebf0-4d27-82b2-bb65874006d7\").style.display = \"none\";</script>"
" <script>document.getElementById(\"15943207-9eee-40bf-9161-68e25db5732e\").style.display = \"none\";</script>"
],
"application/plot+json": {
"output_type": "lets_plot_spec",
Expand Down Expand Up @@ -500,34 +521,12 @@
"swing_enabled": true
}
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result",
"execution_count": 2
"output_type": "execute_result"
}
],
"source": [
"plot {\n",
" x(listOf(2017, 2018, 2019, 2020, 2021, 2022, 2023)) {\n",
" axis.breaks(format = \"d\")\n",
" }\n",
" bars {\n",
" y.constant(100)\n",
" width = 0.5\n",
" fillColor = Color.GREY\n",
" alpha = 0.3\n",
" }\n",
" bars {\n",
" y(listOf(20, 100, 50, 80, 70, 10, 30))\n",
" }\n",
"}"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-12-04T16:33:09.862598Z",
"start_time": "2023-12-04T16:33:08.390536Z"
}
}
"execution_count": 2
}
],
"metadata": {
Expand All @@ -544,6 +543,9 @@
"pygments_lexer": "kotlin",
"codemirror_mode": "text/x-kotlin",
"nbconvert_exporter": ""
},
"ktnbPluginMetadata": {
"projectLibraries": []
}
},
"nbformat": 4,
Expand Down
685 changes: 659 additions & 26 deletions examples/notebooks/lets-plot/samples/bars/functional_bars.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 05ba9d2

Please sign in to comment.