Stein
Stein

Reputation: 3277

Plotting list of layers in Gadfly

I have a list of Gadfly layers with an unknown size:

lines = [layer(x=x,y=i*x) for i in range(1,stop=3)]

Now I would like to draw all of them in one plot. But Gadfly expects a number of single layers, rather than a list of layers. So plot(lines) doesn't work but plot(lines[1], lines[2], lines[3]) does.

In Python I'd just use the splat operator plot(*lines).

How can do something like this in Julia?

Upvotes: 2

Views: 124

Answers (1)

xiaodai
xiaodai

Reputation: 16014

Try to splat it with ...

plot(lines...)

Upvotes: 1

Related Questions