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