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