Microscopy Image Browser 2.91
MIB
Loading...
Searching...
No Matches
ginputc.m File Reference

GINPUTC Graphical input from mouse. GINPUTC behaves similarly to GINPUT, except you can customize the cursor color, line width, and line style. More...

Functions

function [ x , y , button , ax ] = ginputc (varargin)
 GINPUTC Graphical input from mouse. GINPUTC behaves similarly to GINPUT, except you can customize the cursor color, line width, and line style.
 

Detailed Description

GINPUTC Graphical input from mouse. GINPUTC behaves similarly to GINPUT, except you can customize the cursor color, line width, and line style.

Function Documentation

◆ ginputc()

function [ x , y , button , ax ] = ginputc ( varargin)

GINPUTC Graphical input from mouse. GINPUTC behaves similarly to GINPUT, except you can customize the cursor color, line width, and line style.

[X,Y] = GINPUTC(N) gets N points from the current axes and returns the X- and Y-coordinates in length N vectors X and Y. The cursor can be positioned using a mouse. Data points are entered by pressing a mouse button or any key on the keyboard except carriage return, which terminates the input before N points are entered. Note: if there are multiple axes in the figure, use mouse clicks instead of key presses. Key presses may not select the axes where the cursor is.

[X,Y] = GINPUTC gathers an unlimited number of points until the return key is pressed.

[X,Y] = GINPUTC(N, PARAM, VALUE) and [X,Y] = GINPUTC(PARAM, VALUE) specifies additional parameters for customizing. Valid values for PARAM

are
Color : A three-element RGB vector, or one of the MATLAB predefined names, specifying the line color. See the ColorSpec reference page for more information on specifying color. Default is k (black). LineWidth : A scalar number specifying the line width. Default is 0.5. LineStyle : -, , -., :. Default is -. ShowPoints : TRUE or FALSE specifying whether to show the points being selected. Default is false. ConnectPoints : TRUE or FALSE specifying whether to connect the points as they are being selected. This only applies when ShowPoints is set to TRUE. Default is true.

[X,Y,BUTTON] = GINPUTC(...) returns a third result, BUTTON, that contains a vector of integers specifying which mouse button was used (1,2,3 from left) or ASCII numbers if a key on the keyboard was used.

[X,Y,BUTTON,AX] = GINPUTC(...) returns a fourth result, AX, that contains a vector of axes handles for the data points collected.

Examples
[x, y] = ginputc;

[x, y] = ginputc(5, Color, r, LineWidth, 3);

[x, y, button] = ginputc(1, LineStyle, :);

subplot(1, 2, 1); subplot(1, 2, 2); [x, y, button, ax] = ginputc;

[x, y] = ginputc(ShowPoints, true, ConnectPoints, true);

See also
GINPUT, GTEXT, WAITFORBUTTONPRESS.

References N.

Referenced by mibView.getClickPoint().

Here is the caller graph for this function: