Skip to content

JuliaPlots/PlotThemes.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WARNING

https://github.com/JuliaPlots/PlotThemes.jl is now integrated into https://github.com/JuliaPlots/Plots.jl for Plots v2, please make corresponding PRs there.

PlotThemes

Build Status

Primary author: Patrick Kofod Mogensen (@pkofod)

PlotThemes is a package to spice up the plots made with Plots.jl. To install:

Pkg.add("PlotThemes")

Using PlotThemes

Currently the following themes are available:

  • :default
  • :dark
  • :ggplot2
  • :juno
  • :lime
  • :orange
  • :sand
  • :solarized
  • :solarized_light
  • :wong
  • :wong2
  • :boxed
  • :gruvbox_dark
  • :gruvbox_light
  • :bright
  • :vibrant
  • :mute
  • :dao
  • :dracula
  • :rose_pine
  • :rose_pine_dawn

When using Plots, a theme can be set using the theme function:

using Plots
theme(thm::Symbol; kwargs...)

theme accepts any Plots attribute as keyword argument and sets its value as default for subsequent plots.

Themes can be previewed using Plots.showtheme(thm::Symbol):

:default

theme_default

:dark

theme_dark

:ggplot2

theme_ggplot2

:juno

theme_juno

:lime

theme_lime

:orange

theme_orange

:sand

theme_sand

:solarized

theme_solarized

:solarized_light

theme_solarized_light

:wong

theme_wong

:wong2

theme_wong2

:boxed

theme_boxed

:gruvbox_dark

theme_gruvbox_dark

:gruvbox_light

theme_gruvbox_light

:bright

theme_bright

:vibrant

theme_vibrant

:mute

theme_mute

:dao

theme_dao

:dracula

theme_dracula

:rose_pine

theme_rose_pine

:rose_pine_dawn

theme_rose_pine_dawn

Contributing

A theme specifies default values for different Plots attributes. At the moment these are typically colors, palettes and colorgradients, but any Plots attribute can be controlled by a theme in general. PRs for new themes very welcome! Adding a new theme (e.g. mytheme) is as easy as adding a new file (mytheme.jl) that contains at least the following line:

_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

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.