How to print a graph

Mplot++ does not permit the user to print directly a graph. However,
the user can export the graphs in the form of Postscript(R) documents and
then it can print these documents by using the ordinary tools existing
for this purpose ( like Ghostscript(R) or Ghostview(R) ).
Moreover, with Mplot++ the user can choose if he wants to export a graph
in the form of single-page Postscript document, ready to be printed, or
as an Encapsulated Postscript (EPS) file. In the last form, the graph
may be inserted inside another Postscript document as a figure, for example.
I decided to add this feature to my program because I study Mathematics,
I often use the LaTeX formatting system and if you want to insert a figure
inside a document built by using LaTeX you must do it by supplying
this figure in the form of EPS file. In other words, you must draw this
figure with some program ( like the popular Xfig ) that allows you to save it
as an Encapsulated Postscript document. So, if you are a mathematician now you
know that Mplot++ can help you in your work :) .
When the user of Mplot++ wants to export a graph as a Postscript document
he needs simply to press the button "Export" inside the Visualization
window. After pressing it, a dialog window appears where he can choose
between some options, the first one being that he can export the graph
in the form of single-page Postscript document or in the form of Encapsulated
Postscript document. Moreover, ha can choose if he wants to export the graph
in Color or in Grayscale; this last possibility is very important if you
are using an Unix system where the print is managed by the 'lpr' daemon
and your printer is not supported very well ( may happen that you can
print Postscript documents in Grayscale but not in Color,
as happens to me !! ). At end, if the user chooses to print a single-page
Postscript he may set the format of the paper ( or medium, if you prefer
to say so ) and the orientation, Portrait or Landscape.
Currently, the available medium are A3, A4, B4, Letter and Legal.
The default value for the medium is A3 (!!!) and for the orientation is
Portrait. The button "Ok" must be used to confirm these choices; when this
button is pressed a File Chooser appears and one can choose the name
to give to the document is about to export. A detailed description
of the File Chooser can be found in the precedent section of this guide
( see 'Loading and writing data' ). The button "Cancel" must be used
to cancel the operation of Export and return to the Visualization
window. When Mplot++ exports a graph in the form of Postscript document,
the exportation makes an exact copy of what one sees inside the Canvas of
the Visualization window; just the color can be missed, if the user
has chosen to export in Grayscale. So, if the grid has been turned on
then the grid will appear in the Postscript document too; also the
axes and the further informations that may be added to a plot appear in the
Postscript document of the plot. Moreover, unless the document
is exported in the encapsulated format, Mplot++ adds to the plot

1) a Copyright notice
   
   and (optionally)   

2) the parametric equations of every object appearing in the graph.

These last ones are added if and only if, before visualizing the graph,
the user turns on the "Add info to the plot" radio-button; moreover, the
graph must not result from the loading of a data file.

Be careful !  When I wrote the part of the program related to the
exportation of Postscript documents I sticked to the rules and conventions
fixed by Adobe Corporation for the level 3 of the Postscript. But, after
some controls, I may think that the Postscript files made by Mplot++
are compatible also with the level 2 of the Postscript. So, if you have
a printer that supports the level 2 of the Postscript but you have some
problem in printing the Postscript documents created by my program you
can probably solve those troubles by replacing the first line of every
document:

%!PS-Adobe-3.0

with the line

%!PS-Adobe-2.0

								.

Remember that a Postscript document can be opened and modified by using
any editor, because Postscript files are ASCII files.
I have to tell you 2 last things:

1) If you, while exporting a graph, set the medium to A4 or Letter and the
   orientation to Landscape then, if one of the parametric equations of the
   objects of the graph is too long, this equation will be cut.

2) To export a graph in the form of Postscript(R) document Mplot++ asks
   the user for the path of the file where the graph must be saved. However,
   it does not stick literally to the path given by the user, because Mplot++
   changes the name of the file in a such way it has always the extension
   .ps for a normal Postscript file and the extension .eps for an Encapsulated
   Postscript file. So, if the user gives the path

		"/home/xxx/.../test.txt"
   ( for MS Windows(R) users :  "C:\...\test.txt" )		

	or	"/home/xxx/.../test"
   ( for MS Windows(R) users :  "C:\...\test" )		

   Mplot++ uses, in place of it,

		"/home/xxx/.../test.ps"
   ( for MS Windows(R) users :  "C:\...\test.ps" )		
   for a normal Postscript document


	and 	"/home/xxx/.../test.eps"
   ( for MS Windows(R) users :  "C:\...\test.eps" )		

   in the case of an Encapsulated Postscript document.
   In a similar way, if the path given by the user is, for example,

		"/home/xxx/.../graph.ps"
   ( for MS Windows(R) users :  "C:\...\graph.ps" )		

   but the document he is about to export is in Encapsulated format
   then Mplot++ will save it as

		"/home/xxx/.../graph.eps" !!!
   ( for MS Windows(R) users :  "C:\...\graph.eps" )		

   This behavior must be considered a bug because currently Mplot++ does
   not warn the user when it acts as before.
   Because of this a dummy user can look for a file that does not
   exist ! But you have read this notice, so I am sure that you will find
   always your Postscript documents. ;-)
   Remember this rule !  If you have indicated

	    ".../filename.ext"  or  ".../filename"  
   ( for MS Windows(R) users :  "C:\...\filename.ext" )		

   as the path where the Postscript doc must be saved, then Mplot++
   will use

	    ".../filename.ps"
   ( for MS Windows(R) users :  "C:\...\filename.ps" )		

   for a normal ( = no-encapsulated ) document and

	    ".../filename.eps"
   ( for MS Windows(R) users :  "C:\...\filename.eps" )		

   for an Encapsulated one.
