I would like to use Jupyter interactive widgets framework,
ipympl with IJulia and PyPlot.
I installed ipympl using pip3 install ipympl and then I tested it in the Jupyter notebook with python kernel using this simple example
Here is essential to use the so called iPython magic command
Everything was fine and I got interactive plot with pan/zoom.
My question is how do I insert this magic command into IJulia notebook?
I got this help from IJulia:
The analogue of IPython’s
%matplotlibin Julia is to use the PyPlot package, which gives a Julia interface to Matplotlib including inline plots in IJulia notebooks. (The equivalent of
numpyis already loaded by default in Julia.)
Given PyPlot, the analogue of
using PyPlot, since PyPlot defaults to inline plots in IJulia.
To enable separate GUI windows in PyPlot, analogous to
using PyPlot; pygui(true). To specify a particular gui backend, analogous to
%matplotlib gui, you can either do
using PyPlot; pygui(:gui); using PyPlot; pygui(true)(where
gtk), or you can do
ENV["MPLBACKEND"]=backend; using PyPlot; pygui(true)(where
backendis the name of a Matplotlib backend, like