x = rnorm(100)
plotHist = function(shade = .5) hist(x, col=gray(shade))
group = ggroup(horizontal =FALSE, container=TRUE)
glabel("Slide value to adjust shade", container=group)
gslider(from=0,to=1,by=0.05,value=.5, container=group,
handler=function(h,...) plotHist(svalue(h$obj)))
Run the code above in your browser using DataLab