~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/eng/graphics/colorbar.xml

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> 
 
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
 
3
<MAN>
 
4
  <LANGUAGE>eng</LANGUAGE>
 
5
  <TITLE>colorbar</TITLE>
 
6
  <TYPE>Scilab Function</TYPE>
 
7
  <DATE>March 2004</DATE>
 
8
  <SHORT_DESCRIPTION name="colorbar">draw a colorbar</SHORT_DESCRIPTION>
 
9
 
 
10
  <CALLING_SEQUENCE>
 
11
  <CALLING_SEQUENCE_ITEM>colorbar(umin, umax [, colminmax])</CALLING_SEQUENCE_ITEM>
 
12
  </CALLING_SEQUENCE>
 
13
 
 
14
  <PARAM>
 
15
    <PARAM_INDENT>
 
16
     <PARAM_ITEM>
 
17
        <PARAM_NAME>umin</PARAM_NAME>
 
18
        <PARAM_DESCRIPTION>
 
19
         <SP>: real scalar, the minimum value associated with the plot</SP>
 
20
        </PARAM_DESCRIPTION> 
 
21
     </PARAM_ITEM>
 
22
     <PARAM_ITEM>
 
23
        <PARAM_NAME>umax</PARAM_NAME>
 
24
        <PARAM_DESCRIPTION>
 
25
         <SP>: real scalar, the maximum value associated with the plot</SP>
 
26
        </PARAM_DESCRIPTION> 
 
27
     </PARAM_ITEM>
 
28
     <PARAM_ITEM>
 
29
        <PARAM_NAME>colminmax</PARAM_NAME>
 
30
        <PARAM_DESCRIPTION>
 
31
         <SP>: (optional) a vector with 2 integer components</SP>
 
32
        </PARAM_DESCRIPTION> 
 
33
     </PARAM_ITEM>
 
34
   </PARAM_INDENT>
 
35
  </PARAM>
 
36
  
 
37
  <DESCRIPTION>
 
38
    <P>
 
39
     Draw a colorbar for a plot3d, fec, Sgrayplot, etc... The function may be called
 
40
     <BD>BEFORE</BD> the plot3d, fec, Sgrayplot,... because its sets and changes the
 
41
     frame for the plot. This way the colorbar is not part of the associated plot and 
 
42
     so is not modified by a zoom or a rotation.
 
43
    </P>
 
44
    <P>
 
45
     The optional argument <VERB>colminmax</VERB> may be used to precise the first color
 
46
     (associated with umin) and the the last color (associated with umax) of the current 
 
47
     colormap. By default <VERB>colminmax=[1 nb_colors]</VERB> where nb_colors is the 
 
48
     number of colors of the current colormap.
 
49
    </P>
 
50
    </DESCRIPTION>
 
51
 
 
52
  <EXAMPLE><![CDATA[
 
53
// example 1
 
54
x = linspace(0,1,81);
 
55
z = cos(2*%pi*x)'*sin(2*%pi*x);
 
56
zm = min(z); zM = max(z);
 
57
xbasc()
 
58
xset("colormap",jetcolormap(64))
 
59
colorbar(zm,zM)
 
60
Sgrayplot(x,x,z)
 
61
xtitle("The function cos(2 pi x)sin(2 pi y)")
 
62
 
 
63
// example 2 
 
64
x = linspace(0,1,81);
 
65
z = cos(2*%pi*x)'*sin(2*%pi*x);
 
66
zm = min(z); zM = max(z);
 
67
zz = abs(0.5*cos(2*%pi*x)'*cos(2*%pi*x));
 
68
zzm = min(zz); zzM = max(zz);
 
69
xbasc();
 
70
xset("colormap",jetcolormap(64))
 
71
subplot(2,2,1)
 
72
   colorbar(zm,zM)
 
73
   Sgrayplot(x,x,z, strf="031", rect=[0 0 1 1])
 
74
   xtitle("a Sgrayplot with a colorbar")
 
75
subplot(2,2,2)
 
76
   colorbar(zm,zM)
 
77
   plot3d1(x,x,z)
 
78
   xtitle("a plot3d1 with a colorbar")
 
79
subplot(2,2,3)
 
80
   colorbar(zzm,zzM)
 
81
   plot3d1(x,x,zz)
 
82
   xtitle("a plot3d1 with a colorbar")
 
83
subplot(2,2,4)
 
84
   colorbar(zzm,zzM)
 
85
   Sgrayplot(x,x,zz, strf="031", rect=[0 0 1 1])
 
86
   xtitle("a Sgrayplot with a colorbar")
 
87
 
 
88
// example 3
 
89
x = linspace(0,1,81);
 
90
zz = abs(0.5*cos(2*%pi*x)'*cos(2*%pi*x));
 
91
zzm = min(zz); zzM = max(zz);
 
92
[xf,yf,zf]=genfac3d(x,x,zz);
 
93
nb_col = 64;
 
94
xbasc()
 
95
xset("colormap",hotcolormap(nb_col))
 
96
colorbar(zzm,zzM)
 
97
nbcol = xget("lastpattern")
 
98
zcol = dsearch(zf, linspace(zzm, zzM, nb_col+1));
 
99
plot3d(xf, yf, list(zf, zcol), flag = [-2 6 4])
 
100
xtitle("a plot3d with shaded interpolated colors")
 
101
xselect()
 
102
 ]]></EXAMPLE>
 
103
 
 
104
  <SEE_ALSO>
 
105
    <SEE_ALSO_ITEM>
 
106
      <LINK>colormap</LINK>
 
107
    </SEE_ALSO_ITEM>
 
108
  </SEE_ALSO>
 
109
 
 
110
  <AUTHOR>
 
111
     B. Pincon
 
112
  </AUTHOR>
 
113
 
 
114
</MAN>
 
115