Export of the figure

Previous Next

Menu item File export will allow you to export the figure under various formats.




Menu item File - export with unity in PNG file will allow the user to save the figure in a special PNG file, by specifying a lenth in centimeters for the unity length of the figure.

Once this file incorporated in a text editing software, the figure will have exactly the size desired (if the size is not to big to  fit in the document page).


Complementary information about exporting the figure in a dynamic web page using only JavaScript (html 5) :


The graphical output takes place in a  SVG (vectorial graph).

Using Microsoft explorer is as possible to be avoided to visualize this output (bad implementation of clipping).

When exporting in pure html 5 with MathGraph32, you wil see such a code in the function go() :

var st = "Base 64 code of the figure";

mtg32App.addDoc("svg", st);

The first parameter "svg" of the second line is a reference to the SVG defined at the bottom of the page, with Id "svg".

If you want to include two figures in the same html page, you have to create in the page another SVG with, for instance,  "svg2" for Id (this SVG must be included in a DIV section), then you must add two other lines in function go() following the two preceeding ones :

st = "Base 64 code of the second figure";

mtg32App.addDoc("svg2", st);


You can, of course, insert more than two figures in the same html page.


To get the base 64 code of a figure, you have to open this figure with MathGraph32, then use menu item "Edit - Copy figure code (for html)". The code of the figue is then inserted in the clipboard and then may be inserted in the html page after st =between the double quotes.


Complementary information about exporting the figure in a dynamic web page using an applet:


When using menu item File - Export to - Dynamic web page (html), a dialog box pops up.


In the upper part of the dialog box, you can enter a title for the page, the author name and the dimensions in pixels for the figure (Applet).


In the lower part of the dialog box :



If you select checkbox Include Jar file in export, the jar file of the applet will be exported in the same directory as the html file (recommended for local use, not connected to the internet).

If you don't select checkbox Include Jar file in export, the jar file will not be included in the export and the applet will be called on-line.


Then a file save dialog box will appear to choose the directory in which the export will take place.

Once the file saved, if your computer allows it, your default web browser will be launched with the html file generated.


Two  different kinds of export are available :


Created with the Personal Edition of HelpNDoc: Easily create CHM Help documents