]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FPloticusPlugin
Harmonize documentation
[SourceForge/phpwiki.git] / pgsrc / Help%2FPloticusPlugin
1 Date: Wed, 28 May 2008 19:06:04 +0200
2 Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124)
3 Content-Type: application/x-phpwiki;
4   pagename=Help%2FPloticusPlugin;
5   flags="";
6   markup=2;
7   charset=iso-8859-1
8 Content-Transfer-Encoding: binary
9
10 The Ploticus WikiPlugin 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 <verbatim>
20   <?plugin Ploticus device||=png [ploticus options...]
21      multiline ploticus script ...
22   ?>
23 </verbatim>
24
25 or without any script: (not tested)
26
27 <verbatim>
28 <?plugin 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 </verbatim>
34
35 TODO: PloticusSql - create intermediate data from SQL. Similar to [SqlResult|Help:SqlResultPlugin],
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 ! Plugin Arguments
41 __device__: |
42   gif, png, jpeg, svg, svgz, eps, swf. Any -T parameter supported by ploticus. Default: png
43 __data__:  |
44   optionally add data by <!plugin-list !> pagelist plugins.  See [WikiPlugin|Help:WikiPlugin]
45 __alt__:  |
46   alt text for the image
47 __-prefab__:  |
48   use the given prefab script (may need PLOTICUS_PREFABS)
49 __-csmap__:  |
50   If a clickable map should be produced (not yet tested)
51   passed to ploticus as -csmap -mapfile $tempfile.map
52 __help__:  |
53   Show a help screen
54
55 All other arguments are used as source to ploticus.
56
57 ! Known Problems
58
59 # For windows you need either a gd library with GIF support or
60   a ploticus with PNG support. This comes only with the cygwin
61   build so far.
62
63 ! Optional Configuration
64
65 config.ini:
66   PLOTICUS_EXE = pl.exe (on windows)
67   PLOTICUS_EXE = /usr/local/bin/pl (elsewhere)
68
69 prefabs need the environment variable PLOTICUS_PREFABS. Default: /usr/share/ploticus.
70 Maybe also set by the config variable PLOTICUS_PREFABS.
71
72 See also [WikiPluginCached|Help:WikiPluginCached] options in config.ini.
73
74 !!! Examples
75
76 <?plugin Ploticus device||=png
77 #proc page
78 #if @DEVICE in gif,png
79   scale: 0.7
80 #endif
81
82 //  specify data using {proc getdata}
83 #proc getdata
84 data:   Brazil 22
85         Columbia 17
86         "Costa Rica" 22
87         Guatemala 3
88         Honduras 12
89         Mexico 14
90         Nicaragua 28
91         Belize 9
92         United\nStates 21
93         Canada 8
94
95 //  render the pie graph using {proc pie}
96 #proc pie
97 firstslice: 90
98 explode: .2 0 0 0 0  .2 0
99 datafield: 2
100 labelfield: 1
101 labelmode: line+label
102 center: 4 4
103 radius: 2
104 colors: yellow pink pink pink pink yellow pink
105 labelfarout: 1.05
106 ?>
107
108 The pie chart above was produced by this code from the ploticus
109 testsuite:
110
111 <verbatim>
112 <?plugin Ploticus device||=png alt="Sample Pie Chart"
113 #proc page
114 #if @DEVICE in gif,png
115   scale: 0.7
116 #endif
117
118 //  specify data using {proc getdata}
119 #proc getdata
120 data:   Brazil 22
121         Columbia 17
122         "Costa Rica" 22
123         Guatemala 3
124         Honduras 12
125         Mexico 14
126         Nicaragua 28
127         Belize 9
128         United\nStates 21
129         Canada 8
130
131 //  render the pie graph using {proc pie}
132 #proc pie
133 firstslice: 90
134 explode: .2 0 0 0 0  .2 0
135 datafield: 2
136 labelfield: 1
137 labelmode: line+label
138 center: 4 4
139 radius: 2
140 colors: yellow pink pink pink pink yellow pink
141 labelfarout: 1.05
142 ?>
143 </verbatim>
144
145
146 !!! Author
147 [Reini Urban|PhpWiki:ReiniUrban]
148
149 !!! See Also
150 Help:GraphVizPlugin
151 ----
152 [PhpWikiDocumentation] [WikiPlugin|Help:WikiPlugin]