IJulia and magic command

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

%matplotlib widget

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 %matplotlib in Julia is to use the PyPlot package, which gives a Julia interface to Matplotlib including inline plots in IJulia notebooks. (The equivalent of numpy is already loaded by default in Julia.)
Given PyPlot, the analogue of %matplotlib inline is using PyPlot , since PyPlot defaults to inline plots in IJulia.

To enable separate GUI windows in PyPlot, analogous to %matplotlib , do 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 gui is wx , qt , tk , or gtk ), or you can do ENV["MPLBACKEND"]=backend; using PyPlot; pygui(true) (where backend is the name of a Matplotlib backend, like tkagg ).

Not supported yet: Support IPython interactive widgets used in Python code · Issue #89 · JuliaPy/PyCall.jl · GitHub