[VCLab-Main] [Software] [MATLAB Graphics Plugin]
| The MATLAB Graphics Plugin performs communications with the MATLAB graphics windows. It provides mechanisms to map MATLAB graphics or graphic metafiles to the plugin window. |
Embedding
---- Keys and Parameters
Methods ---- Examples
The MATLAB Graphics Plugin is a functional extension of the basic MATLAB Plugin. A page with an embedded MATLAB Graphics Plugin needs the MATLAB Plugin to issue MATLAB commands. A Java class with a set of methods for MATLAB graphics execution on the page is available.

Understanding the plugin graphic mechanism which makes heavy use of the clipboard facilities, the details will be explained using the functional diagram above. For getting a MATLAB graphic into the browser window the graphic is created as usual through MATLAB plot commands. This may be performed on the page in using the MATLAB Plugin methods mEvalString or mEvalMFile. The graphic generated in this way must be copied with the print -dmeta command to the clipboard. From there, it will be transferred to the Graphics Plugin window by the showClipBoard method. These steps need not to be done separately. The showClipBoard method includes additional functionalities in combining all these steps into one method.
The graphic mapped to the plugin window needs not to come only from the clipboard. The plugin supports graphic stored in the extended metafile format, which will be loaded from URL or file by the showEmf method.
The Plugin consists of the dynamic link library NPShowClpBrd.dll and the Java class ClpBrdPlugin.class, which both reside in the browser plugin directory. This plugin is compatible with MATLAB 4 and MATLAB 5. The software is installed with the VCLab installer, as shown in the installation guide.
The standard plugin configuration is to specify the MIME-type of the plugin. This is performed by the TYPE key
<EMBED
TYPE="image/x-emf"
WIDTH=400 HEIGHT=350
NAME="name">
This enables the browser to load this plugin. There is no way at least so far to specify a plugin by its name. The MATLAB graphics output will be mapped to the plugin window, for which the size by HEIGHT and WIDTH is given. The mapping itself will be perfomed by the Java methods.
The plugin can be embedded such that at start time a given metafile graphic can be displayed in the plugin window. Embedding by
<EMBED
SRC="file.emf" WIDTH=400
HEIGHT=350 NAME="name">
will load the extended metafile file.emf specified by the SRC key and the graphic will be displayed in the plugin window.
The mapping of the graphic from the clipboard or metafile will be performed such that the entire graphic is visible. Thus, the aspect ratio may change. The programmer is responsible to specify the appropriate HEIGHT and WIDTH parameters for having no distorted mapping.
The plugin provides public Java methods that can be called from Java applets or JavaScript. This allows to implement dynamical actions.
[VCLab-Main] [Software] [MATLAB Graphics Plugin]