Skip to content

Commit

Permalink
updated median, interactive
Browse files Browse the repository at this point in the history
  • Loading branch information
hannhegg committed May 26, 2025
1 parent 95c475a commit c4d5c22
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions notebooks/notebook_interactive_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -266,7 +267,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.5"
"version": "3.9.6"
}
},
"nbformat": 4,
Expand Down

0 comments on commit c4d5c22

Please sign in to comment.