# Interactive plotting from the REPL?

**URL:** <https://discourse.julialang.org/t/interactive-plotting-from-the-repl/29410>\
**Category:** Visualization\
**Tags:** question, plotting\
**Created:** [October 2, 2019, 2:15pm UTC](https://discourse.julialang.org/t/interactive-plotting-from-the-repl/29410 "2019-10-02T14:15:57Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![MA\_Laforge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ma_laforge/32/385_2.png) [@MA\_Laforge](https://discourse.julialang.org/u/MA_Laforge)\
**Post date:** [October 5, 2019, 1:10am UTC](https://discourse.julialang.org/t/interactive-plotting-from-the-repl/29410/9 "2019-10-05T01:10:23Z")

</div>

InspectDR written in Julia, so you can add interactivity if you wish.

It was not _ **designed** _ to hook in custom callbacks yet, but you can use “dynamic patching” (guerrilla patch/monkey patch) to “hack” in your own hooks at the moment.

You can find an example of this here:

> [@Recording mouse position coordinates in plots?](https://discourse.julialang.org/t/recording-mouse-position-coordinates-in-plots/28848/12):
>
> Correct @davide: First example The first example does not work at the moment. I think it is supposed to work, but the "button-press-event" signal already has a connection in the InspectDR code. I think this is a bug with Gtk. I am almost certain you are supposed to be able to connect multiple callback functions to the same “signal”. I merely included the example in case you better understood how Gtk worked, and knew how to get around the problem. Second example As for the second example:…

Note that it might be more appropriate to overwrite the callback functions instead of the `handleevent_mousepress()` function. I can guide you through that if you want.

### Limitations

InspectDR does not support heat map or contour plots - so you probably don’t want to use it for drawing fractals. But it does work fine for 2D line plots.

### Layered design

InspectDR typically is used as a plot application, but you could also instantiate an individual InspectDR plot widget within your custom, interactive Gtk application.

…But if you want to do that, you might want an overview of how the code was divided into files. I will only do that if you ask, I don’t feel like explaining this for nothing.

---

_[View the full topic](https://discourse.julialang.org/t/interactive-plotting-from-the-repl/29410)._
