Now that we know how to create a layout using a different combination of rows and columns, let’s move on to understanding how to interact with the plot. Let’s explore the advanced features of the layout, such as widgets, size, and stretch.
Widgets
Widgets equip you with easy access to information without requiring you to open the page that administers this information. If you wish to create an interactive plot, you might want to add widgets to a graph (for instance: sliders, select menus, and buttons, etc.).
Consider this example: The weather widget, which provides you with a quick view of the temperature throughout the day without opening the weather application.
Sometimes we don’t know the size of the plot that we would require in pixels. It can be useful to have properties that expand to fill up the horizontal and/or the vertical space available to it. In such cases, we can specify a sizing mode instead of specifying a width/height when creating the figure using the sizing_mode keyword argument.
Here, we will not use the gridplot function since it cannot be laid out as a plot. Instead, we will use the layout function, which supports mixing widgets and plots.
Let’s create a figure using sizing_mode to stretch_width
When you used the sizing and stretching programs to change the layout of your visualisation on Bokeh on your Jupyter Notebook, what changes did you observe in your output?