 <p>If you want to specify a literal color value in a geom_segment, you should not include it in the <code>aes()</code>. For example using this test data</p> <pre><code>DF_for_plotting &lt;- data.frame( variable=rep("StrpCnCor",4), value=c(0, 50.79330935, 81.127731, 100) ) </code></pre> <p>you can do</p> <pre><code>ggplot() + geom_segment(data=DF_for_plotting, aes(x=value[1], xend=value[2]-0.001, y=1, yend=1), colour="green", size=10) + geom_segment(data=DF_for_plotting, aes(x=value[2], xend=value[3]-0.001, y=1, yend=1), colour="blue", size=10) + geom_segment(data=DF_for_plotting, aes(x=value[3], xend=value[4]-0.001, y=1, yend=1), colour="red", size=10) </code></pre> <p><img src="https://i.stack.imgur.com/IX6yc.png" alt="enter image description here"></p> <p>or with hex colors</p> <pre><code>ggplot() + geom_segment(data=DF_for_plotting, aes(x=value[1], xend=value[2]-0.001, y=1, yend=1), colour="#9999CC", size=10) + geom_segment(data=DF_for_plotting, aes(x=value[2], xend=value[3]-0.001, y=1, yend=1), colour="#66CC99", size=10) + geom_segment(data=DF_for_plotting, aes(x=value[3], xend=value[4]-0.001, y=1, yend=1), colour="#CC6666", size=10) </code></pre> <p><img src="https://i.stack.imgur.com/OBrPF.png" alt="enter image description here"></p> <p>Although because you're not mapping anything to the color aesthetic, no legend will be provided.</p> <p>When you put it in the <code>aes()</code>, you're not specifying a literal value, you are just specifying a literal value to associate with a color it doesn't matter if you use <code>aes(color="red")</code> or <code>aes(color="determination")</code>; it just treats it as a literal character value and will use it's own color palate to assign a color to that character value. You can specify your own colors with <code>scale_fill_manual</code> For example</p> <pre><code>ggplot() + geom_segment(data=DF_for_plotting, aes(x=value[1], xend=value[2]-0.001, y=1, yend=1, colour="a"), , size=10) + geom_segment(data=DF_for_plotting, aes(x=value[2], xend=value[3]-0.001, y=1, yend=1, colour="b"), , size=10) + geom_segment(data=DF_for_plotting, aes(x=value[3], xend=value[4]-0.001, y=1, yend=1, colour="c"), size=10) + scale_color_manual(values=c(a="green",b="blue",c="red")) </code></pre> <p><img src="https://i.stack.imgur.com/TFmmf.png" alt="enter image description here"></p> <pre><code>ggplot() + geom_segment(data=DF_for_plotting, aes(x=value[1], xend=value[2]-0.001, y=1, yend=1, colour="a"), , size=10) + geom_segment(data=DF_for_plotting, aes(x=value[2], xend=value[3]-0.001, y=1, yend=1, colour="b"), , size=10) + geom_segment(data=DF_for_plotting, aes(x=value[3], xend=value[4]-0.001, y=1, yend=1, colour="c"), size=10) + scale_color_manual(values=c(a="#9999CC",b="#66CC99",c="#CC6666")) </code></pre> <p><img src="https://i.stack.imgur.com/F5s4o.png" alt="enter image description here"></p> <p>Here i called the three groups "a", "b", and "c" but you could also call then "green","blue","red" if you want -- it just seems odd to have a legend that tells you what color is green.</p>