# Plot data frames with manual color

**URL:** <https://discourse.julialang.org/t/plot-data-frames-with-manual-color/5250>\
**Category:** New to Julia\
**Tags:** plotting, gadfly\
**Created:** [August 6, 2017, 9:02pm UTC](https://discourse.julialang.org/t/plot-data-frames-with-manual-color/5250 "2017-08-06T21:02:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WenlongGong](https://avatars.discourse-cdn.com/v4/letter/w/3d9bf3/32.png) [@WenlongGong](https://discourse.julialang.org/u/WenlongGong)\
**Post date:** [August 6, 2017, 9:02pm UTC](https://discourse.julialang.org/t/plot-data-frames-with-manual-color/5250/1 "2017-08-06T21:02:35Z")

</div>

Hello, I’m trying to plot some complex data frames, a small example could be as following, but with manually set colors instead of the default color it produce. Could anyone help?

```julia
using RDatasets
plot(dataset("car", "SLID"), x="Wages", color="Language", Geom.histogram)

```

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [August 7, 2017, 6:01am UTC](https://discourse.julialang.org/t/plot-data-frames-with-manual-color/5250/2 "2017-08-07T06:01:40Z")

</div>

Perhaps nice to mention this is using Gadfly. There are several good plotting packages for Julia.  
Try checking out the keyword `Scale.color_discrete_manual`, I’d recommend combining this with a package like Colorbrewer.jl or PerceptualColorMaps.jl.

---

<div class="post-metadata">

**Author:** ![WenlongGong](https://avatars.discourse-cdn.com/v4/letter/w/3d9bf3/32.png) [@WenlongGong](https://discourse.julialang.org/u/WenlongGong)\
**Post date:** [August 7, 2017, 6:01pm UTC](https://discourse.julialang.org/t/plot-data-frames-with-manual-color/5250/3 "2017-08-07T18:01:41Z")

</div>

Yes, that’s what I need. Thanks!!
