title: How to plot a histogram with different colors in R
body: <p>I have a dataset of about 500 integer values in a csv file, with each value between 50-89. I am trying to create a histogram in R in which the bars that represent values 50-65 are bronze colored, 66-74 silver, and 75-89 gold. The script I have so far is the following:</p>
  <pre><code>dat1 &lt;- read.csv(&quot;test2.csv&quot;, header=F)$V1
  hist(dat1, main=&quot;Distribution of Player Ratings&quot;, xlim = c(0,99), breaks=c(seq(40,99,5)))
  </code></pre>
  <p>A sample of test2.csv is shown below (extremely simple)</p>
  <pre><code>69,
  68,
  67,
  65,
  65,
  62,
  59,
  59,
  54,
  </code></pre>
  <p>Right now my graph is:</p>
  <p><img src="https://i.stack.imgur.com/r3McN.png" alt="My Graph" /></p>
  <p>What would I have to do in order to fulfill the color guidelines explained earlier?</p>
  <p><em>Note:</em> I had posted this question earlier, but without any of my code or a reference to my dataset.</p>