[net.graphics] Help with scaling

renia@ecr1.UUCP (Renata Kraszewski) (05/29/85)

I am writing a number of business graphics packages and the problem I keep
running into is finding a general algorithm for displaying numbers along the
y axis of a graph. One of the constraints is that there is only a finite amount
of space. For example how can you take care of cases such as:
	a)	Maximum = 111111111145
		Minimum = 111111111144
	b)	Maximum = .2222222244
		Minimum = .2222222243
as well as the usual ones such as 
	c)	Maximum = 1000
		Minimum = 0
in a restricted width?

The only way I know of so far is to represent each number as:
			(number * multiplicative factor) + additive factor
For example, in case a) above if I had 10 divisions along the y axis,
the labels would go from 4.0 to 5.0 in steps of .1 and somewhere on
the graph I would have to say that the values are in (10**0's + 11111111114.)

any ideas??
					Renia
					(utzoo!hcr!ecrhub!ecr1!renia)