3

This post shows how to make the outline of points in a scatter plot black.

How can I make the outline of bars in a bar plot black? I have a white bar that will not show up with a white background. The following code does not provide a black outline around the bars.

    barplot = plot(df, x="Atom", y="E", 
          Geom.bar, Scale.x_discrete, 
          Guide.xlabel("Atom"), Guide.ylabel("Energy (kJ/mol)"),
          color=df[:Atom], Guide.colorkey("Atom"),
          Scale.color_discrete_manual(colors...),
          Theme(background_color=color("white"), 
                discrete_highlight_color = u -> LCHab(0,0,0))
          )

P.S. colors is an array of e.g. RBG(1.0, 0.0, 0.0) values.

enter image description here

Community
  • 1
  • 1
Cokes
  • 3,743
  • 6
  • 30
  • 41
  • 3
    Diving deep into the `Gadfly` code, there seems to be no current provision for drawing the outline of a bar. Perhaps filing a new [Gadfly Issue](https://github.com/dcjones/Gadfly.jl/issues) describing what you want will get some notice. – rickhg12hs Mar 28 '15 at 13:19

1 Answers1

2
Theme(bar_highlight=color("dark grey"))

Issue created and solved. https://github.com/dcjones/Gadfly.jl/issues/571

Cokes
  • 3,743
  • 6
  • 30
  • 41