如何在Gadfly(使用Julia)绘图中设置图形或画布尺寸?

5
我希望能够设置我的 Gadfly 图的宽度(和高度),以便在 hstack 图中调整长宽比。
原始图:
using Gadfly
p1 = Gadfly.plot(x=[1,2], y=[3,4], Geom.line)

enter image description here

图(待调整):
using Gadfly
p1 = Gadfly.plot(x=[1,2], y=[3,4], Geom.line)
hstack(p1, p1, p1)

enter image description here

有没有关于如何调整图形大小/图像大小的建议?
1个回答

5
Gadfly 图库中,绘图使用了 set_default_plot_size()。另外一种选项是像这样:
p = plot(...)
draw(PNG(6inch, 3inch), p)

请参阅更多信息,包括?SVG?PDF?PNG


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接