PyPlot.jl icon indicating copy to clipboard operation
PyPlot.jl copied to clipboard

ginput function in Julia PyPlot

Open eunjongkim opened this issue 8 years ago • 1 comments
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.

eunjongkim avatar Sep 29 '17 18:09 eunjongkim

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?

RalphAS avatar Oct 15 '17 16:10 RalphAS