Scilab Data type

segs_properties - description of the Segments entity properties

### Description

The Segs entity is a leaf of the graphics entities hierarchy. This entity defines the parameters for a set of colored segments or colored arrows.
- visible: This field contains the `visible` property value for the entity . It should be `"on"` or `"off"` . By default, the segments are visibles, the value's property is `"on"` . If `"off"` the segments are not drawn on the screen.
- data: This field is two column matrix `[x,y]` which gives the coordinates of the segments boundary. If `xv=matrix(x,2,-1)` and `yv=matrix(y,2,-1)` then `xv(:,k)` and `yv(:,k)` are the boundary coordinates of the segment numbered `k`.
- line_style: The `line_style` property value should be an integer in [0 9]. 0 stands for solid the other value stands for a selection of dashes. This property applies to all segments.
- thickness: This field contains the `thickness` property for all segments. Its value should be a non negative integer..
- arrow_size: If the value of this property is 0, segments are drawn, else arrows are drawn and the size of the arrows is given by the absolute value of this property.
- segs_color: This field contains the vector of colors to use to draw each segment. Each element is a color index relative to the current colormap.
- clip_state: This field contains the `clip_state` property value for the segments. It should be :
- `"off"` this means that the segments is not clipped.
- `"cliprf"` this means that the segments is clipped outside the Axes box.
- `"on"` this means that the segments is clipped outside the rectangle given by the property `clip_box`.
- clip_box: This field contains the `clip_box` property. By default segment are not clipped, clip_state is "off", so the value should be an empty matrix .Other cases the vector `[x,y,w,h]` (upper-left point width height) defines the portions of the segments to display, however `clip_state` property value will be changed.
- parent: This property contains the handle of the parent. The parent of the segment entity should be of the type `"Axes"` or `"Agregation"`.

### Exemples

      set("figure_style","new") //create a figure
       a=get("current_axes");//get the handle of the newly created axes
       a.data_bounds=[-10,-10,10,10];
       x=2*%pi*(0:7)/8;
       xv=[2*sin(x);9*sin(x)];
       yv=[2*cos(x);9*cos(x)];
       xsegs(xv,yv,1:8)

       s=a.children
       s.arrow_size=1;
        s.segs_color=15:22;
        for j=1:2
          for i=1:8
            h=s.data(i*2,j);
            s.data(i*2,j)=s.data(i*2-1,j);
            s.data(i*2-1,j)=  h;
           end
        end

       s.segs_color=5; //set all the colors to 5

       s.clip_box=[-4,4,8,8];
       a.thickness=4;
       xrect(s.clip_box);

### Voir aussi

`set` `get` `delete` `xsegs` `graphics_entities`

### Auteur

Djalel ABDMOUCHE