简体   繁体   English

在 Gadfly 中绘制图层列表

[英]Plotting list of layers in Gadfly

I have a list of Gadfly layers with an unknown size:我有一个未知大小的 Gadfly 层列表:

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.但是 Gadfly 期望多个单层,而不是层列表。 So plot(lines) doesn't work but plot(lines[1], lines[2], lines[3]) does.所以plot(lines)不起作用,但plot(lines[1], lines[2], lines[3])起作用。

In Python I'd just use the splat operator plot(*lines) .在 Python 中,我只使用 splat 运算符plot(*lines)

How can do something like this in Julia?如何在 Julia 中做这样的事情?

试着用...

plot(lines...)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM