mirror of
https://github.com/TeachBooks/manual.git
synced 2026-11-12 22:35:51 +00:00
Toolbar options
@douden Co-Authored-By: Dennis den Ouden-van der Horst <49307154+douden@users.noreply.github.com>
This commit is contained in:
parent
c373899f64
commit
9a1d306867
2 changed files with 18 additions and 1 deletions
BIN
book/features/figures/toolbar.png
Normal file
BIN
book/features/figures/toolbar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
|
|
@ -40,7 +40,24 @@
|
|||
"```python\n",
|
||||
"input_slider = widgets.FloatSlider(value=0, min=0, max=10, step=1, description='Input variable:') # Defines a widget, more options than just FloatSlider\n",
|
||||
"widgets.interact(update_plot, input_variable_from_widget = input_slider);\n",
|
||||
"```\n"
|
||||
"```\n",
|
||||
"\n",
|
||||
"Finally, When using `%matplotlib widget`, there's the following toolbar:\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"Which only shows up when you hoover above. If you want to disable the toolbar you can use:\n",
|
||||
"```python\n",
|
||||
"fig = plt.gcf()\n",
|
||||
"fig.canvas.toolbar_visible = False\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"If you want it to be visible even if you don't hoover above it, use:\n",
|
||||
"\n",
|
||||
"```python\n",
|
||||
"fig = plt.gcf()\n",
|
||||
"fig.canvas.toolbar_visible = True\n",
|
||||
"```"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue