Getting Started Tutorial > Task 5–2: Formatting a Plot
  
Task 5–2: Formatting a Plot
1. Open the Excel sheet shipping_data. Highlight the cells that contain data from A1 to C9, and copy your selection to the clipboard. To paste the data into a table, in a new PTC Mathcad worksheet, press Ctrl+V.
Click to copy this expression
In a table, each column is a data set. The first row contains the name of each data set, the second row defines the units of each data set (if any), and the remaining rows contain the data.
2. Add the names of the data sets and their units where needed.
Click to copy this expression
3. Use tables to define column vectors. Afterward, you can work with the column vectors in your worksheet:
Click to copy this expression
4. On the Plots tab, in the Traces group, click Insert Plot and select XY Plot. An empty XY plot region appears. Drag the y-axis legend to the left of the plot, if necessary.
5. In the y-axis placeholder, type Value. To insert a new y-axis expression, press Shift+Enter and then type Charges.
Click the x-axis placeholder and then type Weight. Press Enter. The following two traces appear. Notice that the kg unit appears automatically in the unit placeholder next to Weight.
Click to copy this expression
6. Click Value. On the Plots tab, in the Styles group, select the color red from the Trace Color list. Select the solid square symbol from the Symbol list.
Click Charges. Click Symbol and select a cross.
Click to copy this expression
7. Click Weight. Select (none) from the Line Style list. Both line traces disappear.
Click to copy this expression
8. Restore the line traces to Value and Charges.
Click Value then in the Axes group, click Logarithmic Scaling. The scale of the y-axis changes to logarithmic.
Click Weight then Logarithmic Scaling to change the scale of the x-axis to logarithmic.
Click to copy this expression
9. To restore the scientific scale to the y-axis, click Value then in the Axes group, click Logarithmic Scaling.
To restore the scientific scale to the x-axis, click Weight then click Logarithmic Scaling.
Click to copy this expression
10. Drag each axis to a new location between any two tick marks. Each axis snaps to a tick mark on the other axis.
Click to copy this expression
11. To force the axes to cross at 0, click Value then in the Axes group, click Cross Axes at 0,0. The axes return to their previous positions.
12. Save the worksheet under the name shipping.mcdx.
13. To close shipping.mcdx, press Ctrl+W.
Practice
Before you move on to the next exercise:
1. Copy and paste the definitions of vectors X and Y to your worksheet.
Click to copy this expression
Click to copy this expression
2. Copy and paste the definitions of y(x) and i to your worksheet.
Click to copy this expression
Click to copy this expression
3. Manually create the following plot.
Click to copy this expression
Proceed to Exercise 6.