Graphics    

Overview of MATLAB Graphics

Plotting Your Data

Anatomy of a Plot

Editing Plots

Interactive Plot Editing

Using Functions to Edit Graphs

Using Plot Edit Mode

Starting Plot Edit Mode

Exiting Plot Edit Mode

Selecting Objects in a Graph

Cutting, Copying, and Pasting Objects

Moving and Resizing Objects

Editing Objects in a Graph

Saving Your Work

Saving a Graph in MAT-File Format

Saving to a Different Format (Exporting Figures)

Printing Figures

Getting Help

Changing Your View of an Axes

Zooming In and Out on an Axes

Rotating 3-D Axes

Using the Property Editor

Starting the Property Editor

Closing the Property Editor

Editing Object Properties

Navigating Among Objects in a Graph

Identifying Objects in a Graph

Applying Your Changes

Using the Data Statistics Tool 

Adding Plots of Statistics to a Graph

Saving Statistics to the Workspace

Basic Plotting

Basic Plotting Commands

Creating Line Plots

Specifying Line Style

Specifying the Color and Size of Lines

Adding Plots to an Existing Graph

Plotting Only the Data Points

Plotting Markers and Lines

Line Styles for Black and White Output

Setting Default Line Styles

Line Plots of Matrix Data

Plotting Imaginary and Complex Data

Plotting with Two Y-Axes

Combining Linear and Logarithmic Axes

Setting Axis Parameters

Axis Limits and Ticks

Example - Specifying Ticks and Tick Labels

Setting Aspect Ratio

Figure Windows

Displaying Multiple Plots per Figure

Specifying the Target Axes

Default Color Scheme

Formatting Graphs

Overview

Adding Titles to Graphs

Using the Title Option on the Insert Menu

Using the Property Editor to Add a Title

Using the title Function

Adding Legends to Graphs

Using the Legend Option on the Insert Menu

Using the Legend Function

Positioning the Legend

Editing the Legend

Removing the Legend

Adding Axis Labels to Graphs

Using the Label Options on the Insert Menu

Using the Property Editor to Add Axis labels

Using Axis-Label Commands

Adding Text Annotations to Graphs

Creating Text Annotations in Plot Editing Mode

Creating Text Annotations with the text or gtext Command

Text Alignment

Example - Aligning Text

Editing Text Annotations

Mathematical Symbols, Greek Letters, and TeX Characters

Using Character and Numeric Variables in Text

Example - Multiline Text

Drawing Text in a Box

Adding Arrows and Lines to Graphs

Creating Arrows and Lines in Plot Editing Mode

Editing Arrows and Line Annotations

Adding Plots of Basic Statistics to Graphs

Example - Plotting the Mean of a Data Set

Formatting Plots of Data Statistics

Statistics Plotted by the Data Statistics Tool

Viewing Statistics for Multiple Plots

Saving Statistics to the MATLAB Workspace

Creating Specialized Plots

Bar and Area Graphs

Types of Bar Graphs

Stacked Bar Graphs to Show Contributing Amounts

Specifying X-Axis Data

Overlaying Plots on Bar Graphs

Area Graphs

Comparing Datasets with Area Graphs

Pie Charts

Removing a Piece from a Pie Charts

Histograms

Histograms in Cartesian Coordinate Systems

Histograms in Polar Coordinates

Specifying Number of Bins

Discrete Data Graphs

Two-Dimensional Stem Plots

Combining Stem Plots with Line Plots

Three-Dimensional Stem Plots

Stairstep Plots

Direction and Velocity Vector Graphs

Compass Plots

Feather Plots

Two-Dimensional Quiver Plots

Three-Dimensional Quiver Plots

Contour Plots

Creating Simple Contour Plots

Labeling Contours

Filled Contours

Drawing a Single Contour Line at a Desired Level

The Contouring Algorithm

Changing the Offset of a Contour

Displaying Contours in Polar Coordinates

Interactive Plotting

Animation

Movies

Example - Visualizing an FFT as a Movie

Erase Modes

Displaying Bit-Mapped Images

Overview

Images in MATLAB

Bit Depth Support

Data Types

Image Types

Indexed Images

Intensity Images

RGB (Truecolor) Images

Working with 8-Bit and 16-Bit Images

8-Bit and 16-Bit Indexed Images

8-Bit and 16-Bit Intensity Images

8-Bit and 16-Bit RGB Images

Mathematical Operations Support for uint8 and uint16

Other 8-Bit and 16-Bit Array Support

Summary of Image Types and Numeric Classes

