| ||||||||||||||||||
Function Plotting
This window is accessed via the menu item File / Plot Functions.
The main UltimaCalc window can still be used when the Plot Functions window is
open.
The Plot Functions window contains tabs to control eight independent plots. Each of these plots can be viewed independently, one at a time, by selecting its tab. All active plots (those that contain entries) can be shown together in one display by clicking on 'Plot All'.
For each plot, given a set of two or more X-Y pairs, these are plotted using X and Y as normal Cartesian coordinates. UltimaCalc will calculate these pairs of X and Y values, if you:
(1) Specify initial conditions. At its simplest, you might enter the text x = 0 into the box labelled 'Initially'.
(2) Specify a continuation condition. Enter an expression that evaluates to a non-zero value if an iteration is
to be performed, or zero if the calculation of X-Y pairs is to end.
For example, x <= 10.
(3) Specify the calculation to be performed for each iteration. For example,
y = x*(8-x).
(4) Specify how to change your variable(s) before starting the next iteration.
For example, x = x+1.

If you enter the example texts, click on the 'Plot' button (or hit the 'Enter' key) to see the results. You should see a plot of a parabola, with each calculated value marked. Resize the display by dragging its edges. The labels on the axes adjust automatically as necessary.

Use the 'Tab' key to move from one text entry box to the next. Shift+Tab moves backwards. Click on the 'Plot' button or press the 'Enter' key to plot a curve after changing the expressions.
When two or more plots are defined, each plot is displayed automatically when clicking on a tab. Each plot is limited to a maximum of 2000 iterations to guarantee that the calculations will eventually stop even if there is a problem.
Here is a more interesting example. Click on the second tab (for Plot 2) then enter the following expressions:
Initially: t = 0
While: t <= 1
Iterate: x = 1 + 20*t + 10*t*t - 25*t^3; y = -10 - 20*t - 5*t*t + 50*t^3
Step Values: t = t + 0.05
This plots a Bézier curve. (Click on 'Plot' or hit the 'Enter' key to see it.) Click on the first tab (Plot 1). The parabola should reappear. Clicking on a tab shows the corresponding plot. Feel free to experiment with the coefficients in the 'Iterate' expression for the Bézier curve.

Plotting Initial X-Y Values
For some curves, it is necessary to include the initial x and y values in the plot. To do this, click on the check box marked 'Show x, y' so that a tick is shown in the check box.
Selecting Degrees or Radians
By default, this tool will calculate using angles in radians. If you wish to calculate with angles in degrees, click on the 'Deg' check box to put a tick in it. This will only affect the current plot, and nothing else.
Changing the Appearance
For more visually exciting plots, like those shown, select one of the plots (by clicking on its tab) and right-click on the displayed plot. A message pops up: Set Display Properties. Click on this, and the Plot Options window appears. This gives a wide variety of options, including changing the colours, selecting a different style for the markers, changing the positions of the axis lines, and zooming in on a part of the plot.
When you have the settings you want, close the Plot Options window and select the other plot. Customise this one too.
If you now click on the 'Plot All' button, you will see both curves shown together. Notice that the axes have been adjusted so as to suit both plots.

This time, when you open the Plot Options window fewer options are available to you, as you are setting the options for a display that contains more than one plot.
Viewing the Values of X and Y
If you right click on the plot, the menu that pops up includes an item, Show X-Y Values. If you select this, the window enlarges slightly to accomodate scroll bars which control horizontal and vertical lines drawn above the plot. The horizontal scroll bar moves the vertical line, and at the point (or points) at which it crosses a curve, the X-Y coordinates of the intersection will be displayed. The vertical scroll bar works similarly.
To nudge by one pixel at a time, use the arrow keys, or click on the arrow icons at the ends of the scroll bars.
Notes
If you wish, you can record notes for each plot. Select the plot to record notes for, and click on the 'Notes' button. When a multiple plot is being shown, this button is ghosted.
Saving
To save the displayed chart as an image file, right click on it and use the pop-up menu that appears. (More details)
Click on 'Save As' to save data about the plots with their colour schemes to a plain text file which can be used to re-create the calculation later.
