PyPlot.jl
PyPlot.jl copied to clipboard
ginput function in Julia PyPlot
trafficstars
Hi, I was wondering if there's any known example of using ginput function in Julia. This function allows you to take datapoints by clicking the plot, which if often easy and helpful.
Behavior of ginput probably depends on the low-level backend. I use it routinely with the Qt backends for PyPlot, where it works as advertised (in the help message), returning a vector of 2-tuples with data XY coordinates.
julia> res=ginput(1)
1-element Array{Tuple{Float64,Float64},1}:
(-0.00511089, -0.0188176)
julia> x,y=res[1];
julia> println("x is $x y is $y")
x is -0.005110887096774208 y is -0.018817640692640678
Are you having specific problems?