|
On-the-fly graph generation is useful for dynamic content web sites and automatic report generation. Ploticus is suitable for these situations since it is a non-interactive command line tool with a relatively small code size.
Prefabs may be used, or your plots can be script-based. With scripts, variables
are often passed in via the command line. It is also possible to have your
program build a ploticus script on the fly, but as this can get fairly convoluted
it is recommended only when the necessary flexibility cannot be gotten from
passing in variables, embedded #if / #else, etc.
Invoking pl via the shellThis is appropriate if you are using a dynamic web content system such as PHP, or invoking pl via cron or some other automatic command issuer. Generally the procedure is:
Direct CGI mode
Another option for producing dynamic web content is to invoke ploticus in
direct cgi mode.
Within an <img> tag, specify a URL that invokes ploticus
with the desired parameters.
Advantages over shell mode:
you do not need to be running within a dynamic content system (eg. PHP),
and shell overhead and temp file I/O are avoided. Disadvantages: since
pl is directly invoked as a CGI there are security issues that must be fully
understood by the programmer.
From within perl, python, PHP, java, etc.
I currently know of no interfaces that allow ploticus to be called
within these environments. Invocation via the shell is recommended.
|
![]() data display engine Copyright Steve Grubb ![]() |