Getting Started Previous page   Next Page

Preparing Graphs for Presentation

Suppose you plot the following data and want to create a graph that presents certain information about the data:

This picture shows the graph created by the code above.

Now suppose you want to save copies of the graph by

Modify the Graph to Enhance the Presentation

To obtain a better view, zoom in on the graph using horizontal zoom.

After enabling zoom mode from the figure toolbar, right-click to display the context menu. Select Horizontal Zoom (2-D Plots Only) from the Zoom Options.

Left-click to zoom in on a region of the graph and use the panning tool to position the points of interest where you want them on the graph.

Label some key points using data tips.

Finally, add text annotations, axis labels, and a title. You can add the title and axis labels using the following commands:

Note that the text string passed to the title command uses TEX syntax to produce the exponents. See the text String property for more information on using TEX syntax to produce mathematical symbols.

The graph is now ready to print and export.

Printing the Graph

Before printing the graph, use the print previewer to see how the graph will be laid out on the page. Display the graph in the print previewer by selecting Print Preview from the figure File menu.

The Page Setup dialog provides many other options for controlling how printed graphs look. Click Help for more information.

Exporting the Graph

Exporting a graph is the process of creating a standard graphics file format of the graph (such as EPS or TIFF), which you can then import into other applications like word processors, drawing packages, etc.

This example exports the graph as an EPS file with the following requirements:

Specifying the Size of the Graph

To set the size, use the Export Setup dialog (select Export Setup from the figure File menu).

Specifying the Font Size

To set the font size of all the text in the graph, select Fonts in the Export Setup dialog's Properties selector. Then select Use fixed font size and enter 8 in the text box.

Selecting the File Format

Once you finish setting options for the exported graph, click the Export button. MATLAB displays a Save As dialog that enables you to specify a name for the file as well as select the type of file format you want to use.

For this example, select EPS, as shown in the following picture.

You can import the saved file into any application that supports EPS files. The Save as type drop-down menu lists other options for file types.

You can also use the print command to print figures on your local printer or to export graphs to standard file types.


Previous page  Modifying the Graph Data Source Basic Plotting Functions Next page

© 1994-2005 The MathWorks, Inc.