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