To answer question #1 only, this works ...

using Winston, KernelDensity

k = kde(rand(100))

fieldnames(k)

# outputs ...

# 2-element Array{Symbol,1}:
# :x      
# :density

f = FillBelow(k.x, k.density, color="blue")
p = FramedPlot()
add(p,f)

<https://lh3.googleusercontent.com/-j5ydICGZNtY/VkIpn7U0oPI/AAAAAAAACI8/4USaNIp9h6k/s1600/Screen%2BShot%2B2015-11-10%2Bat%2B12.28.35%2BPM.png>













So now the only question is how to split this into two colors.







On Tuesday, November 10, 2015 at 11:55:20 AM UTC-5, milktrader wrote:
>
> Suppose you have a density plot ...
>
> using Winston, KernelDensity
>
> k = kde(rand(100))
>
> Winston.plot(k)
>
> Which would look something similar to this:
>
>
> <https://lh3.googleusercontent.com/-niF7G-oaS5k/VkIgzW2Z-WI/AAAAAAAACIc/lzgixalvsuI/s1600/Screen%2BShot%2B2015-11-10%2Bat%2B11.51.54%2BAM.png>
> 1) How can you fill below the curve with color? The two candidates 
> for available methods include FillBelow()and FillBetween().
>
> 2) Is it then possible to fill below the curve from 0:0.5 with one color 
> and below the curve from 0.5:1 with another color?
>

Reply via email to