I'm trying to get my empirical cumulative density curves to have their backgrounds filled but can't seem to get it going.
I've tried the following two approaches, the first which appears to change the alpha of the curve and not the fill
ggplot( myDataFrame , aes( x=myVariable , fill=myFactor ) ) +
geom_step ( stat="ecdf" , aes( colour = myFactor ) , alpha=1 ) +
coord_cartesian( xlim = c( 0 , quantile( myDataFrame$myVariable , prob=0.99 ) ) ) +
facet_grid ( myFactor ~ . , scales="free_y" )
The second appears to be equilavent to the above
ggplot( myDataFrame , aes( x=myVariable , fill=myFactor ) ) +
stat_ecdf ( aes( colour = myFactor ) ,alpha=0.2 ) +
coord_cartesian( xlim = c( 0 , quantile( myDataFrame$myVariable , prob=0.99 ) ) ) +
facet_grid ( myFactor ~ . , scales="free_y" )
I wonder too if it will fill the 100% across the full xlim for factor levels which saturate early.