diff --git a/README.md b/README.md index 5ce6439..9c67b90 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Currently the following themes are available: - `:solarized_light` - `:wong` - `:wong2` +- `:boxed` - `:gruvbox_dark` - `:gruvbox_light` - `:bright` @@ -77,6 +78,9 @@ Themes can be previewed using `Plots.showtheme(thm::Symbol)`: ### `:wong2` ![theme_wong2](https://user-images.githubusercontent.com/16589944/70847880-eaecac80-1e69-11ea-9b59-cdf937427121.png) +### `:boxed` +![theme_boxed](https://github.com/user-attachments/assets/ed1baaf1-4679-4d9a-9667-3118dc42200e) + ### `:gruvbox_dark` ![theme_gruvbox_dark](https://user-images.githubusercontent.com/16589944/70847882-f049f700-1e69-11ea-94f8-255f2cd17288.png) @@ -112,3 +116,10 @@ PRs for new themes very welcome! Adding a new theme (e.g. `mytheme`) is as easy _themes[:mytheme] = PlotTheme(; kwargs...) ``` The keyword arguments can be any collection of Plots attributes plus a colorgradient keyword argument. +For adding the `showtheme` figure to `README.md`, use +```julia +Plots.showtheme(:your_theme) +plot!(dpi=400) +savefig("your_theme.png") +``` +The image can be uploaded to the `README.md` file by pulling it in with the file-editing web interface. diff --git a/src/PlotThemes.jl b/src/PlotThemes.jl index 08377bf..f00cdc4 100644 --- a/src/PlotThemes.jl +++ b/src/PlotThemes.jl @@ -42,6 +42,7 @@ include("sand.jl") include("lime.jl") include("orange.jl") include("wong.jl") +include("boxed.jl") include("juno.jl") include("gruvbox.jl") include("sheet.jl") @@ -65,6 +66,7 @@ const _themes = Dict{Symbol, PlotTheme}([ :mute => _mute, :wong => _wong, :wong2 => _wong2, + :boxed => _boxed, :juno => _juno, :lime => _lime, :orange => _orange, diff --git a/src/boxed.jl b/src/boxed.jl new file mode 100644 index 0000000..664febb --- /dev/null +++ b/src/boxed.jl @@ -0,0 +1,16 @@ +const _boxed = PlotTheme(Dict([ + :minorticks => true, + :grid => false, + :frame => :box, + :guidefontvalign => :top, + :guidefonthalign => :right, + :foreground_color_legend => nothing, + :legendfontsize => 9, + :legend => :topright, + :xlim => (:auto,:auto), + :ylim => (:auto,:auto), + :label => "", + :palette => expand_palette(colorant"white", [RGB(0,0,0); wong_palette]; + lchoices = [57], + cchoices = [100]) + ]))