Hello,

I was experimenting with plotting using PyPlot and I wanted to create line 
plots with custom colors. I wanted to use a color palette from 
ColorBrewer.jl, which returns the colors as an array of ColorTypes colors. 
I wanted to convert the returned colors to a Tuple, e.g. 
(0.894,0.102,0.11), in order to pass it to PyPlot. The following snippet 
works for me,


using PyPlot

using ColorBrewer

myc=palette("Set1",9)

for i in 1:9 plot(rand(100),c=(comp1(myc[i]),comp2(myc[i]),comp3(myc[i]))) 
end


My question is, is there a convenience function that can directly give me 
the desired tuple, without having to manually construct it using 
(comp1,comp2,comp3)?

Thanks,
Islam

Reply via email to