Gadfly.jl icon indicating copy to clipboard operation
Gadfly.jl copied to clipboard

Add ability to control key background and outline in Theme

Open tlnagy opened this issue 3 years ago • 2 comments

If placing the key inside a plot, it would be nice to be able to set the key background color and outline. For example, for this plot style, it would be to have a white background and black outline for the key too.

image

tlnagy avatar Jan 25 '21 01:01 tlnagy

The way to do this would be similar to #1458,. Make a new struct like:

struct BoxFormat
    fill
    stroke
    linewidth
    etc
end

which could be accepted by new Theme fields e.g. Theme(panelbox=boxformat(...), keybox=boxformat(...)). For panel and background, the old Theme fields (panel_fill, panel_stroke etc) can be deprecated.

Mattriks avatar Jan 25 '21 02:01 Mattriks

I think that's a good idea. Going forward, I think Theme would benefit from a hierarchical construction which also allows sharing of subthemes in a CSS-like manner.

tlnagy avatar Jan 25 '21 03:01 tlnagy