- Scilab Help
- Graphics
- 2d_plot
- 3d_plot
- annotation
- axes_operations
- axis
- bar_histogram
- Color management
- Datatips
- figure_operations
- geometric_shapes
- handle
- interaction
- lighting
- load_save
- pie
- polygon
- property
- text
- transform
- window_control
- GlobalProperty
- Graphics: Getting started
- Compound properties
- Graphics Entities
- object editor
- pixel_drawing_mode
- Segments properties
- twinkle
- xchange
- xclear
- xdel
- xget
- xgetech
- xgraduate
- xgrid
- xname
- xnumb
- xpause
- xsegs
- xset
- xsetech
- xsetm

Please note that the recommended version of Scilab is 6.1.0. This page might be outdated.

See the recommended documentation of this function

# xchange

transform real to pixel coordinates

### Calling Sequence

[x1, y1, rect] = xchange(x, y, dir)

### Arguments

- x, y
two matrices of size

`(n1, n2)`

(coordinates of a set of points).- dir
a string, parameter used to specify the conversion type (See "Description" for details).

- x1, y1
two matrices of size

`(n1, n2)`

(coordinates of the set of points).- rect
a vector of size 4.

### Description

After having used a graphics function, `xchange`

computes pixel coordinates from real coordinates and conversely,
according to the value of the parameter `dir`

:
`"f2i"`

(float to int) means real to pixel and
`"i2f"`

(int to float) means pixel to real.

`x1`

and `y1`

are the new
coordinates of the set of points defined by the old coordinates
`x`

and `y`

.

`rect`

is the coordinates in pixel of the rectangle
in which the plot was done: `[upper-left point, width, height]`

.

## Comments

Add a comment:Please login to comment this page.