# Figures as Jupyter widgets

**URL:** <https://discourse.julialang.org/t/figures-as-jupyter-widgets/56872>\
**Category:** Jupyter-Notebook\
**Created:** [March 10, 2021, 12:21pm UTC](https://discourse.julialang.org/t/figures-as-jupyter-widgets/56872 "2021-03-10T12:21:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sswatson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sswatson/32/5135_2.png) [@sswatson](https://discourse.julialang.org/u/sswatson)\
**Post date:** [March 10, 2021, 12:21pm UTC](https://discourse.julialang.org/t/figures-as-jupyter-widgets/56872/1 "2021-03-10T12:21:59Z")

</div>

I’d like to create a Jupyter notebook which I can deploy on Binder which allows users to click on a two-dimensional plot and have a curve drawn through the clicked point. For example, the curve might be an ODE solution with the given point as an initial condition. [Here’s an example](https://prismia.chat/shared/6GOS-OYEC) in pure Javasript (it works by dragging instead of clicking, but similar idea).

It’s currently possible to do this in Python using `%matplotlib widget`. Is there a way to do it with a Julia kernel?

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [March 10, 2021, 1:28pm UTC](https://discourse.julialang.org/t/figures-as-jupyter-widgets/56872/2 "2021-03-10T13:28:38Z")

</div>

@fonsp has a proof of concept of this with Pluto, I believe.

---

<div class="post-metadata">

**Author:** ![fonsp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fonsp/32/222349_2.png) [@fonsp](https://discourse.julialang.org/u/fonsp)\
**Post date:** [March 10, 2021, 9:49pm UTC](https://discourse.julialang.org/t/figures-as-jupyter-widgets/56872/3 "2021-03-10T21:49:03Z")

</div>

> <https://github.com/fonsp/disorganised-mess/blob/main/plotclicktracker.jl>

---

<div class="post-metadata">

**Author:** ![sswatson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sswatson/32/5135_2.png) [@sswatson](https://discourse.julialang.org/u/sswatson)\
**Post date:** [March 11, 2021, 4:52pm UTC](https://discourse.julialang.org/t/figures-as-jupyter-widgets/56872/4 "2021-03-11T16:52:05Z")

</div>

Very cool! Remarkable that this is possible using only Plots.jl.
