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