18.11.2014 Views

Microsoft Office

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Learning Advanced Charting 20<br />

FIGURE 20.39<br />

This chart plots the SIN(x).<br />

Plotting mathematical functions with two variables<br />

The preceding section describes how to plot functions that use a single variable (x). You also can plot functions<br />

that use two variables. For example, the following function calculates a value of z for various values of<br />

two variables (x and y):<br />

z = SIN(x)*COS(y)<br />

Figure 20.40 shows a surface chart that plots the value of z for 21 x values ranging from 1 to 4, and for 21 y<br />

values ranging from 1 to 4. Both x and y use an increment of 0.15.<br />

The formula in cell B2, copied across and down, is<br />

=SIN($A2*COS(B$1))<br />

The companion CD-ROM contains a general–purpose, two-variable plotting application. The<br />

ON the CD-ROM<br />

file is named function plot 3D.xlsm. This workbook contains a few simple VBA macros to<br />

allow you to change the chart’s rotation and elevation.<br />

419

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!