How to shorten plot(p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8], layout=(4,2))?

The code below works:

a = [1,2,3]; b = [-1,-2,-3];c = [5,6,7]; d=[-5,-6,-7]
p = Vector(2)
p[1] = plot([a b])
p[2] = plot([c d])
plot(p[1], p[2], layout=(1,2))

But, for 8 graphs, for example, the last line gets long

plot(p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8], layout=(4,2))

How can I make it shorter?

plot(p..., layout=(4,2))

6 Likes

Wow, it worked :grin: Thank you.

No worries, happy coding!

1 Like