我已经写了下面的代码来生成一个包含6个图表的图形。 它工作正常,除了第一个确实遵循origin命令。从帖子末尾的图中可以看出,第一个图表的轴与页面的原点对齐,并且标签未打印。其他5个图表位于位置,并遵循代码中指定的大小。 关于问题和解决方案有什么想法吗?
这是代码:
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: portSize = col(source(s), name("portSize"), unit.category())
DATA: pricePar = col(source(s), name("pricePar"), unit.category())
DATA: g1 = col(source(s), name("g1"), unit.category())
DATA: h1 = col(source(s), name("h1"), unit.category())
DATA: g2 = col(source(s), name("g2"), unit.category())
DATA: h2 = col(source(s), name("h2"), unit.category())
DATA: condition = col(source(s), name("Cond"), unit.category())
DATA: thetaNFmin=col(source(s), name("thetaNFmin"))
DATA: thetaFmin=col(source(s), name("thetaFmin"))
DATA: thetaNFmax=col(source(s), name("thetaNFmax"))
DATA: thetaFmax=col(source(s), name("thetaFmax"))
TRANS: x1 = eval(0)
TRANS: y1 = eval(0)
TRANS: x2 = eval(1)
TRANS: y2 = eval(1)
PAGE: begin(scale(550px,950px))
GRAPH: begin(origin(10%,1%),scale(200px,300px))
SCALE: linear(dim(1), include(0,1))
SCALE: linear(dim(2), include(0,1))
SCALE: condition = cat(aesthetic(aesthetic.color), map(("9",color.darkgrey)))
GUIDE: axis(dim(1), label("theta(NF)"), null())
GUIDE: axis(dim(2), label("theta(F)"), null())
GUIDE: axis(dim(3), null())
GUIDE: axis(dim(4), label("(a) Focal firm - number of alternatives"))
ELEMENT: edge(position((thetaNFmin*thetaFmin+thetaNFmax*thetaFmax)*(condition*portSize)), shape(shape.line), color(color.lightgrey))
ELEMENT: edge(position((x1*y1+x2*y2)*(condition*portSize)), size(size."0.25px"), shape(shape.dash), color(color.black))
ELEMENT: edge(position((x1*y1+x2*y1)*(condition*portSize)), size(size."1.5px"), shape(shape.line), color(color.black))
ELEMENT: edge(position((x1*y1+x1*y2)*(condition*portSize)), size(size."1.5px"), shape(shape.line), color(color.black))
GRAPH: end()
GRAPH: begin(origin(60%,5%),scale(200px,250px))
SCALE: linear(dim(1), include(0,1))
SCALE: linear(dim(2), include(0,1))
SCALE: condition = cat(aesthetic(aesthetic.color), map(("9",color.darkgrey)))
GUIDE: axis(dim(1), label("theta(NF)"), null())
GUIDE: axis(dim(2), label("theta(F)"), null())
GUIDE: axis(dim(3), null())
GUIDE: axis(dim(4), label("(b) Focal firm - price parameter"))
ELEMENT: edge(position((thetaNFmin*thetaFmin+thetaNFmax*thetaFmax)*(condition*pricePar)), shape(shape.line), color(color.lightgrey))
ELEMENT: edge(position((x1*y1+x2*y2)*(condition*pricePar)), size(size."0.25px"), shape(shape.dash), color(color.black))
ELEMENT: edge(position((x1*y1+x2*y1)*(condition*pricePar)), size(size."1.5px"), shape(shape.line), color(color.black))
ELEMENT: edge(position((x1*y1+x1*y2)*(condition*pricePar)), size(size."1.5px"), shape(shape.line), color(color.black))
GRAPH: end()
GRAPH: begin(origin(10%,33%),scale(200px,300px))
SCALE: linear(dim(1), include(0,1))
SCALE: linear(dim(2), include(0,1))
SCALE: condition = cat(aesthetic(aesthetic.color), map(("9",color.darkgrey)))
GUIDE: axis(dim(1), label("theta(NF)"), null())
GUIDE: axis(dim(2), label("theta(F)"), null())
GUIDE: axis(dim(3), null())
GUIDE: axis(dim(4), label("(c) Captivity - g1"))
ELEMENT: edge(position((thetaNFmin*thetaFmin+thetaNFmax*thetaFmax)*(condition*g1)), shape(shape.line), color(color.lightgrey))
ELEMENT: edge(position((x1*y1+x2*y2)*(condition*g1)), size(size."0.25px"), shape(shape.dash), color(color.black))
ELEMENT: edge(position((x1*y1+x2*y1)*(condition*g1)), size(size."1.5px"), shape(shape.line), color(color.black))
ELEMENT: edge(position((x1*y1+x1*y2)*(condition*g1)), size(size."1.5px"), shape(shape.line), color(color.black))
GRAPH: end()
GRAPH: begin(origin(60%,33%), scale(200px,300px))
SCALE: linear(dim(1), include(0,1))
SCALE: linear(dim(2), include(0,1))
SCALE: condition = cat(aesthetic(aesthetic.color), map(("9",color.darkgrey)))
GUIDE: axis(dim(1), label("theta(NF)"), null())
GUIDE: axis(dim(2), label("theta(F)"), null())
GUIDE: axis(dim(3), null())
GUIDE: axis(dim(4), label("(d) Include focal firm given captivity - h1"))
ELEMENT: edge(position((thetaNFmin*thetaFmin+thetaNFmax*thetaFmax)*(condition*h1)), shape(shape.line), color(color.lightgrey))
ELEMENT: edge(position((x1*y1+x2*y2)*(condition*h1)), size(size."0.25px"), shape(shape.dash), color(color.black))
ELEMENT: edge(position((x1*y1+x2*y1)*(condition*h1)), size(size."1.5px"), shape(shape.line), color(color.black))
ELEMENT: edge(position((x1*y1+x1*y2)*(condition*h1)), size(size."1.5px"), shape(shape.line), color(color.black))
GRAPH: end()
GRAPH: begin(origin(10%,66%),scale(200px,300px))
SCALE: linear(dim(1), include(0,1))
SCALE: linear(dim(2), include(0,1))
SCALE: condition = cat(aesthetic(aesthetic.color), map(("9",color.darkgrey)))
GUIDE: axis(dim(1), label("theta(NF)"), null())
GUIDE: axis(dim(2), label("theta(F)"), null())
GUIDE: axis(dim(3), label("Condition"))
GUIDE: axis(dim(4), label("(e) Choice set formation with 2 firms - g2"))
ELEMENT: edge(position((thetaNFmin*thetaFmin+thetaNFmax*thetaFmax)*(condition*g2)), shape(shape.line), color(color.lightgrey))
ELEMENT: edge(position((x1*y1+x2*y2)*(condition*g2)), size(size."0.25px"), shape(shape.dash), color(color.black))
ELEMENT: edge(position((x1*y1+x2*y1)*(condition*g2)), size(size."1.5px"), shape(shape.line), color(color.black))
ELEMENT: edge(position((x1*y1+x1*y2)*(condition*g2)), size(size."1.5px"), shape(shape.line), color(color.black))
GRAPH: end()
GRAPH: begin(origin(60%,66%), scale(200px,300px))
SCALE: linear(dim(1), include(0,1))
SCALE: linear(dim(2), include(0,1))
SCALE: condition = cat(aesthetic(aesthetic.color), map(("9",color.darkgrey)))
GUIDE: axis(dim(1), label("theta(NF)"), null())
GUIDE: axis(dim(2), label("theta(F)"), null())
GUIDE: axis(dim(3), label("Condition"))
GUIDE: axis(dim(4), label("(f) Include focal firm given CSF with 2 firms - h2"))
ELEMENT: edge(position((thetaNFmin*thetaFmin+thetaNFmax*thetaFmax)*(condition*h2)), shape(shape.line), color(color.lightgrey))
ELEMENT: edge(position((x1*y1+x2*y2)*(condition*h2)), size(size."0.25px"), shape(shape.dash), color(color.black))
ELEMENT: edge(position((x1*y1+x2*y1)*(condition*h2)), size(size."1.5px"), shape(shape.line), color(color.black))
ELEMENT: edge(position((x1*y1+x1*y2)*(condition*h2)), size(size."1.5px"), shape(shape.line), color(color.black))
GRAPH: end()
PAGE: end()
END GPL.