juliagadfly

Is it possible to hide the point "edge" in Gadfly?


In Matlab, points have a MarkerEdgeColor that can be set to "None" (or any other color). In Julia, using Gadfly, points (Geom.point) in discrete color space have a white edge and points in continuous color space have a dark highlighted edge. I want to suppress that, so there is no "edge".


Solution

  • Searching on google found this issue on GitHub. But the solutions suggested there Theme(discrete_highlight_color=c->nothing) did not work for me.

    Looking at the code for Geom.Point, I found that line 80 referred to a theme.highlight_width. Setting this to 0 worked for me.

    using Gadfly
    using DataFrames
    
    df = DataFrame(x = randn(100), y=randn(100), c=rand(100))
    plot(df, x=:x,y=:y,color=:c, Geom.point)
    t = Theme(highlight_width=0)
    plot(df, x=:x,y=:y,color=:c, Geom.point,t)