Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Note in README, and an image #74

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Currently the following themes are available:
- `:solarized_light`
- `:wong`
- `:wong2`
- `:boxed`
- `:gruvbox_dark`
- `:gruvbox_light`
- `:bright`
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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.
Binary file added image.png
mmikhasenko marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/PlotThemes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -65,6 +66,7 @@ const _themes = Dict{Symbol, PlotTheme}([
:mute => _mute,
:wong => _wong,
:wong2 => _wong2,
:boxed => _boxed,
:juno => _juno,
:lime => _lime,
:orange => _orange,
Expand Down
16 changes: 16 additions & 0 deletions src/boxed.jl
Original file line number Diff line number Diff line change
@@ -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])
]))
Loading