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