7 char *dflt_coord = "gg";
8 char *curr_coord = "gg";
9 int ncoord = 0; /* number of explicit coord's given */
13 int xcflag = 0; /* 1 if xcoord set */
17 void coord_x(Point pt) /* remember x coord */
21 margin = 0; /* no extra space around picture if explicit coords */
24 void coord_y(Point pt)
28 margin = 0; /* no extra space if explicit coords */
31 void coordlog(int n) /* remember log scaling */
36 void coord(Obj *p) /* set coord range */
41 if (ncoord > 1 && strcmp(p->name, dflt_coord) == 0) {
42 /* resetting default coordinate by implication */
43 sprintf(buf, "gg%d", ncoord);
45 p = lookup(dflt_coord, 1);
49 p->pt.x = min(xcoord.x,xcoord.y); /* "xcoord" is xmin, xmax */
50 p->pt1.x = max(xcoord.x,xcoord.y);
51 if ((logcoord&XFLAG) && p->pt.x <= 0.0)
52 ERROR "can't have log of x coord %g,%g", p->pt.x, p->pt1.x FATAL;
57 p->pt.y = min(ycoord.x,ycoord.y); /* "ycoord" is ymin, ymax */
58 p->pt1.y = max(ycoord.x,ycoord.y);
59 if ((logcoord&YFLAG) && p->pt.y <= 0.0)
60 ERROR "can't have log of y coord %g,%g", p->pt.y, p->pt1.y FATAL;
68 void resetcoord(Obj *p) /* reset current coordinate */