How to modify plot on click?

The other day, I saw a research presenting a graph where he added points where he clicked and did arbitrary logic on them upon adding them (to be precise, it was a Poincaré section, and adding a point computed and showed its orbit). I know he used pgplot5 with C, but I’ve been trying to replicate this in Julia since then, without success. I couldn’t get the PGPlot.jl or PGFPlotX.jl examples to work, and the closest I could get was with PlotlyJS and this example Click events in Julia However, there it seems like only clicking on existing data would work; I could not click on an empty space to add a point there. I could do a scatter mesh to cover the plane, but that is a bit tedious; do you know any way to properly reproduce the target behaviour?

PS: note that this is my first time with any of those packages, so I may be missing obvious solutions; sorry in advance for that!