Skip to content

Commit

Permalink
Merge pull request #30 from greimel/gre/ggplot2
Browse files Browse the repository at this point in the history
Improving ggplot2 theme
  • Loading branch information
mkborregaard authored Nov 19, 2018
2 parents 8e7f69e + 94e6427 commit 959e36a
Showing 1 changed file with 35 additions and 7 deletions.
42 changes: 35 additions & 7 deletions src/ggplot2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,42 @@
# fglegend = :lightgray,
# fgguide = :black)

const _ggplot_colors = Dict(
:gray92 => RGB(fill(0.92, 3)...),
:gray20 => RGB(fill(0.2, 3)...),
:gray30 => RGB(fill(0.3, 3)...)
)


_themes[:ggplot2] = PlotTheme(
## Background etc
bg = :white,
bginside = :lightgray,
bglegend = plot_color(:lightgray, 0.8),
framestyle = :grid,
gridcolor = :white,
gridalpha = 1,
fgtext = :grey,
bginside = _ggplot_colors[:gray92],
bglegend = _ggplot_colors[:gray92],
fglegend = :white,
fgguide = :black,
)
widen=true,
## Axes / Ticks
#framestyle = :grid,
#foreground_color_tick = _ggplot_colors[:gray20], # tick color not yet implemented
foreground_color_axis = _ggplot_colors[:gray20], # tick color
tick_direction=:out,
foreground_color_border =:white, # axis color
foreground_color_text = _ggplot_colors[:gray30], # tick labels
gridlinewidth = 1,
#tick label size = *0.8,
### Grid
foreground_color_grid = :white,
gridalpha = 1,
### Minor Grid
minorgrid = true,
minorgridalpha = 1,
minorgridlinewidth=0.5, # * 0.5
foreground_color_minor_grid=:white,
#foreground_color_minortick=:white, ## not yet implemented
minorticks = 2,
## Lines and markers
markerstrokealpha = 0,
markerstrokewidth = 0
#showaxis= :false
)

0 comments on commit 959e36a

Please sign in to comment.