~gdesklets-desklet-team/gdesklets/0.36

« back to all changes in this revision

Viewing changes to doc/book/dsp-tag-plotter.xml

  • Committer: Robert Pastierovic
  • Date: 2007-10-07 10:08:42 UTC
  • Revision ID: pastierovic@gmail.com-20071007100842-fdvp2vzmqgh1j87k
merged 0.3x branch and basic documentation and some other changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<section id="dsp-tag-plotter" xmlns:xi="http://www.w3.org/2001/XInclude">
 
2
  <title>&lt;plotter&gt;</title>
 
3
 
 
4
  <para>This element is for plotting graphs. It represents a specialized handy
 
5
    frontend for the <link linkend="dsp-tag-canvas">&lt;canvas&gt;</link> by
 
6
    taking value by value.</para>
 
7
 
 
8
  <screenshot>
 
9
    <mediaobject>
 
10
      <imageobject>
 
11
        <imagedata fileref="gfx/dsp-plotter" format="PNG"/>
 
12
      </imageobject>
 
13
    </mediaobject>
 
14
  </screenshot>
 
15
 
 
16
 
 
17
  <section><title>Attributes</title>
 
18
 
 
19
    <informaltable frame="topbot">
 
20
    <tgroup>
 
21
 
 
22
    <thead>
 
23
      <row>
 
24
        <entry>Name</entry>
 
25
        <entry>Type</entry>
 
26
        <entry>Default Value</entry>
 
27
        <entry>Description</entry>
 
28
      </row>
 
29
    </thead>
 
30
 
 
31
    <tbody>
 
32
      <row>
 
33
        <entry valign="top">bg-color</entry>
 
34
        <entry valign="top">color</entry>
 
35
        <entry valign="top"></entry>
 
36
        <entry valign="top">The background color.</entry>
 
37
      </row>
 
38
      <row>
 
39
        <entry valign="top">color</entry>
 
40
        <entry valign="top">color</entry>
 
41
        <entry valign="top">navy</entry>
 
42
        <entry valign="top">The plot color.</entry>
 
43
      </row>
 
44
      <row>
 
45
        <entry valign="top">scale-bidir</entry>
 
46
        <entry valign="top">boolean</entry>
 
47
        <entry valign="top">false</entry>
 
48
        <entry valign="top">Enables scaling of the lower boundary, so negative 
 
49
          values won't 'drop off'.</entry>
 
50
      </row>
 
51
      <row>
 
52
        <entry valign="top">scale-holdmax</entry>
 
53
        <entry valign="top">boolean</entry>
 
54
        <entry valign="top">false</entry>
 
55
        <entry valign="top">Enables a hold-function on the scaling.  When the 
 
56
          scaling is changed because of large values, it will not return to 
 
57
          the default scaling once those large values have disappeared from 
 
58
          the history.</entry>
 
59
      </row>
 
60
      <row>
 
61
        <entry valign="top">size</entry>
 
62
        <entry valign="top">integer</entry>
 
63
        <entry valign="top">50</entry>
 
64
        <entry valign="top">The numbers of values stored in the history.</entry>
 
65
      </row>
 
66
      <row>
 
67
        <entry valign="top">value</entry>
 
68
        <entry valign="top">integer</entry>
 
69
        <entry valign="top"></entry>
 
70
        <entry valign="top">The next value to append to the history of values. 
 
71
          Values may range from <literal>0</literal> to
 
72
          <literal>100</literal>, but if you supply values greater than
 
73
          <literal>100</literal>, the graph will scale accordingly.</entry>
 
74
      </row>
 
75
    </tbody>
 
76
 
 
77
    </tgroup>
 
78
    </informaltable>
 
79
 
 
80
  </section>
 
81
 
 
82
 
 
83
 
 
84
  <section><title>Examples</title>
 
85
 
 
86
    <programlisting><![CDATA[
 
87
<display bg-color="white" anchor="center" x="50%" y="50%">
 
88
 
 
89
  <control id="sys" interface="ISystem:4i4p0jtvdz87qx44x2dm97ltj"/>
 
90
 
 
91
  <plotter width="100" height="100" size="100" id="plotter" color="black"/>
 
92
 
 
93
  <script><![CDATA[
 
94
 
 
95
    def cpu_handler():
 
96
      Dsp.plotter.value = sys.cpu_load
 
97
      return True
 
98
 
 
99
    add_timer(500, cpu_handler)
 
100
 
 
101
  ]]>]]&gt;<![CDATA[</script>
 
102
 
 
103
</display>
 
104
 
 
105
    ]]></programlisting>
 
106
 
 
107
  </section>
 
108
 
 
109
</section>