From c4d5c220b1230dcd490f18acc5257bc914bd60b8 Mon Sep 17 00:00:00 2001 From: Hanne Heggdal Date: Mon, 26 May 2025 11:11:58 +0200 Subject: [PATCH] updated median, interactive --- notebooks/notebook_interactive_data.ipynb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/notebooks/notebook_interactive_data.ipynb b/notebooks/notebook_interactive_data.ipynb index b96398f..12b6f63 100644 --- a/notebooks/notebook_interactive_data.ipynb +++ b/notebooks/notebook_interactive_data.ipynb @@ -179,7 +179,7 @@ "median_color = widgets.ColorPicker(value='#d62728', description='Farge for median')\n", "dot_size = widgets.IntSlider(value=40, min=10, max=100, step=5, description='Punktstørrelse')\n", "\n", - "def plot_temp(show_mean, show_grid, dot_color, mean_color, median_color, dot_size):\n", + "def plot_temp(show_mean, show_median, show_grid, dot_color, mean_color, median_color, dot_size):\n", " '''\n", " This function creates an interactive plot using jupyter widgets. It makes a scatter diagram of the temperature with the temerature mean dashed line.\n", " It gives the user oppurtunity to customize color and size of the dots. And weather to show the grid or not, the same with the mean and median temperature line.\n", @@ -233,11 +233,12 @@ " plt.close()\n", "\n", "# Collects widgets in a UI (user interface)\n", - "ui = widgets.VBox([show_mean, show_grid, dot_color, mean_color, median_color, dot_size])\n", + "ui = widgets.VBox([show_mean, show_median, show_grid, dot_color, mean_color, median_color, dot_size])\n", "\n", "# Connects widgets to plot-functions\n", "out = widgets.interactive_output(plot_temp, {\n", " 'show_mean': show_mean,\n", + " 'show_median': show_median,\n", " 'show_grid': show_grid,\n", " 'dot_color': dot_color,\n", " 'mean_color': mean_color,\n", @@ -266,7 +267,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.5" + "version": "3.9.6" } }, "nbformat": 4,