]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FPloticusPlugin
Update PHP Doc
[SourceForge/phpwiki.git] / pgsrc / Help%2FPloticusPlugin
1 Date: Fri,  7 Dec 2012 14:58:45 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0)
3 Content-Type: application/x-phpwiki;
4   pagename=Help%2FPloticusPlugin;
5   flags=PAGE_LOCKED;
6   charset=UTF-8
7 Content-Transfer-Encoding: binary
8
9 The **Ploticus** [[Help:WikiPlugin|plugin]] passes all its arguments to the Ploticus
10 binary and displays the result as PNG, GIF, EPS, SVG, SVGZ or SWF.
11 Ploticus is a free, GPL, non-interactive software package
12 for producing plots, charts, and graphics from data.
13 See http://ploticus.sourceforge.net/doc/welcome.html
14
15 Ploticus uses a cache expire date of days.
16
17 == Usage ==
18 {{{
19 <<Ploticus device||=png [ploticus options...]
20      multiline ploticus script ...
21 >>
22 }}}
23
24 or without any script: (not tested)
25
26 {{{
27 <<Ploticus -prefab vbars
28         data=myfile.dat delim=tab y=1
29         clickmapurl="http://mywiki.url/wiki/?pagename=@2"
30         clickmaplabel="@3" -csmap
31 >>
32 }}}
33
34 TODO: ~PloticusSql - create intermediate data from SQL. Similar to [[Help:SqlResultPlugin|SqlResult]] plugin,
35 just in graphic form.
36 For example to produce nice looking pagehit statistics or ratings statistics.
37 Ploticus has its own sql support within #getproc data, but this would expose security information.
38
39 == Arguments ==
40
41 {| class="bordered"
42 |-
43 ! Argument
44 ! Description
45 ! Default value
46 |-
47 | **device**
48 | gif, png, jpeg, svg, svgz, eps, swf. Any -T parameter supported by Ploticus.
49 | png
50 |-
51 | **data**
52 | optionally add data by <!plugin-list !> pagelist plugins.  See [[Help:WikiPlugin]]
53 |
54 |-
55 | **alt**
56 | alt text for the image
57 |
58 |-
59 | **~-prefab**
60 | use the given prefab script (may need PLOTICUS_PREFABS)
61 |
62 |-
63 | **~-csmap**
64 | If a clickable map should be produced (not yet tested) passed to Ploticus as -csmap -mapfile $tempfile.map
65 |
66 |-
67 | **help**
68 | Show a help screen
69 |
70 |}
71
72 All other arguments are used as source to Ploticus.
73
74 == Known Problems ==
75
76 For Windows you need either a gd library with GIF support or
77 a Ploticus with PNG support. This comes only with the Cygwin
78 build so far.
79
80 == Optional Configuration ==
81
82 config.ini:
83   PLOTICUS_EXE = pl.exe (on Windows)
84   PLOTICUS_EXE = /usr/local/bin/pl (elsewhere)
85
86 prefabs need the environment variable PLOTICUS_PREFABS. Default: /usr/share/ploticus.
87 Maybe also set by the config variable PLOTICUS_PREFABS.
88
89 See also [[Help:WikiPluginCached]] options in config.ini.
90
91 == Examples ==
92
93 <<Ploticus device||=png
94 #proc page
95 #if @DEVICE in gif,png
96   scale: 0.7
97 #endif
98
99 //  specify data using {proc getdata}
100 #proc getdata
101 data:   Brazil 22
102         Columbia 17
103         "Costa Rica" 22
104         Guatemala 3
105         Honduras 12
106         Mexico 14
107         Nicaragua 28
108         Belize 9
109          United\nStates 21
110         Canada 8
111
112 //  render the pie graph using {proc pie}
113 #proc pie
114 firstslice: 90
115 explode: .2 0 0 0 0  .2 0
116 datafield: 2
117 labelfield: 1
118 labelmode: line+label
119 center: 4 4
120 radius: 2
121 colors: yellow pink pink pink pink yellow pink
122 labelfarout: 1.05
123 >>
124
125 The pie chart above was produced by this code from the Ploticus
126 testsuite:
127
128 {{{
129 <<Ploticus device||=png alt="Sample Pie Chart"
130 #proc page
131 #if @DEVICE in gif,png
132   scale: 0.7
133 #endif
134
135 //  specify data using {proc getdata}
136 #proc getdata
137 data:   Brazil 22
138         Columbia 17
139         "Costa Rica" 22
140         Guatemala 3
141         Honduras 12
142         Mexico 14
143         Nicaragua 28
144         Belize 9
145          United\nStates 21
146         Canada 8
147
148 //  render the pie graph using {proc pie}
149 #proc pie
150 firstslice: 90
151 explode: .2 0 0 0 0  .2 0
152 datafield: 2
153 labelfield: 1
154 labelmode: line+label
155 center: 4 4
156 radius: 2
157 colors: yellow pink pink pink pink yellow pink
158 labelfarout: 1.05
159 >>
160 }}}
161
162 == Author ==
163 * [[Help:Reini Urban|Reini Urban]]
164
165 == See Also ==
166 * [[Help:GraphVizPlugin]]
167
168 <noinclude>
169 ----
170 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
171 </noinclude>