]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/PloticusPlugin
updates
[SourceForge/phpwiki.git] / pgsrc / PloticusPlugin
1 Date: Wed, 2 Jun 2004 21:09:39 +0200
2 Mime-Version: 1.0 (Produced by PhpWiki 1.3.11pre)
3 X-Rcs-Id: $Id: PloticusPlugin,v 1.3 2004-06-03 22:27:09 rurban Exp $
4 Content-Type: application/x-phpwiki;
5   pagename=PloticusPlugin;
6   pgsrc_version="2 $Revision: 1.3 $";
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 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 !! Usage
19 <verbatim>
20   <?plugin Ploticus device||=png [ploticus options...]
21      multiline ploticus script ...
22   ?>
23 </verbatim>
24
25 !! Plugin Arguments
26 __device__: |
27   Default: png
28 __alt__:  |
29   alt text for the image
30 __-csmap__:  |
31   If a clickable map should be produced (not yet tested)
32 __help__:  |
33   Show a help screen (not yet)
34
35 !! Known Problems
36
37 # For windows you need either a gd library with GIF support or
38   a ploticus with PNG support. This comes only with the cygwin 
39   built pl221win32cygmax.zip.
40 # We support only images supported by GD so far (PNG most likely).
41   No EPS, PS, SVG, SVGZ or SWG support yet due to API limitations in
42   ~WikiPluginCached. No technical problems, so you can expect it soon.
43
44 !! Examples
45
46 <?plugin Ploticus device||=png
47 #proc page
48 #if @DEVICE in gif,png
49   scale: 0.7
50 #endif
51
52 //  specify data using {proc getdata}
53 #proc getdata
54 data:   Brazil 22
55         Columbia 17
56         "Costa Rica" 22
57         Guatemala 3
58         Honduras 12
59         Mexico 14
60         Nicaragua 28
61         Belize 9
62         United\nStates 21
63         Canada 8
64
65 //  render the pie graph using {proc pie}
66 #proc pie
67 firstslice: 90
68 explode: .2 0 0 0 0  .2 0
69 datafield: 2
70 labelfield: 1
71 labelmode: line+label
72 center: 4 4
73 radius: 2
74 colors: yellow pink pink pink pink yellow pink
75 labelfarout: 1.05
76 ?>
77
78 The pie chart above was produced by this code from the ploticus
79 testsuite:
80
81 <verbatim>
82 <?plugin Ploticus device||=png alt="Sample Pie Chart"
83 #proc page
84 #if @DEVICE in gif,png
85   scale: 0.7
86 #endif
87
88 //  specify data using {proc getdata}
89 #proc getdata
90 data:   Brazil 22
91         Columbia 17
92         "Costa Rica" 22
93         Guatemala 3
94         Honduras 12
95         Mexico 14
96         Nicaragua 28
97         Belize 9
98         United\nStates 21
99         Canada 8
100
101 //  render the pie graph using {proc pie}
102 #proc pie
103 firstslice: 90
104 explode: .2 0 0 0 0  .2 0
105 datafield: 2
106 labelfield: 1
107 labelmode: line+label
108 center: 4 4
109 radius: 2
110 colors: yellow pink pink pink pink yellow pink
111 labelfarout: 1.05
112 ?>
113 </verbatim>