title: Gradient Fill in Bar Graph
body: <p>I'm looking at behavior of different groups of people (called <code>Clusters</code> in this data set) and their preference for the type of browser they use.  I want to create a bar graph that shows the percentage of each cluster that is using each type of browser.</p>
  
  <p>Here is some code to generate a similar dataset (please ignore that the percentages for each cluster will not add up to 1):</p>
  
  <pre><code>browserNames &lt;- c("microsoft","mozilla","google")
  clusterNames &lt;- c("Cluster 1","Cluster 2","Cluster 3")
  percentages &lt;- runif(n=length(browserNames)*length(clusterNames),min=0,max=1)
  
  myData&lt;-as.data.frame(list(browserNames=rep(browserNames,3),
                             clusterNames=rep(clusterNames,each=3),
                             percentages=percentages))
  </code></pre>
  
  <p>Here's the code I've been able to come up with so far to get the graph I desire:</p>
  
  <pre><code>ggplot(myData, aes(x=browserNames, y=percentages, fill=factor(clusterNames))) +
      geom_bar(stat="identity",position="dodge") +
      scale_y_continuous(name="Percent Weight", labels=percent)
  </code></pre>
  
  <p>I want the fill for each cluster to be a gradient fill with high and low values that I determine.  So, in this example, I would like to be able to set 3 high and low values for each cluster that is represented.</p>
  
  <p>I've had trouble with the different scale_fill commands, and I'm new enough to ggplot that I am pretty sure I'm probably just doing it wrong.  Any ideas?</p>
  
  <p>Edit:  Here is a picture of what I'm looking for:</p>
  
  <p><img src="https://i.stack.imgur.com/80vMC.png" alt="enter image description here"></p>
  
  <p>(Original image available at <a href="https://www.dropbox.com/s/py6hifejqz7k54v/gradientExample.bmp" rel="nofollow noreferrer">https://www.dropbox.com/s/py6hifejqz7k54v/gradientExample.bmp</a>)</p>