Engineering Fundamentals: An Introduction to Engineering, 4th ed.c

(Steven Felgate) #1

15.3 Plotting with MATLAB 483


■Figure 15.15
The plot of Example 15.4 with
modified properties.

Generally, it is easier to use the Graph Property Editor. For example, to make the curve line
thicker, change the line color, and to add markers to the data points (with the mouse
pointer on the curve) double-click the left mouse button. Make sure you are in the picking
mode first. You may need to click on the arrow next to the print icon to activate the picking
mode. After double-clicking on the line, you should see the line and the Marker Editor
window. As shown in Figure 15.14, we increased the line thickness from 0.5 to 2, changed the
line color to black, and set the data-point marker style to Diamond. These new settings are
reflected in Figure 15.15.
Next, we will add an arrow pointing to the maximum value of the volume by selecting the
Text Arrowunder the Insertoption (see Figure 15.16), and add the text “Maximumvolume
occurs at x 1.7 cm.” These additions are reflected in Figure 15.17.
We can also change the font size and style, and make the title or the axes labels boldface. To do
so from the Menu bar, select Editand then Figure Object Properties.... Then, we pick the ob-
ject that we want to modify and using the Property Editor shown in Figure 15.18 on page 485, we
can modify the properties of the selected object. We have changed the font size and the font weight
of the title and the labels for Example 15.4 and shown the changes in Figure 15.19 on page 486.
With MATLAB, you can generate other types of plots, including contour and surface
plots. You can also control the x- andy-axis scales. For example, the MATLAB’s
loglog(x,y)uses the base-10 logarithmic scales forx- andy-axes. Notexandyare the
variables that you want to plot. The command loglog(x,y) is identical to the

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

圀圀圀⸀夀䄀娀䐀䄀一倀刀䔀匀匀⸀䌀伀䴀圀圀圀⸀夀䄀娀䐀䄀一倀刀䔀匀匀⸀䌀伀䴀

Free download pdf