5

I would like to set the width (and height) of my Gadfly plot to adjust the aspect ratio in a hstack plot.

Orginal plot:

using Gadfly
p1 = Gadfly.plot(x=[1,2], y=[3,4], Geom.line)

enter image description here

hstack plot (to be adjusted):

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

enter image description here

Any suggestions on how to adjust the plot size / figure size?

René
  • 4,594
  • 5
  • 23
  • 52

1 Answers1

5

In the Gadfly galleries, plots use set_default_plot_size(). Another option is e.g.:

p = plot(...)
draw(PNG(6inch, 3inch), p)

see ?SVG, ?PDF, ?PNG for more info.

Mattriks
  • 171
  • 4