Translating graphical output to LATEX: graph2tex graph3d2tex

### 3.7.3 Translating graphical output to LATEX: graph2tex graph3d2tex

You can see all of your graphic output at once on the DispG screen, which you can bring up with the command DispG(). (This screen can be cleared with the command line command erase().) On the DispG screen there will be a Print menu; the Print▸latex print will give you several in files DispG.tex, DispG.ps, DispG.ps and DispG.png with the graphics in different formats. To save it without using the DispG() command you can use the graph2tex command, which will save all graphic output to a LATEX file of your choosing. For example, to save your graphs to myfile.tex, you can enter the command

graph2tex("myfile.tex")

to get a LATEX file myfile.tex with the graphs. To save a three-dimensional graph, you can use the command graph3d2tex.

To save a single graph as a LATEX file, you can use the M menu to the right of the graph. Selecting M▸Export Print▸Print (LaTeX) will save the current graph. You can also save a single graph by selecting that level, then use the menu item File▸LaTeX▸LaTeX print selection. This method will save the graph in several formats; session0.tex, session0.dvi, session0.ps and session0.png, or with session0 replaced by the session name.