Search code examples
juliagadfly

Outline around bars in bar plot in Gadfly


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


Solution

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

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