1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) INRIA - Djalel Abdemouche
6 * This file must be used under the terms of the CeCILL.
7 * This source file is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at
10 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
13 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="axis_properties">
15 <refname>axis properties</refname>
16 <refpurpose>description of the axis entity
21 <title>Description</title>
22 <para>The Axis entity is a leaf of the graphics entities hierarchy. This
23 entity defines the parameters for axis scaling and appearance.
27 <term>Axis properties</term>
33 <para>This property contains the handle of the parent. The parent of
34 the axis entity should be of the type <literal>"Axes"</literal> or
35 <literal>"Compound"</literal>.
40 <term>visible: </term>
43 This field contains the <literal>visible</literal> property value
44 for the entity . It should be <literal>"on" </literal> or
45 <literal>"off"</literal> . By default, the axis entity is visible, the
46 value's property is <literal>"on"</literal>. If <literal>"off"</literal>, the
47 axis is not drawn on the screen.
52 <term>tics_direction: </term>
54 <para>Specify the direction of the tics drawn under the horizontal
55 axis and the vertical axis. The possible values of this property
61 <literal>"top"</literal>. In this case, tics are drawn at the top
62 of the horizontal axis.
67 <literal>"bottom"</literal>. In this case, tics are drawn at the
68 bottom of the horizantal axis.
73 <literal>"left"</literal>. In this case, tics are going left on
79 <literal>"right"</literal>. In this case, tics are going right on
85 The defaults values are <literal>"top"</literal> for the horizontal
86 axis and <literal>"right"</literal> for vertical axis.
91 <term>xtics_coord: </term>
93 <para>This field represents the x-coordinate of the axis. It is a row
94 vector containing values increasing from left to right which give
95 tics positions for a horizontal axis. Other case, the entity is a
96 vertical axis, this property contain a scale which defines the
102 <term>ytics_coord: </term>
104 <para>This field represents the y-coordinate of the axis. It is a row
105 vector containing values increasing from bottom to top which give
106 tics positions for a vertical axis. Other case, the entity is a
107 horizontal axis, this property contain a scale which defines the
108 y-origin of the axis.
113 <term>tics_color: </term>
115 <para>The value of this properties is index of the color used to
116 draw the axis'lines and tics.
121 <term>tics_segment: </term>
123 <para>This field contains a flag which controls the display of the
124 base segment of the axis. The default is <literal>"on"</literal>, else
125 if to not display it, the property takes <literal>"off"</literal> as
131 <term>tics_style: </term>
133 <para>This property describes how the tics are given. It is a string
134 flag which can have these possible values:
139 <literal>"v"</literal>. It's the default value, In this case,
140 tics positions are given by the row factor
141 <literal>xtics_coord</literal> for horizontal axis
142 (<literal>ytics_coord</literal> for the vertical one).
147 <literal>"r"</literal>. In this case, tics positions are given by
148 the vector <literal>[min,max,n] </literal> where n is the number of
154 <literal>"i"</literal>. In this case the vector given tics
155 positions is of size 4, <literal>[k1,k2,a,n]</literal> then values
156 are increasing between <literal>k1*10^a</literal> and
157 <literal>k2*10^a</literal>, n is the number of intervals.
164 <term>sub_tics: </term>
166 <para>This field sets the number of tics to draw between two main
172 <term>tics_labels: </term>
174 <para>This field is a string matrix, which contains the strings to
175 be drawn along the axis at tics positions.
180 <term>format_n: </term>
182 <para>This property is a character string which specifies the floating-point display format of the tics labels numbers,
183 when relevant. It uses the format syntax of the C language printf function (for example <literal>"%.3f"</literal>).
184 If equal to <literal>""</literal>, a default display format is used.
189 <term>labels_font_color: </term>
191 <para>This property determines the color of the tics labels.</para>
195 <term>labels_font_size: </term>
197 <para>It is a scalar specifying the character size of tics labels.
198 If <literal>fractional_font</literal> property is <literal>"off"</literal>
199 only the integer part of the value is used.
200 For more information see <link linkend="graphics_fonts">graphics_fonts</link>.
205 <term>labels_font_style: </term>
207 <para>Specifies the font used to display the legend labels.
208 This is a positive integer referencing one of the loaded fonts.
209 Its value must be between 0, referencing the first font,
210 and the number of loaded fonts minus one, referencing the last font.
211 For more information see <link linkend="graphics_fonts">graphics_fonts</link>.
216 <term>fractional_font: </term>
219 This property specifies whether ticks labels are displayed using fractional font sizes.
220 Its value must be either <literal>"on"</literal> or <literal>"off"</literal>.
221 If <literal>"on"</literal> the floating point value of <literal>font_size</literal>
222 is used for display and the font is anti-aliased. If <literal>"off"</literal> only the integer part is used
223 and the font is not smoothed.
228 <term>clip_state: </term>
231 This field contains the <literal>clip_state</literal> property value
232 for the arc. Clip_state value should be :
237 <literal>"off"</literal> this means that the axis is not
243 <literal>"clipgrf"</literal> this means that the axis is clipped
244 outside the Axes box.
249 <literal>"on"</literal> this means that the axis is clipped
250 outside the arc given by property clip_box.
257 <term>clip_box: </term>
260 This field is to determinate the <literal>clip_box</literal>
261 property. By Default its value should be an empty matrix if
262 clip_state is "off". Other cases the vector <literal>[x,y,w,h]</literal>
263 (upper-left point width height) defines the portions of the axis
264 to display, however <literal>clip_state</literal> property value will be
270 <term>user_data: </term>
272 <para>This field can be used to store any scilab variable in the axis
273 data structure, and to retrieve it.
283 <title>Examples</title>
284 <programlisting role="example"><![CDATA[
285 a=get("current_axes");//get the handle of the newly created axes
286 a.data_bounds=[-1,-1;10,10];
288 drawaxis(x=2:7,y=4,dir='u');
290 a1.xtics_coord=[1 4 5 8 10];
292 a1.labels_font_size=3;
293 a1.tics_direction="bottom";
294 a1.tics_labels= [" February" "May" "june" "August" "October"];
296 drawaxis(x=1.2:1:10,y=5,dir='u',textcolor=13);
299 a2.tics_segment="off";
302 drawaxis(x=-1,y=0:1:7,dir='r',fontsize=10,textcolor=5,ticscolor=6,sub_int=10)
304 a3.tics_labels= 'B' +string(0:7);
305 a3.tics_direction="left";
308 <refsection role="see also">
309 <title>See Also</title>
310 <simplelist type="inline">
312 <link linkend="set">set</link>
315 <link linkend="get">get</link>
318 <link linkend="delete">delete</link>
321 <link linkend="drawaxis">drawaxis</link>
324 <link linkend="graphics_entities">graphics_entities</link>