Copying Matlab Graphs Onto Word

Embed Size (px)

Citation preview

  • 8/2/2019 Copying Matlab Graphs Onto Word

    1/9

    How to place a Matlab graph into Microsoft Word 1

    Jeffrey Donnell

    The Woodruff School of Mechanical Engineering

    HOW PLACE A MATLAB GRAPH

    INTO

    MICROSOFT WORD

    Jeffrey DonnellThe George W. Woodruff School of Mechanical Engineering

    The Georgia Institute of TechnologyAtlanta, GA 30332

    SummaryThis document reviews the steps that a beginner should take in order to insert a Matlab plot into a Word docu-ment. Specifically, this document explains:

    1) How to copy the plot using Matlabs menu commands.

    2) How to use Words menu commands to paste that plot into your Word document.

    3) How to use Words tools to adjust the appearance of the plot in Word.4) How to use Matlabs menu commands to export a plot in a Windows-friendly file format.

  • 8/2/2019 Copying Matlab Graphs Onto Word

    2/9

    How to place a Matlab graph into Microsoft Word 2

    Jeffrey Donnell

    The Woodruff School of Mechanical Engineering

    Your experimental project report needs to look like this, with a Matlab plot properly cited, captioned and dis-

    played. This document will explain how to transport this graph from Matlab to Word. This can be accomplished

    through a Copy-and-Paste operation, or by exporting the plot to a windows-friendly intermediate file such as a

    bitmap or metafile.

    You have already prepared this graph in Matlab and it is ready for transport to Word. We will first describe how

    to copy this graph and paste it into Word.

  • 8/2/2019 Copying Matlab Graphs Onto Word

    3/9

    How to place a Matlab graph into Microsoft Word 3

    Jeffrey Donnell

    The Woodruff School of Mechanical Engineering

    1) Copy the Figure from Matlab

    1) In the Matlab figure toolbar, pull down the Edit menu and select Copy Figure:

    The plot is copied without further input from you. You may now close your Matlab file and open your Word

    document in order to paste the copied plot.

  • 8/2/2019 Copying Matlab Graphs Onto Word

    4/9

    How to place a Matlab graph into Microsoft Word 4

    Jeffrey Donnell

    The Woodruff School of Mechanical Engineering

    2) Paste the Matlab Graph into Word

    When you activate your Word document, you should place the cursor at the point where the graph needs to be

    displayed. Open Words Edit pulldown menu and select Paste Special:

    Word will present you with the Paste Special dialog box, which shows Words pre-selected options for inserting

    the information on the clipboard:

  • 8/2/2019 Copying Matlab Graphs Onto Word

    5/9

    How to place a Matlab graph into Microsoft Word 5

    Jeffrey Donnell

    The Woodruff School of Mechanical Engineering

    In the Paste Special dialog, Picture is adequate for pasting a Matlab plot directly into Word. The plot will be

    displayed as on the next sheet.

  • 8/2/2019 Copying Matlab Graphs Onto Word

    6/9

    How to place a Matlab graph into Microsoft Word 6

    Jeffrey Donnell

    The Woodruff School of Mechanical Engineering

    This plot may be marginally too small or too large for the space available on your page. While it is best to make

    size adjustments in Matlab, acceptable results can be obtained with Word tools, so long as the adjustments are

    small.

    3) Adjust the Size of the Display

    Your chart will appear, but depending on Matlabs screen settings, the graph may be the somewhat small for

    your needs on letter-size paper. To resize the chart, you should highlight it, open Words Format menu and

    select Picture:

  • 8/2/2019 Copying Matlab Graphs Onto Word

    7/9

    How to place a Matlab graph into Microsoft Word 7

    Jeffrey Donnell

    The Woodruff School of Mechanical Engineering

    Words Format Picture dialog will display. Here we wish to adjust the size of the display, so the Size tab is

    selected:

    This image is adjusted to obtain a width of around 5 inches. This number does not describe the plot size but the

    size of the bounding box; when a Matlab plot has a five-inch-wide bounding box, the plot itself will fill about

    four inches on the printed page, and this is adequate for most classroom needs.

    Caution: It is best to avoid rescaling a chart or drawing by more than 15%, as you quickly encounter resolution

    problems. Small adjustments can be made after you paste your chart into Word; larger adjustments should be

    made before the graphic is copied from the spreadsheet program. Matlab gives you excellent control in adjusting

    the size of your plots before you copy them.

  • 8/2/2019 Copying Matlab Graphs Onto Word

    8/9

    How to place a Matlab graph into Microsoft Word 8

    Jeffrey Donnell

    The Woodruff School of Mechanical Engineering

    The image below shows the finished plot still selected. The bounding box far exceeds the size of the plot:

    ----------------

    4) Exporting a Graph from Matlab

    If you need to preserve a graph for future use, or if you need to transport a graph to several different media, you

    may wish to export it as an image file. Matlab allows you to export a finished plot in a variety of Windows-

    friendly file formats.

  • 8/2/2019 Copying Matlab Graphs Onto Word

    9/9

    How to place a Matlab graph into Microsoft Word 9

    Jeffrey Donnell

    The Woodruff School of Mechanical Engineering

    To export a graph, open the File menu and select Export. Youll see the export dialog below, giving you a list

    of possible file formats to use:

    Enhanced Metafiles, Tiff files and JPEG files all work well with Word, and they provide adequate representation

    of your graphs. However, such file types cannot be opened and/or adjusted as graphs once they have been cre-

    ated.