Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Graphics > interaction > locate

locate

mouse selection of a set of points

Calling Sequence

x=locate([n,flag])

Arguments

x

matrix of size (2,n1). n1=n if the parameter n is given.

n,flag

integer values.

Description

locate is used to get the coordinates of one or more points selected with the mouse in a graphics window. The coordinates are given using the current graphics scale.

If n>0, n points are selected and their coordinates are returned in the matrix x.

If n<=0, points are selected until the user clicks with the left button of the mouse which stands for stop. The last point (clicked with the left button) is not returned.

x=locate() is the same as x=locate(-1).

If flag=1 a cross is drawn at the points where the mouse is clicked.

plot2d(0,0,0,rect=[0,0,1,1]) xgrid(3) X=locate(4) xfpolys(X(1,:)',X(2,:)',4)

See Also

  • xclick — Wait for a mouse click or an event in a graphic window.
  • xgetmouse — get the mouse events and current position
Report an issue
<< event handler functions interaction rubberbox >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Fri Apr 11 14:06:54 CEST 2014