Reading, Writing, and Querying Graphics Image Files

Reading a Graphics Image

Writing a Graphics Image

Obtaining Information About Graphics Files

Displaying Graphics Images

Summary of Image Types and Display Methods

Controlling Aspect Ratio and Display Size

The Image Object and Its Properties

CData

CDataMapping

XData and YData

EraseMode

Printing Images

Converting the Data or Graphic Type of Images

Printing and Exporting

Overview of Printing and Exporting

Print and Export Operations

Graphical User Interfaces

Command Line Interface

Specifying Parameters and Options

Default Settings and How to Change Them

How to Print or Export

Printing a Figure

Printing to a File

Exporting to a File

Exporting to the Windows Clipboard

Examples of Basic Operations

Printing a Figure at Screen Size

Printing with a Specific Paper Size

Printing a Centered Figure

Exporting in a Specific Graphics Format

Exporting in EPS Format with a TIFF Preview

Exporting a Figure to the Clipboard

Changing a Figure's Settings

Selecting the Figure

Selecting the Printer

Setting the Figure Size and Position

Setting the Paper Size or Type

Setting the Paper Orientation

Selecting a Renderer

Setting the Resolution

Setting the Axes Ticks and Limits

Setting the Background Color

Setting Line and Text Characteristics

Setting the Line and Text Color

Setting CMYK Color

Excluding User Interface Controls

Producing Uncropped Figures

Choosing a Graphics Format

Frequently Used Graphics Formats

Factors to Consider in Choosing a Format

Properties Affected by Choice of Format

Impact of Rendering Method on the Output

Description of Selected Graphics Formats

How to Specify a Format for Exporting

Choosing a Printer Driver

Types of Printer Drivers

Factors to Consider in Choosing a Driver

Driver-Specific Information

How to Specify the Printer Driver to Use

Troubleshooting

Printing Problems

Exporting Problems

General Problems

Handle Graphics Objects

Graphics Object Hierarchy

Types of Graphics Objects

Handle Graphics Objects

Object Properties

Changing Values

Default Values

Properties Common to All Objects

Graphics Object Creation Functions

Example -- Creating Graphics Objects

Parenting

High-Level Versus Low-Level

Simplified Calling Syntax

Setting and Querying Property Values

Setting Property Values

Querying Property Values

Factory-Defined Property Values

Setting Default Property Values

How MATLAB Searches for Default Values

Defining Default Values

Examples -- Setting Default LineStyles

Accessing Object Handles

The Current Figure, Axes, and Object

Searching for Objects by Property Values -- findobj

Copying Objects

Deleting Objects

Controlling Graphics Output

Specifying the Target for Graphics Output

Preparing Figures and Axes for Graphics

Targeting Graphics Output with newplot

Example -- Using newplot

Testing for Hold State

Protecting Figures and Axes

The Close Request Function

Handle Validity Versus Handle Visibility

Saving Handles in M-Files

Properties Changed by Built-In Functions

Callback Properties for Graphics Objects

Graphics Object Callbacks

Uicontrol, Uimenu, and Uicontextmenu Callbacks

Figures Callbacks

Function Handle Callbacks

Function Handle Syntax

Why Use Function Handle Callbacks

Example -- Using Function Handles in a GUI

Figure Properties

Figure Objects

Positioning Figures

The Position Vector

Example - Specifying Figure Position

Controlling How MATLAB Uses Color

Indexed Color Displays

Colormap Colors and Fixed Colors

Using a Large Number of Colors

Nonactive Figures and Shared Colors

Dithering Truecolor on Indexed Color Systems

Selecting Drawing Methods

Backing Store

Double Buffering

Selecting a Renderer

Specifying the Figure Pointer

Defining Custom Pointers

Interactive Graphics

Axes Properties

Axes Objects

Labeling and Appearance Properties

Creating Axes with Specific Characteristics

Positioning Axes

The Position Vector

Position Units

Multiple Axes per Figure

Placing Text Outside the Axes

Multiple Axes for Different Scaling

Individual Axis Control

Setting Axis Limits

Setting Tick Mark Locations

Changing Axis Direction

Using Multiple X and Y Axes

Example - Double Axis Graphs

Automatic-Mode Properties

Colors Controlled by Axes

Specifying Axes Colors

Axes Color Limits - The CLim Property

Example - Simulating Multiple Colormaps in a Figure

Calculating Color Limits

Defining the Color of Lines for Plotting

Line Styles Used for Plotting - LineStyleOrder


  Graphics Overview of MATLAB Graphics