Navigation:  How do I ...? > Example plots >

EX10.GRF

Print this Topic Previous pageReturn to chapter overviewNext page

This topic illustrates DPlot's point labeling feature. First, open a new document window (File>New>XY Plot). Now we'll recreate the curves shown in the example. This example shows the motion with time of an object that is given an initial upward velocity and subjected only to gravity (drag and other forces are neglected). The equation of motion, repeated in the example's notation, is:

where

We'll recreate the 3 curves shown, substituting our own values in the equation. We'll use US units (velocity in feet/sec, g in ft/sec^2) for this example.

We're making use of constants throughout the settings in this dialog: A for the initial velocity in feet/second and G for the acceleration of gravity in ft/sec2. Constants are useful when plotting the same equation multiple times, changing only one or two parameters, and also when using physical constants that don't change. The constants will retain their values until and unless we set them to some other values.

We start at x (time) = 0, but where to stop? We're only interested in plotting the motion until the object returns to the ground surface (y=0). There are two ways to go about this:

1) You can use a large time value such that the calculation will proceed past the time when the object returns to y=0, then use Extents/Intervals/Size to specify the extents of the plot. In our case we also want to find the maximum height of the object, so if using this approach we'd need to use a fairly small time interval to ensure that we find the maximum (or very close to it).

2) In many cases you can easily predict at what x (in this case time) the maximum amplitude will occur. For our equation of motion this is relatively easy: the maximum height (y) occurs where the velocity is 0:

Likewise, solving for y=0 we find the time at which the object returns to y=0 is 2*V/g, or twice the time to the maximum height. So we've used a "to X" value of 2V/g and a time increment that divides evenly into both the time of maximum height and the "to X" value, so we can be sure that we'll be calculating the true maximum height of the object.

 

Repeat the above for 100 and 50 fps...

...then use Extents/Intervals/Size to specify the plot extents: X from 0 to 10, Y from 0 to 450.

Now we want to label the points at which the maximum height occurs for each curve. Select Text>Label Points. Click Add to add a label. Select "Curve #1" in the Curve list (it should already be selected). We can scan through all points using the Point # scrollbar, but there is a much easier way: Under Jump to, click the Ymax button. This will automatically move the crosshairs and the scrollbar to the point with the maximum Y value. Now enter a label in the Label box... we could type in the actual amplitude, but again, there is an easier way. Type "$Y ft". $Y will be substituted with the actual Y value of the point associated with the label, $X will do the same for the X value. One advantage to using this method is that the labels will be changed if the data is updated. Say, for example, that you multiply all Y values by 0.3048 to show height in meters rather than feet.

Repeat this procedure for the other two curves, and you should now have a plot that resembles the example. As with the legend and notations, you can move a point label by dragging it with your mouse, and change its attributes using the right-click menu.

 


Page url: https://www.dplot.com/help/index.htm?ex10_grf.htm