isoview('on'|'off') missed switching .cube_scaling='off'|'on'
[scilab.git] / scilab / modules / graphics / help / en_US / 3d_plot / hist3d.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) INRIA - Serge Steer
5  * Copyright (C) ENPC - Jean-Philippe Chancelier
6  *
7  * Copyright (C) 2012 - 2016 - Scilab Enterprises
8  *
9  * This file is hereby licensed under the terms of the GNU GPL v2.0,
10  * pursuant to article 5.3.4 of the CeCILL v.2.1.
11  * This file was originally licensed under the terms of the CeCILL v2.1,
12  * and continues to be available under such terms.
13  * For more information, see the COPYING file which you should have received
14  * along with this program.
15  *
16  -->
17 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
18           xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml"
19           xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
20           xmlns:scilab="http://www.scilab.org"  xml:id="hist3d" xml:lang="en">
21     <refnamediv>
22         <refname>hist3d</refname>
23         <refpurpose>3D representation of a histogram</refpurpose>
24     </refnamediv>
25     <refsynopsisdiv>
26         <title>Syntax</title>
27         <synopsis>hist3d(mtx,[theta,alpha,leg,flag,ebox])
28             hist3d(mtx,&lt;opt_args&gt;)
29             hist3d(list(mtx,x,y),[theta,alpha,leg,flag,ebox])
30             hist3d(list(mtx,x,y),&lt;opt_args&gt;)
31         </synopsis>
32     </refsynopsisdiv>
33     <refsection>
34         <title>Arguments</title>
35         <variablelist>
36             <varlistentry>
37                 <term>mtx</term>
38                 <listitem>
39                     <para>matrix of size <literal>(m,n)</literal> defining the histogram
40                         <literal>mtx(i,j)=F(x(i),y(j))</literal>, where <literal>x</literal>
41                         and <literal>y</literal> are taken as <literal>0:m</literal> and
42                         <literal>0:n</literal>.
43                     </para>
44                 </listitem>
45             </varlistentry>
46             <varlistentry>
47                 <term>list(mtx,x,y)</term>
48                 <listitem>
49                     <para>where <literal>mtx</literal> is a matrix of size <literal>(m,n)</literal> defining the histogram
50                         <literal>mtx(i,j)=F(x(i),y(j))</literal>, with <literal>x</literal>
51                         and <literal>y</literal> vectors of size <literal>(1,m+1)</literal> and <literal>(1,n+1)</literal>.
52                     </para>
53                 </listitem>
54             </varlistentry>
55             <varlistentry>
56                 <term>&lt;opt_args&gt;</term>
57                 <listitem>
58                     <para>
59                         This represents a sequence of statements <literal>key1=value1</literal>,
60                         <literal>key2=value2</literal>,... where <literal>key1</literal>,
61                         <literal>key2,...</literal> can be one of the following: <literal>theta</literal>,
62                         <literal>alpha</literal>, <literal>leg</literal>, <literal>flag</literal>,
63                         <literal>ebox</literal>. See <link linkend="plot3d">plot3d</link>.
64                     </para>
65                 </listitem>
66             </varlistentry>
67             <varlistentry>
68                 <term>theta,alpha,leg,flag,ebox</term>
69                 <listitem>
70                     <para>
71                         see <link linkend="plot3d">plot3d</link>.
72                     </para>
73                 </listitem>
74             </varlistentry>
75         </variablelist>
76     </refsection>
77     <refsection>
78         <title>Description</title>
79         <para>
80             <literal>hist3d</literal> represents a 2d histogram as a 3D plot.
81             The values are associated to the intervals <literal>[x(i) x(i+1)[ X [y(i)
82                 y(i+1)[
83             </literal>
84             .
85         </para>
86         <para>
87             Enter the command <literal>hist3d()</literal> to see a demo.
88         </para>
89     </refsection>
90     <refsection>
91         <title>Examples</title>
92         <programlisting role="example"><![CDATA[
93         hist3d();
94  ]]></programlisting>
95
96         <scilab:image localized="true">hist3d();</scilab:image>
97         <programlisting role="example"><![CDATA[
98 hist3d(10*rand(10,10));
99  ]]></programlisting>
100         <scilab:image>hist3d(10*rand(10,10));</scilab:image>
101         <programlisting role="example"><![CDATA[
102 Z = zeros(100,5);
103 A = abs(rand(40,5));
104 Z(1:40,:) = A;
105 scf();
106 hist3d(Z);
107 isoview off
108  ]]></programlisting>
109         <scilab:image>
110             Z = zeros(100,5);
111             A = abs(rand(40,5));
112             Z(1:40,:) = A;
113             scf();
114             hist3d(Z);
115             isoview off
116         </scilab:image>
117         <programlisting role="example"><![CDATA[
118 Z = zeros(100,5);
119 A = abs(rand(40,5));
120 Z(1:40,:) = A;
121 Index = find(Z==0);
122 Z(Index) = %nan;
123 scf();
124 hist3d(Z);
125 isoview off
126  ]]></programlisting>
127         <scilab:image>
128             Z = zeros(100,5);
129             A = abs(rand(40,5));
130             Z(1:40,:) = A;
131             Index = find(Z==0);
132             Z(Index) = %nan;
133             scf();
134             hist3d(Z);
135             isoview off
136         </scilab:image>
137         <programlisting role="example"><![CDATA[
138 Z = zeros(100,5);
139 A = abs(rand(40,5));
140 Z(1:40,:) = A;
141 A = abs(rand(10,5));
142 Z(91:100,:) = A;
143 scf();
144 hist3d(Z);
145 isoview off
146  ]]></programlisting>
147         <scilab:image>
148             Z = zeros(100,5);
149             A = abs(rand(40,5));
150             Z(1:40,:) = A;
151             A = abs(rand(10,5));
152             Z(91:100,:) = A;
153             scf();
154             hist3d(Z);
155             isoview off
156             gca().rotation_angles = [30 50];
157         </scilab:image>
158     </refsection>
159     <refsection role="see also">
160         <title>See also</title>
161         <simplelist type="inline">
162             <member>
163                 <link linkend="histplot">histplot</link>
164             </member>
165             <member>
166                 <link linkend="plot3d">plot3d</link>
167             </member>
168         </simplelist>
169     </refsection>
170 </refentry>