1 | initial version |
There are several ways to resolve the issue of plots not displaying when invoked from a custom function:
plt.show()
function within the custom function to display the plot.ax
object to the custom function and use it to plot the data. This ensures that the plot is created on the same axis object that is displayed by plt.show()
.%matplotlib inline
magic command at the beginning of the notebook cell to ensure that all plots are displayed inline.%matplotlib qt
will display the plot in a separate window.