|
From: Daniel J S. <dan...@ie...> - 2005-08-18 18:03:40
|
Ethan Merritt wrote:
> On Thursday 18 August 2005 10:26 am, Daniel J Sebald wrote:
>
>>You agree that PostScript should be allowed to have negative numbers for
>>an image location then?
>
>
> The PostScript language itself allows negative numbers, if that's what you're
> asking.
Yeah, I suppose that is why I used a %d rather than a %u in the fprintf() for the PostScript driver. If the core only sends "small" unsigned numbers, having %d there shouldn't hurt anything.
> Whether the gnuplot core routines should ever send negative coordinates
> to a terminal driver is a rather different question.
Actually it is a rather similar question. As far as a frame of reference, it seems to me that when laying out a plot (as with drawing on a piece of paper) you want to leave room on all sides to work with. The following would be equivalent:
1) allow signed coordinates, choose plot area origin near 0
2) allow unsigned coordinates, choose plot area origin way out (halfway?) in the allowable number range
By going with option 2 and then setting axis_array[axis].term_lower to zero in the following formula
#define AXIS_MAP(axis, variable) \
(int) ((axis_array[axis].term_lower) \
+ ((variable) - axis_array[axis].min) \
* axis_array[axis].term_scale + 0.5)
it is like starting a drawing on the corner edge of one's piece of paper.
Dan
|