Skip to content
Themes for Makie
Julia
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
data
img
src
test
.codecov.yml
.gitignore
.travis.yml
LICENSE.md
Project.toml
README.md
ggthemr.md

README.md

MakieThemes

WIP

The idea of this package is to create a collection of themes for Makie to customize the size and look of plot elements and colors. It will initially focus on porting themes from existing plotting packages.

Currently I've started work on a GGThemr library, that aims to emulate the themes at https://github.com/cttobin/ggthemr .

Here's the current default look of Makie on my machine:

using Makie
scene = scatter(randn(20), randn(20), markersize = 0.2)
scatter!(scene, randn(20), randn(20), markersize = 0.2)
scatter!(scene, randn(20), randn(20), markersize = 0.2)
scatter!(scene, randn(20), randn(20), markersize = 0.2)
scatter!(scene, randn(20), randn(20), markersize = 0.2)

default

Using the :fresh theme from GGThemr

using MakieThemes
show_ggthemr(:fresh)

ggthemr

Here's an expanded visualization based on the examples in the source theme:

using CSV, Pkg, MakieThemes, AbstractPlotting, Makie, StatsMakie
for dataset  (:www, :drivers, :mtcars, :diamonds)
  @eval const $(dataset) = CSV.read(dirname(pathof(MakieThemes))*"/../data/"*$(string(dataset))*".tsv", delim = '\t')
end

AbstractPlotting.set_theme!(ggthemr(:fresh))

p1 = scatter(Data(www), :Minute, :Users,
  Group(color = :Measure, marker = :Measure),
  markersize = 6, marker = [:rect, :circle]);

p2 = plot(density, Data(mtcars),
  :mpg, Group(color = :cyl));

p3 = plot(Position.stack, histogram, Data(diamonds),
  :price, Group(color = :cut));

p4 = boxplot(Data(drivers), :Year, :Deaths);

vbox(hbox(p3, p1), hbox(p4, p2))

ggthemr_full

This is the target theme I'm aiming for (image created with R) ggthemr

Current issues:

  • font sizes vary, and the font is too bold
  • alignments across subpanels
  • axis line thickness
  • the period of the dashed line
  • overplotting of the axes by the dashed line
  • the missing legends
  • outliers and median marker for the boxplots
  • reversed colors for the histogram
  • colored fill area
  • labelling of x and y axes
  • implicit position of the 0,0 point within axes
  • no white edge around marker points

Many of these should be addressed in StatsMakie or AbstractPlotting rather than here.

Currently supported theme libraries are:

You can’t perform that action at this time.