Graphs MathCad Help

Mathcad graphs are both versatile and easy to use. To create a graph, click where you want to insert the graph, choose Graph-e-X. Y Plot from the Insert menu, and fill in the placeholders. You can modify the format extensively, including reformatting the axes and curves and using a variety of different types of labels

The following sections describe the use of Mathcad graphs:

Creating a graph
Basic steps in creating and editing a graph. QuickPlots versus graphs where you explicitly specify the range of values over which to plot.

Graphing functions
Procedures for graphing functions.

Graphing a vector
Procedures for graphing vectors.

Graphing more than one expression
Procedures for creating graphs with multiple traces.

Formatting the axes
Procedures for modifying the formats of the x- and y-axes.

Formatting individual curves
Procedures for modifying the formats of curves or traces in a graph.

Setting default formats
Procedures for using default format settings.

Labeling your graph
Procedures for working with titles, axis labels, and other labels.

Modifying your graph’s perspective
Procedures for changing the size of the graph, zooming in on a portion of the graph, and finding coordinates in it.

Gallery of graphs
A set of sample graphs illustrating options for creating graph

Creating a graph

You create X-Y graphs in Mathcad using theX-Yplotoperator. The -Ypkx operazor like other Mathcad operators, has placeholders for you to fill in that pecify expeessions to be computed and displayed.

You can insert the X-Y plot operator into your worksheet in one of three way : aaeoegn these methods are equivalent, only the first is mentioned in the rest of this . in your worksheet where you want your graph to appear and either

• Choose Graph~X-Y Plot from the Insert menu; or
• Press the @ key; or
• Click on the X-Y Plot button in the Graph Palette.

The X-Y plot operator is very flexible, letting you either

• Create a QuickPlot based only on one or more expressions of a single variable, the dependent variable. Once you have entered the expression(s) in the placeholder on the y-axis, Mathcad automatically creates the plot over a range of -10 to 10for the dependent variable on the x-axis.

• Explicitly enter expressions on both the y-axis and x-axis that specify the range of values over which to plot. Usually these expressions depend on range variables you have previously defined in your worksheet. If the range variables aren’t previously defined, Mathcad will generate appropriate range variables for the plot.

This section outlines the difference between these two uses of the X-Y plot operator. The sections “Graphing functions” on page 464, “Graphing a vector” on page 465, and “Graphing more than one expression” on page 470 describe the kinds of expressions you can plot in greater detail. See “Formatting the axes” on page 472 and “Formatting individual curves” on page 478 for an introduction to Mathcad’s plot formatting options.

QuickPlots

You can quickly and easily create X-Y graph from a single Mathcad expression. To do so:

• Enter the expression or function of a single variable you want to plot. Make sure the editing lines remain in the expression.

QuickPlots

QuickPlots

QuickPlots

QuickPlots

To see the graph fill in the placeholders

• The placeholder at the middle of the horizontal axis holds the variable or expression to graph against. Enter a range variable, a subscripted variable, or any other expression involving a range variable in this placeholder.
• The placeholder at the middle of the vertical axis holds an expression to graph. Enter a range variable, subscripted variable, or any other expression involving the range variable on the horizontal axis.
• The other four placeholders can be used to override Mathcad’ automatic choices of axis limits. For more information about axis limits, see “Setting limits for axes” on page 474

Mathcad graphs one point for each value of the range variable. If you don’t define the range variable in your worksheet, as described above. Mathcad automatically generates an appropriate range for the dependent variable in your plot. Range variables are discussed in , “Range Variables.”

Graphs typically have one or more expressions involving range variables on each axis. Be aware that it’s usually an error to use two different range variables in the same curve, or trace, on a graph. If you use two range variables in the same trace, Mathcad tries to graph one point for each value of each range variable. For example, if iranges through 20 points and j through 30, and you try to plot Yi against Xj’ Mathcad tries to graph a total of 600 points. It is, however, permissible to use different range variables in different traces on the same graph

Just as with an equation, Mathcad does not process a graph until you click outside the graph region. When Mathcad processes the graph, it draws one point for each value of each range variable in the x or Y axis expressions and, unless you specify otherwise, connects them with straight lines

Figure 20-1 shows some typical graphs with the placeholders filled in. Note the line that appears under the y-axis arguments. This indicates the trace type and color used to display the curve. See the section “Formatting individual curves” on page 478 to learn how to control this.

The graph in the upper left comer of Figure 20-1 is an example of a parametric plot: one in which the expressions you are plotting on the x-axis and y-axis are both functions of a ingle variable. If you do not explicitly define a range variable for the parameter in such a plot, Mathcad uses a default range for this variable to create the graph.

X- Y graphs of expressions, functions, and vectors.

X- Y graphs of expressions, functions, and vectors.

If an expression is complex, Mathcad graphs only the real part. The imaginary part is ignored. Note that no error message will be displayed.

Working with graph regions

You can drag, cut, copy, and paste a graph just as you would any other math region. See  “Editing Equations,” for details

• Press and hold down the mouse button just outside the plot.
• With the button still pressed, drag the mouse cursor so as to enclose the graphics region in a selection rectangle.
• Choose Cut from the Edit menu.

To move a graph, follow the instructions above for deleting it. Then click the mouse wherever you want the graph and choose Paste from the Edit menu. Alternatively, you can drag a plot as you would an equation.

Posted on November 24, 2015 in Graphs

Share the Story

Back to Top
Share This