Thanks!
On Wednesday, December 31, 2014 8:25:47 PM UTC-6, Daniel Jones wrote:
>
> My mistake, it should work with append! instead of push!.
>
> For your second question, here's one option:
> a, b, c, d = [rand(10) for _ in 1:4]
>
> On Wednesday, December 31, 2014 5:58:15 PM UTC-8, AVF wrote:
>>
>> Sorry, doesn't seem to work:
>>
>> a = rand(10)
>>
>> b = rand(10)
>>
>> c = rand(10)
>>
>> d = rand(10)
>>
>>
>> p = plot(x=a, y=b)
>>
>> push!(p.layers, layer(x=c, y=d))
>>
>> `convert` has no method matching convert(::Type{Layer}, ::Array{Layer,1})
>> while loading In[185], in expression starting on line 9
>>
>> in push! at array.jl:457
>>
>>
>> As an aside, is there a way to do something like:
>>
>> [a b c d] = rand(10,4)
>>
>>
>>
>>
>> On Wednesday, December 31, 2014 11:01:36 AM UTC-6, Daniel Jones wrote:
>>>
>>>
>>> It's not really supported. Adding a "push!" function to add layers to
>>> plots was proposed (https://github.com/dcjones/Gadfly.jl/issues/332),
>>> but I haven't done so yet. In fact, adding layers to a plot p will usually
>>> work with "push!(p.layers, layer(...))", but that's kind of an unofficial
>>> solution.
>>>
>>