Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Português - 日本語 - Русский

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

Aide de Scilab >> Graphiques > 2d_plot > Matplot properties

Matplot properties

description of the Matplot entities properties

Description

The Matplot entity is a leaf of the graphics entities hierarchy. It represents 2D plots of surface using colors and images (see Matplot and Matplot1).

parent:

this property contains the handle of the parent. The parent of the Matplot entity should be of the type "Axes".

children:

this property contains a vector with the children of the handle. However, Matplot handles currently do not have any children.

visible:

this field contains the visible property value for the entity. It should be "on" or "off" . By default, the plot is visible, the property's value is "on". If "off" the plot is not drawn on the screen.

data:

this field defines a [mxn] color data matrix (double, (u)int8, (u)int16, (u)int32) or hypermatrix. The colors are interpreted according to the image_type property. The color associated to color(i,j) is used do draw a small square of length 1 with center at location (x=j,y=(m-i+1)).

rect:

this field contains a row-vector defined by [xmin, ymin, xmax, ymax]. It specifies a rectangle in the current scale and the matrix is drawn inside this rectangle.

image_type:

this field defines the image type. It could be one of the values: "rgb", "rgba", "gray", "index", "red", "green", "blue", "rgb332", "rgb444", "rgb555", "rgba5551", "argb".

Colors are determinated by the data type and by image_type:

  • When image_type is equal to index, the data are just considered as an index in the colormap.

  • When image_type is equal to rgb, hypermat of int8 or uint8 will give the RGB components, hypermat of doubles will give normalized RGB components (values between 0 and 1), matrices of int8 or uint8 where number of rows is a multiple of 3 will give the RGB components, matrices of int32 will give RGB colors, matrices of uint32 will give RGBA colors where the alpha channel will be set to 0xFF.

  • When image_type is equal to rgba, hypermat of int8 or uint8 will give the RGBA components, hypermat of doubles will give normalized RGBA components (values between 0 and 1), matrices of int8 or uint8 where number of rows is a multiple of 4 will give the RGB components, matrices of int32 will give RGBA colors, matrices of uint32 will give RGBA colors.

  • When image_type is equal to gray, matrices of int8 or uint8 will give Gray level color (R-G-B=GRAY-GRAY-GRAY), for other types, data will be considered as RGB ones and converted into gray colors (0.299*R+0.587*G+0.114*B).

  • When image_type is equal to red, matrices of int8 or uint8 will give Red level color (R-G-B=RED-00-00), for other types, data will be considered as RGB ones and converted into red colors (a mask is applied to keep the Red component).

  • When image_type is equal to green, matrices of int8 or uint8 will give Green level color (R-G-B=00-GREEN-00), for other types, data will be considered as RGB ones and converted into green colors (a mask is applied to keep the Green component).

  • When image_type is equal to blue, matrices of int8 or uint8 will give Blue level color (R-G-B=00-00-BLUE), for other types, data will be considered as RGB ones and converted into blue colors (a mask is applied to keep the Blue component).

  • When image_type is equal to rgb332, matrices of int8 or uint8 will give RGB colors where R component is wrote on 3 bits, G component on 3 bits and B component on 2 bits. For other data types, RGB (8-8-8) data are converted into RGB (3-3-2).

  • When image_type is equal to rgb444, matrices of int16 or uint16 will give RGB colors where each components is wrote on 4 bits. For other data types, RGB (8-8-8) data are converted into RGB (4-4-4).

  • When image_type is equal to rgb555, matrices of int16 or uint16 will give RGB colors where each components is wrote on 5 bits. For other data types, RGB (8-8-8) data are converted into RGB (5-5-5).

  • When image_type is equal to rgb4444, matrices of int16 or uint16 will give RGBA colors where each components is wrote on 4 bits. For other data types, RGBA (8-8-8-8) data are converted into RGBA (4-4-4-4).

  • When image_type is equal to rgb5551, matrices of int16 or uint16 will give RGBA colors where each non-alpha components is wrote on 5 bits and the alpha component on 1 bit. For other data types, RGBA (8-8-8-8) data are converted into RGBA (5-5-5-1).

  • When image_type is equal to argb, hypermat of int8 or uint8 will give the ARGB components, hypermat of doubles will give normalized ARGB components (values between 0 and 1), matrices of int8 or uint8 where number of rows is a multiple of 4 will give the RGB components, matrices of int32 will give ARGB colors, matrices of uint32 will give ARGB colors.

clip_state:

this field contains the clip_state property value for the Matplot. It should be :

  • "off" this means that the Matplot is not clipped.

  • "clipgrf" this means that the Matplot is clipped outside the Axes box.

  • "on" this means that the Matplot is clipped outside the rectangle given by property clip_box.

clip_box:

this field is to determinate the clip_box property. By default its value should be an empty matrix if clip_state is "off". Other cases the vector [x,y,w,h] (upper-left point width height) defines the portions of the Matplot to display, however clip_state property value will be changed.

user_data:

this field can be use to store any scilab variable in the Matplot data structure, and to retreive it.

Examples

Matplot((1:xget("lastpattern")))
e=gce(); // get current entity

e.data=e.data($:-1:1) // reverse order

See Also

  • set — set a property value of a graphic entity object or of a User Interface object.
  • get — Retrieve a property value from a graphics entity or an User Interface object.
  • delete — delete a graphic entity and its children.
  • grayplot — 2D plot of a surface using colors
  • Matplot — 2D plot of a matrix using colors
  • Matplot1 — 2D plot of a matrix using colors
  • graphics_entities — description of the graphics entities data structures
  • grayplot_properties — description of the grayplot entities properties

History

VersionDescription
5.5.0
  • Property image_type introduced.
  • Property rect introduced.
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 13:54:34 CEST 2014