Thanks to both for the answers! Trying to get my head around the 
unconventional(?) way of doing things in Compose, your explanation really 
clarified things a lot, Daniel. 

For the current problem I'll go with the simpler solution, but I had been 
wondering how to go about combining things in a for loop, so the example 
from the plotting library clears that up as well. 

On Monday, May 11, 2015 at 2:12:40 PM UTC+2, Peter Kristan wrote:
>
>
> compose(context(),
>         circle([0.25, 0.5, 0.75], [0.25, 0.5, 0.75], [0.1]),
>         fill([LCHab(92, 10, 77), LCHab(68, 74, 192), LCHab(78, 84, 29)]))
>
> This code draws 3 circles in their respective colors defined in fill()
>
> The code bellow is what I tried, but all the circles turned out green. How 
> would I make it so that that first circle would be bisque, the second red, 
> and the third green?
>
> circles = [circle(717.0,469.0,100.0),circle(387.0,265.0,100.0),circle(
> 737.0,25.0,100.0)]
> fills = [fill("bisque"), fill("red"), fill("green")]
>
> composition = compose(context(units=UnitBox(0,0,1000,1000)),
>         circles...,
>         fills...
>         )
>
> Something like this, only from arrays:
> compose(context(),
>         circle([0.25, 0.5, 0.75], [0.25, 0.5, 0.75], [0.1]),
>         fill([LCHab(92, 10, 77), LCHab(68, 74, 192), LCHab(78, 84, 29)]))
>
>
> Thanks!
>

Reply via email to