|
|
Using DATAPLOT with the Web
Web Applications Increasingly Important
|
Incorporating applications into the web is becoming
increasingly important. There are several approaches to
doing this, which will be discussed in the context of
Dataplot. The approaches discussed are:
Dataplot is not currently available as a browser plug-in
and there are no current plans to do this.
|
|
1. Generating Dataplot Output for Web Applications
|
Output Can Be Either Text or Graphics
|
The most basic use of Dataplot in web applications is
the insertion of Dataplot output into web pages. The
Dataplot output can consist of
|
Graphics Output
|
The most common file formats for graphics in web browsers
are:
|
All versions of Dataplot can generate SVG output. Dataplot supports GIF, JPEG, and PNG using the GD library. This may not be available on some Dataplot installations. Most browsers can display graphs in PDF format (some require an appropriate plug-in to be installed). You can use ghostscript/ghostview to convert Dataplot Postscript output to PDF. You can also use the open source GIMP program to convert Dataplot Postscript/PDF output to one of the bit-mapped formats.
Text Output
|
The CAPTURE command
supports the ability to generate Dataplot output in HTML format:
|
Note that an additional feature of the HTML option is that if DEVICE 2 is set to either PNG/JPEG or SVG, the graphics will be incorporated into the web page using the IMG tag. You can use the WEB command to view the generated HTML output from within the Dataplot session. For example, SKIP 25 READ RIPKEN.DAT Y X1 X2 ECHO ON CAPTURE HTML C:\TABLE.HTM TABULATE MEAN Y X1 CROSS TABULATE MEAN Y X1 X2 END OF CAPTURE WEB file://C:\TABLE.HTMThe following example shows how to incorporate SVG graphics into the web page. device 1 x11 . skip 25 read berger1.dat y x . line blank solid character x blank echo on capture html fit.htm set ipl1na data.svg device 2 svg title original data plot y x device 2 close fit y x set ipl1na pred.svg device 2 svg title predicted line plot y pred vs x device 2 close end of capture . web file:///home/heckert/dataplot/fit.htmNOTE: The following enhancements were made to the CAPTURE HTML command in the 1/2003 version of Dataplot.
|
2. Integration of Dataplot with the NIST/SEMATECH
Engineering Statistics Handbook
|
Engineering Statistics Handbook
|
Dataplot has been integrated with the
NIST/SEMATECH Engineering Statistics Handbook.
The Handbook is a web based statistics handbook that
has a number of case studies which can be run
using Dataplot directly from the web pages.
|
Steps in Executing Dataplot Macro When Invoked from Web
|
When a Dataplot macro is invoked from the case study
web page, the following steps occur.
|
This approach makes it possible to execute macros successively. This is quite useful in the context of the Handbook case studies. That is, the user can step through the case study in small, easily understood steps. NOTE: Due to changes in the NIST web servers and in NIST web security procedures, this capability is currently not active.
Advantages and Disadvantages of Approach
|
The advantages of this method are:
|
The primary disadvantage of this method is that Dataplot needs to be installed on the user's local platform.
Two Basic Steps
|
There are two basic steps in implementing this method.
|
Approach Useful for Tutorial Applications
|
If you only need to run a single macro, you can simplify
the above steps to run the command line version of
Dataplot as well.
|
In general, this approach is useful for tutorial type web pages. That is, you want to teach your audience how to perform a particular analysis using Dataplot.
|
3. Using Dataplot with CGI Scripts
|
Basic Approach
|
You can install Dataplot on a server computer. An HTML form
page will typically prompt the user for certain inputs.
Once the form is submitted, a CGI script will run Dataplot
on the server computer and then return either a graph or
Dataplot output to the web page.
|
CGI scripts are most commonly written in Perl, although they can also be written in C or other scripting or programming languages. We do not document the details of implementing this since there are many books on writing CGI scripts available. See https://www-s.nist.gov/loda/index.html for an example of this approach. The CGI approach can be used with many different programs. There are no particular issues that you need to be aware of when using Dataplot this way. The fact that you can write command driven macros in ASCII files means that Dataplot is well suited for this approach.
Advantages and Disadvantages of the CGI Approach
|
The advantage of this method is:
|
The disadvantage of this method is:
This approach is useful if you simply want to use Dataplot as a computation engine or to generate a specific type of plot dynamically. In this case, the end user may or may not care whether or not Dataplot was used for the computation.
Active Server Pages (ASP)
|
In a "web based computing" project in the NIST Statistical
Engineering Division, we have used Active Server Pages to invoke
Dataplot.
|
This is a similar idea to CGI scripts. Basically, you have a web form that accepts certain parameters. Then ASP and VBSCRIPT are used to generate a Dataplot macro on the fly and Dataplot is invoked to run the macro and return the results to a web page. If you would like more information about this approach, contact Alan Heckert. Note: The project using ASP was quite some time ago. I no longer have the files using this approach.
|
4. Robert Lipman's Web Dataplot
|
Web Dataplot can be Adapted for Local Applications
|
Robert Lipman, currently of the NIST Building and Fire
Research Laboratory, has written "Web Dataplot". This is
a CGI script written in Tcl/CGI. We used to provide this
to run a live Dataplot session from these web pages. We
have removed it from the public web pages for firewall
considerations. Internal users can still run
web Dataplot. External users who would like to adapt
this for use on their own sites should contact alan.heckert@nist.gov
for more information.
|
One possible application of the web Dataplot software would be as an online "problem solver". That is, if your site has a specific set of problems with a standard solution, you could modify the web Dataplot scripts to create forms and run macros that solve these particular problems. NOTE: This approach is not currently being supported.
|
5. Downloading Files for Using Dataplot with the Web
|
Downloadable Scripts Provide a Framework, Not A Finished
Solution
|
If you are interested in using Dataplot in a web application,
we have included links to appropriate software to help.
|
Note that you will need to modify the source provided to fit your own application. These sources are provided as a basic framework for developing your own web applications using Dataplot, not as ready to use scripts. This source is provided "asis" and we do not offer any additional support for them. If you want to adapt these to your own applications, you should have some basic web development experience (you should not need a lot, but should have a handle on the basic concepts).
Date created: 06/05/2001 |
Last updated: 02/13/2023 Please email comments on this WWW page to alan.heckert@nist.gov. |