Skip to content

Commit

Permalink
Merge pull request #60 from sefffal/master
Browse files Browse the repository at this point in the history
A new theme (:dao)
  • Loading branch information
mkborregaard authored Feb 5, 2021
2 parents e8986a1 + b02bcde commit be4af2b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Currently the following themes are available:
- `:bright`
- `:vibrant`
- `:mute`
- `:dao`


When using Plots, a theme can be set using the `theme` function:
```julia
Expand Down Expand Up @@ -88,6 +90,10 @@ Themes can be previewed using `Plots.showtheme(thm::Symbol)`:
![theme_mute](https://user-images.githubusercontent.com/16589944/70848069-9860bf80-1e6c-11ea-9cac-8a797d526835.png)


### `:dao`
![theme_dao](https://user-images.githubusercontent.com/7330605/106512313-54de7000-64c9-11eb-98d5-2aee3603879a.png)


## Contributing
A theme specifies default values for different Plots [attributes](http://docs.juliaplots.org/attributes/).
At the moment these are typically colors, palettes and colorgradients, but any Plots attribute can be controlled by a theme in general.
Expand Down
1 change: 1 addition & 0 deletions src/PlotThemes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ include("wong.jl")
include("juno.jl")
include("gruvbox.jl")
include("sheet.jl")
include("dao.jl")

function __init__()
# need to do this here so PlotUtils picks up the change
Expand Down
29 changes: 29 additions & 0 deletions src/dao.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
dao_palette = [
colorant"#d77255",
colorant"#009afa",
colorant"#707070",
colorant"#21ab74",
colorant"#ba3030",
colorant"#9467bd"
]

_themes[:dao] = PlotTheme(
background = :white,
framestyle = :box,
grid=true,
gridalpha=0.4,
linewidth=1.4,
markerstrokewidth=0,
fontfamily = "Computer Modern",
colorgradient = :magma,
guidefontsize=12,
titlefontsize=12,
tickfontsize=8,
palette = dao_palette,
minorgrid=true,
minorticks = 5,
gridlinewidth = 0.7,
minorgridalpha=0.06,
legend=:outertopright,
# marker=:auto
)

0 comments on commit be4af2b

Please sign in to comment.