Diff: Help/PloticusPlugin

Differences between current version and predecessor to the previous major change of Help/PloticusPlugin.

Other diffs: Previous Revision, Previous Author

Newer page: version 6 Last edited on 17 January 2022 3:00 by harold
Older page: version 5 Last edited on 22 December 2011 4:25 by harold Revert
@@ -1,124 +1,109 @@
-The Ploticus WikiPlugin passes all its arguments to the ploticus  
-binary and displays the result as PNG, GIF, EPS, SVG, SVGZ or SWF
+The ** Ploticus** [[Help: WikiPlugin|plugin]] passes all its arguments to the Ploticus  
+binary and displays the result as PNG, GIF, EPS, SVG or SVGZ
 Ploticus is a free, GPL, non-interactive software package 
 for producing plots, charts, and graphics from data. 
 See http://ploticus.sourceforge.net/doc/welcome.html 
  
 Ploticus uses a cache expire date of days. 
  
-! Usage  
-<verbatim>  
- <?plugin Ploticus device||=png [ploticus options...] 
+== Usage ==  
+{{{  
+<< Ploticus device||=png [ploticus options...] 
  multiline ploticus script ... 
- ? >  
-</verbatim
+>>  
+}}}  
  
 or without any script: (not tested) 
  
-<verbatim>  
-<?plugin Ploticus -prefab vbars  
- data=myfile.dat delim=tab y=1  
- clickmapurl="http://mywiki.url/wiki/?pagename=@2"  
- clickmaplabel="@3" -csmap  
-? >  
-</verbatim>  
+{{{  
+<< Ploticus -prefab vbars  
+ data=myfile.dat delim=tab y=1  
+ clickmapurl="http://mywiki.url/wiki/?pagename=@2"  
+ clickmaplabel="@3" -csmap  
+> >  
+}}}  
  
-TODO: PloticusSql - create intermediate data from SQL. Similar to [SqlResult| Help:SqlResultPlugin], 
+TODO: ~ PloticusSql - create intermediate data from SQL. Similar to [[ Help:SqlResultPlugin|SqlResult] ] plugin
 just in graphic form. 
 For example to produce nice looking pagehit statistics or ratings statistics. 
 Ploticus has its own sql support within #getproc data, but this would expose security information. 
  
-! Plugin Arguments  
-__device__: |  
- gif, png, jpeg, svg, svgz, eps, swf. Any -T parameter supported by ploticus. Default: png  
-__data__: |  
- optionally add data by <!plugin-list !> pagelist plugins. See Help:WikiPlugin  
-__alt__: |  
- alt text for the image  
-__-prefab__: |  
- use the given prefab script (may need PLOTICUS_PREFABS)  
-__-csmap__: |  
- If a clickable map should be produced (not yet tested)  
- passed to ploticus as -csmap -mapfile $tempfile.map  
-__help__: |  
- Show a help screen  
+== Arguments ==  
  
-All other arguments are used as source to ploticus
+{| class="bordered"  
+|-  
+! Argument  
+! Description  
+! Default value  
+|-  
+| **device**  
+| gif, png, jpeg, svg, svgz, eps. Any -T parameter supported by Ploticus.  
+| png  
+|-  
+| **data**  
+| optionally add data by <!plugin-list !> pagelist plugins. See [[Help:WikiPlugin]]  
+|  
+|-  
+| **alt**  
+| alt text for the image  
+|  
+|-  
+| **~-prefab**  
+| use the given prefab script (may need PLOTICUS_PREFABS)  
+|  
+|-  
+| **~-csmap**  
+| If a clickable map should be produced (not yet tested) passed to Ploticus as -csmap -mapfile $tempfile .map  
+|  
+|-  
+| **help**  
+| Show a help screen  
+|  
+|}  
  
-! Known Problems  
+All other arguments are used as source to Ploticus.  
  
-# For windows you need either a gd library with GIF support or  
- a ploticus with PNG support. This comes only with the cygwin  
- build so far.  
+== Known Problems ==  
  
-! Optional Configuration 
+For Windows you need either a gd library with GIF support or  
+a Ploticus with PNG support. This comes only with the Cygwin  
+build so far.  
+  
+== Optional Configuration ==  
  
 config.ini: 
