| OT: Determining the size of plotting area |
|
 |
|
 |
|
 |
|
 |
Group: comp.lang.fortran · Group Profile
Author: Robert SingerRobert Singer Date: Sep 16, 2008 19:28
Offtopic really for it's not a a fortran language question, but I'm
sure many in here have dealt with the problem at some point in time.
First, Let me describe what I'm interested in; most of you have used
excel or some similar program; when you put an array of data in it and
plot a graph/chart (x-y type), he will automatically determine the
upper and lower limit of the graph.
For example;
x y
1 0,9
2 7,2
3 24,3
4 57,6
5 112,5
6 194,4
7 308,7
8 460,8
9 656,1
10 900
11 1197,9
(y=0,9x**3)
will get you an x-y graph which starts from 0 to 12 in x, and from 0
to 1400 in y (notice he didn't put it up to 1200, but to 1400).
Okey, the first step is to determine xmin, xmax and the same for y,
for the given array. That is not a problem.
As far as I know fortran has no intristics for rounding numbers, so
that would be one part of the problem.
I guess just determining the xmax and multiplying it by 1,1 and then
rounding up could solve the dilemma, but I'm still interested to hear
your opinion.
How do you determine the boundaries of the plotting area so it will
work in a general case (you don't know if the number's gonna be from
-1,2 to 1,2 or from -1,2 to 1200), and always "look nice" (in lack of
a better term)
All comments strongly encouraged, and mostly welcomed.
--
Bob
|