The Rescale Operation
(v 4.1)
One of the simplest, yet most powerful, features of XYPLOT is the
Rescale operation. It allows you to modify at once all
the x or y values of a data set. With Rescale you
may apply a function to x or y, or perform arithmetic
operations between x or y and a constant. The various
types of rescale operations supported by XYPLOT are shown below.
| trigonometric |
sin(x) |
cos(x) |
tan(x) |
atn(x) |
| angular |
rad > deg |
deg > rad |
| base e |
ex |
log(x) |
| base 10 |
10x |
log10(x) |
| powers |
xp |
px |
| arithmetic |
x + c |
x - c |
c - x |
cx |
x/c |
c/x |
| polynomial |
a+bx+cx2+dx3+
|
Using Rescale
From the plot display screen, click on the Math menu and
select Rescale. At the input prompt,
Rescale >>
you may enter simple expressions such as cos(y),
x/10, exp(y), d>r(x),
y+2, etc.. You may use either upper or
lower case and the parentheses around function arguments
are optional. Some things to note are:
- ^ represents raising to a power.
- L10 represents the function log10
("log base 10").
- d>r and r>d functions convert from
degrees to radians, and vice-versa.
- Trig functions sin, cos, and tan assume
that their argument is in radians.
Rescale always acts on all x or y entries
in the data set, and replaces each entry with the result of the
operation. For example, the expression
cos(y)
produces the substitution
y > cos(y)
for every y in the data set.
The data stored in memory are actually modified by Rescale.
That is why the plot will change with each operation. A note is
added to the beginning of the data set's header automatically
to record the history of the modifications.
Examples of Rescale Expressions
Here are examples to illustrate some of the rescale operations that are
possible.
Operation (to create this
|
Expression type this) |
| x + 5 |
x+5 |
| y/2.5 |
y/2.5 |
| 3.0 - y |
3.0-y |
| y2 |
y^2 |
| 1 + 5x + 2.4x2 |
pol(x, 1, 5, 2.4) |
| 10x |
10^x |
| 1/y |
1/y |
| y*3.14 |
y*3.14 |
| log10(x) |
l10(x) |
| ln(y) |
log(y) |
| ex |
exp(x) |
| sin(y) |
sin(y) |
| iy |
y*(0, 1) |
only for complex datasets
See also examples of usage.