- PLOTICUS_EXE = pl.exe (on windows
+ PLOTICUS_EXE = pl.exe (on Windows
  PLOTICUS_EXE = /usr/local/bin/pl (elsewhere) 
  
 prefabs need the environment variable PLOTICUS_PREFABS. Default: /usr/share/ploticus. 
 Maybe also set by the config variable PLOTICUS_PREFABS. 
  
-See also [WikiPluginCached| Help:WikiPluginCached] options in config.ini. 
+See also [[ Help:WikiPluginCached] ] options in config.ini. 
  
-! Examples  
-  
-<?plugin Ploticus device|| =png  
-#proc page  
-#if @DEVICE in gif,png  
- scale: 0.7  
-#endif  
-  
-// specify data using {proc getdata}  
-#proc getdata  
-data: Brazil 22  
- Columbia 17  
- "Costa Rica" 22  
- Guatemala 3  
- Honduras 12  
- Mexico 14  
- Nicaragua 28  
- Belize 9  
- United\nStates 21  
- Canada 8  
-  
-// render the pie graph using {proc pie}  
-#proc pie  
-firstslice: 90  
-explode: .2 0 0 0 0 .2 0  
-datafield: 2  
-labelfield: 1  
-labelmode: line+label  
-center: 4 4  
-radius: 2  
-colors: yellow pink pink pink pink yellow pink  
-labelfarout: 1.05  
-?>  
+== Examples ==  
  
-The pie chart above was produced by this code from the ploticus  
-testsuite
+Sample Pie Chart
  
-<verbatim>  
-<?plugin Ploticus device||=png alt="Sample Pie Chart" 
+{{{  
+<< Ploticus device||=png alt="Sample Pie Chart" 
 #proc page 
 #if @DEVICE in gif,png 
  scale: 0.7 
 #endif 
  
 // specify data using {proc getdata} 
 #proc getdata 
-data: Brazil 22  
- Columbia 17  
- "Costa Rica" 22  
- Guatemala 3  
- Honduras 12  
- Mexico 14  
- Nicaragua 28  
- Belize 9  
- United\nStates 21  
- Canada 8 
+data: Brazil 22  
+ Columbia 17  
+ "Costa Rica" 22  
+ Guatemala 3  
+ Honduras 12  
+ Mexico 14  
+ Nicaragua 28  
+ Belize 9  
+ United\nStates 21  
+ Canada 8 
  
 // render the pie graph using {proc pie} 
 #proc pie 
 firstslice: 90 
@@ -129,15 +114,17 @@
 center: 4 4 
 radius: 2 
 colors: yellow pink pink pink pink yellow pink 
 labelfarout: 1.05 
-? >  
-</verbatim
+>>  
+}}}  
  
+== Author ==  
+* [[Help:Reini Urban|Reini Urban]]  
  
-! Author  
-PhpWiki :ReiniUrban  
+== See Also ==  
+* [[Help :GraphVizPlugin]]  
  
-! See Also  
-Help:GraphVizPlugin  
+<noinclude>  
 ---- 
-PhpWikiDocumentation Help:WikiPlugin  
+[[ PhpWikiDocumentation]] [[CategoryWikiPlugin]]  
+</noinclude>  

current version

The Ploticus plugin passes all its arguments to the Ploticus binary and displays the result as PNG, GIF, EPS, SVG or SVGZ. Ploticus is a free, GPL, non-interactive software package for producing plots, charts, and graphics from data. See http://ploticus.sourceforge.net/doc/welcome.html

Ploticus uses a cache expire date of days.

Usage

<<Ploticus device||=png [ploticus options...]
     multiline ploticus script ...
>>

or without any script: (not tested)

<<Ploticus -prefab vbars
        data=myfile.dat delim=tab y=1
        clickmapurl="http://mywiki.url/wiki/?pagename=@2"
        clickmaplabel="@3" -csmap
>>

TODO: PloticusSql - create intermediate data from SQL. Similar to SqlResult plugin, just in graphic form. For example to produce nice looking pagehit statistics or ratings statistics. Ploticus has its own sql support within #getproc data, but this would expose security information.

Arguments

Argument

Description

Default value

device

gif, png, jpeg, svg, svgz, eps. Any -T parameter supported by Ploticus.

png

data

optionally add data by <!plugin-list !> pagelist plugins. See Help:WikiPlugin

alt

alt text for the image

-prefab

use the given prefab script (may need PLOTICUS_PREFABS)

-csmap

If a clickable map should be produced (not yet tested) passed to Ploticus as -csmap -mapfile $tempfile.map

help

Show a help screen

All other arguments are used as source to Ploticus.

Known Problems

For Windows you need either a gd library with GIF support or a Ploticus with PNG support. This comes only with the Cygwin build so far.

Optional Configuration

config.ini
PLOTICUS_EXE = pl.exe (on Windows) PLOTICUS_EXE = /usr/local/bin/pl (elsewhere)

prefabs need the environment variable PLOTICUS_PREFABS. Default: /usr/share/ploticus. Maybe also set by the config variable PLOTICUS_PREFABS.

See also Help:WikiPluginCached options in config.ini.

Examples

Sample Pie Chart:

<<Ploticus device||=png alt="Sample Pie Chart"
#proc page
#if @DEVICE in gif,png
  scale: 0.7
#endif

//  specify data using {proc getdata}
#proc getdata
data:   Brazil 22
        Columbia 17
        "Costa Rica" 22
        Guatemala 3
        Honduras 12
        Mexico 14
        Nicaragua 28
        Belize 9
         United\nStates 21
        Canada 8

//  render the pie graph using {proc pie}
#proc pie
firstslice: 90
explode: .2 0 0 0 0  .2 0
datafield: 2
labelfield: 1
labelmode: line+label
center: 4 4
radius: 2
colors: yellow pink pink pink pink yellow pink
labelfarout: 1.05
>>

Author

See Also