*Mathcad can show both two-dimensional Cartesian and polar graphs, contour plots, surface plots, and a variety of other three-dimensional plots. These are all examples of plot regions. This section describes how to create a simple two-dimensional graph showing the points calculated in the previous section.*

**Creating a graph**

To create a graph in Mathcad, click in blank space where you want the graph to appear and choose Graph=>X-Y Plot from the Insert menu. An empty graph appears with placeholders on the x-axis and y-axis for the expressions to be graphed. X-Y and polar plots are ordinarily driven by range variables you define: Mathcad graphs one point for each value of the range variable used in the graph. In most cases you will enter the range variable, or an expression depending on the range variable, on the x-axis of the plot. But the QuickPlot feature in Mathcad lets you plot expressions even when you don’t specify the range variable directly in the plot. For example, here’s how to create a QuickPlot of the function d(t) defined in the previous section

• Position the crosshair and type d ( t ). Make sure the editing lines remain displayed on the expression.

• Now choose Graph~X-Y Plot from the Insert menu, or click the X-Y Plot button on the Graphing palette. Mathcad displays the frame of the graph.Click anywhere outside the graph. Mathcad calculates and graphs the points as shown in Figure 1-8. A sample line appears under the “d(t).” This helps you identify the different curves when you plot more than one function. Unless you specify otherwise, Mathcad draws straight lines between the points and fills in the missing axis limits.

9

For detailed information on creating and formatting graphs, see Chapter 20, “Graphs.”

**Resizing a graph**

The graph shown in Figure 1-8 is the default size. It’s easy to make a graph in Mathcad any size you want: just select the graph and stretch it to the desired size.To resize a graph, follow these steps:

• Click the mouse just outside the graphics region. This anchors one comer of the selection rectangle.

• Press and hold down the mouse button. With the button still held, drag the mouse toward the plot region. A dashed selection rectangle emerges from the anchor point.

• When the selection rectangle just encloses the graphics region, let go of the mouse 2000 button. The dashed rectangle will turn into a solid rectangle with handles. 1000 d(l)

• Move the mouse pointer to any of the 0 handles. It will change to a double-headed -1000 10 arrow. 15 20.

• Press and hold down the mouse button. With the mouse button still pressed, move the mouse. The graphics region will be stretched in the direction of motion.

• Once the graphics region is the right size, let go of the mouse button.

• Click outside the graph to deselect it. Figure 1-9 shows the result: a larger graph

10

F**ormatting a graph**

The graph in Figure 1-9 still has the default characteristics: numbered linear axes, no

grid lines, and points connected with solid lines. You can change these characteristics

by for To format the graph, follow these steps:

• Double-click on the graph to bring up the appropriate dialog box. This box contains

settings for all available plot format options. To learn more about these settings, see

Chapter 20, “Graphs.”

• Click on the Traces tab in the dialog box to see the correct page

11

• Click on “trace I” in the scrolling list under “Legend Label.” Mathcad places the current settings for trace 1 in the boxes under the corresponding columns of the scrolling list.

• Click on the arrow under the “Type” column to see a drop-down list of trace types.

• Choose “bar” from this drop-down list by clicking on it.

• Click on the “OK” button to show the result of changing the setting. Mathcad shows the graph as a bar chart instead of connecting the points with lines (Figure 1-10). Note that the sample line under the d(t) now has a bar on top of it.

• Click outside the graph to deselect it.

12