Questions tagged [ginput]

Graphical input from mouse or cursor.

51 questions
3
votes
1 answer

using ginput in embedded matplotlib figure in PyQt4

I'm trying to use the 'ginput' to measure distance in a matplotlib figure by allowing the user to mouse click the locations. I am able to do this independently in the matplotlib figure, but I'm having problems when I tried to set the figure onto a…
3
votes
3 answers

Zooming in/out while using ginput function in MATLAB

I am using the ginput function in MATLAB to use the cursor to collect many x,y coordinates on images. I am following a certain path along the image and need to zoom-in to get a precise coordinates, but the zoom-in option is disabled while using…
r9 fan
  • 167
  • 1
  • 2
  • 6
3
votes
3 answers

can Python Matplotlib "ginput" be independent from "zoom to rectangle"?

I am using ginput for a graphic selection of a few points along a time signal. Sometimes, when the signal is too dense it might be useful to zoom over an area before making the selection of points. My problem is that it seems that the zoom to…
Alain
  • 381
  • 3
  • 19
3
votes
1 answer

Ignore double click with ginput in MATLAB

My question is rather simple, does anyone know a way to have matlab's ginput ignore subsequent clicks at the same location? I've thought of some possibilities, like a for loop that checks the stored arrays for identical values and remove them, but…
user129412
  • 765
  • 1
  • 6
  • 19
2
votes
2 answers

pyplot figure only updating after second call to ginput()

I have a method that uses matplotlib.pyplot.ginput() to collect a single click's location from axes, and then place an image at that location within an existing underlaid array of axes in the same figure. The visual only updates after a second call…
2
votes
0 answers

python Ginput working in spyder but not working from terminal or command window

I have a program to scatter plot eigenvalues and from the user click to retrieve the selected number/coordinate and use that input for further analysis. The program is working fine in Spyder console ( I am using python 2.7.16 and matplotlib 2.2.3).…
MESSI
  • 21
  • 3
2
votes
1 answer

Is there any function for getpts() of MATLAB in Octave?

I load a data file and plot it in octave. But in the plot, I want to mark the periodic appearance of points on the plot. I used ginput() function for marking. But the problem I see is, if I mark a different point which was not supposed to mark and…
2
votes
1 answer

MATLAB: How to get the clicked values relative to a figure position rather than figure axis

As some background, what I am trying to do is add an inset figure to a current plot. I've got most of this done. Here is a code sample: h = figure(1); %Arbitrary figure #1 plot(990000:1000000,990000:1000000,'--r'); g = figure(2); %Arbitary figure…
Darcy
  • 619
  • 2
  • 5
  • 15
2
votes
1 answer

How to slice list from matplotlib ginput

I have a list of values in Python, which I'm plotting with matplotlib. I'm then trying to use ginput in matplotlib to click two points on the graph, from which the X coordinates will be taken, between which to slice my original list. However, I…
2
votes
0 answers

Matplotlib ginput: Assigning no actions to a button and displaying points

I have a script which is supposed to do the following: 1) Allow the user to select two points (one in each subplot) 2) Let the user decide if the points are hit accurately enough For this, I would like to use ginput. There are,however, two…
G.Lang
  • 121
  • 1
  • 3
2
votes
1 answer

How to disable ginput() in Octave?

I want to make Octave work only in terminal mode and options like --no-gui --no-window-system -W don't help me avoid ginput() command.
Ugnius Malūkas
  • 2,649
  • 7
  • 29
  • 42
1
vote
0 answers

Error while running python ginplut command

I'm trying to read (x, y) values from a series of plots with ginput; however, when running the code I get the following error and everything freezes!! QTimer::singleShot: Timers cannot have negative timeouts How can I solve this issue? # EXAMPLE…
Amin
  • 11
  • 1
1
vote
2 answers

prevent matplotlib ginput registering click on widget button

I've written a code to register the x values clicked in a plot window using ginput, it works fine and only registers when you click within the window. I then wanted to add some control buttons using matplotlib widgets which I did and they work fine…
ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86
1
vote
1 answer

Get subplot number from Ginputc the same way than Ginput (answer with faster Ginput)

I am trying to replace the function ginput with the function ginputc found on fileexchange: Custom GINPUT from Jiro. I find ginput very slow to start when first called. ginputc is faster. There is one functionality that I was using with ginput that…
Nico
  • 83
  • 1
  • 10
1
vote
1 answer

collect mouse click location with matplotlib ginput and draw vertical line through location

I'm trying to collect a series of mouse click locations using ginput,updating the plot each time by drawing a vertical line through each click: import numpy as np import matplotlib.pyplot as…
ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86
1
2 3 4