# 1.4 Importing MATLAB Graphs into Word Processors

This Technical Note contains instructions on how to import MATLAB graphics into the following word processors and related products:

  Microsoft Word (Mac and PC)
  Scientific Word
  PowerPoint
  Corel Draw
  FrameMaker
  Word Perfect

There are eight possible postscript formats to which you can save MATLAB graphics. They are discussed under print in the MATLAB 4.0 Reference Guide and also when you enter help print at the MATLAB prompt.

The first four are regular postscript. Do not use these for importing graphics into a word processor. These formats are meant to be used to create postscript files that will be dumped directly to a postscript printer.

Importing MATLAB Graphs from UNIX into PC MS Word

- Create the graph in MATLAB and save using the print -deps filename command. If you're doing this on a UNIX based system, make sure your filename is a maximum of eight (8) characters.
- Use the unix2dos command at the UNIX prompt to create a DOS compatible file.
- Transfer the file to the PC.
- Invoke Microsoft Word.
- Under the Insert menu, select Frame if you want to place the picture somewhere other than right at the margin. Use the mouse to click and drag a box area for the picture.
- Under the Insert menu, select Picture, and select the eps file.

Importing MATLAB Graphs from UNIX into Mac MS Word

- Generate the plot in MATLAB and use print -deps filename to generate the encapsulated postscript file.
- Transfer the file to the Macintosh via ftp. ftp must be set for an ASCII transfer. To do this, type ascii at the ftp prompt.
- Use the Frame icon from the Ruler menu (the box with the triangle, square, and circle). Inside the pop-up window select the box icon to draw a box. Create the desired size frame and close the window.
- Select that frame box you just created.
- Under the Insert menu, select Picture, and select the eps file.

Importing MATLAB Graphs into Scientific Word

- Create an eps file on any platform.
- Go to File in Scientific Word and select Import Picture.
- Select Eps.

  NOTE: You cannot control the size of the figure in Scientific Word.

Importing MATLAB Graphs into PowerPoint on the Mac

- Create an epsi file on any platform.
- Translate this file using the application epsi2pict. To obtain a copy of epsi2pict, ftp to ftp.mathworks.com, log in as anonymous, enter your email address as the password, and change directories to /pub/tech-support/EPSI2PICT.
- Use the Import Picture option under the Edit menu in PowerPoint. NOTE: You will see a blank box if the file was produced by MATLAB v4.1 for the Macintosh, or a box which contains a number of lines if generated with a UNIX version of MATLAB. Both should print correctly.

  NOTE: This was tested in PowerPoint v3.0 for the Macintosh.

Importing MATLAB Graphs into Corel Draw

  Meta files and pcx files import into Corel Draw. However, the graph appears to be in black and white until you make the picture full screen.

Importing MATLAB Graphs into FrameMaker

- The -deps option in MATLAB makes a level 1 black and white postscript file. This is the most versatile of the four choices. When imported into FrameMaker, this type of file may show up as a black box, but it prints correctly.

  NOTE: The graphic image is probably going to be too large to show up in any anchored frame or to fit on most printed pages. You will need to scale it to about 45% to make its borders show inside the anchored frame and for the entire graph to show up on the printed page.

- To scale the graph, select it by clicking on the middle of the anchored frame.
- Select the Scale option on the Graphics menu in FrameMaker.
- Enter 45% for the scale factor, and click OK.

Importing MATLAB Graphs into Word Perfect

- Save the MATLAB graph in either an eps or a pcx file.
- Go to Word Perfect and Select Figure.
- Select Retrieve and then choose the filename.

(c) Copyright 1994 by The MathWorks, Inc.