dummy-link

PlotThemes

Themes for the Julia plotting package Plots.jl

Readme

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")

Note: This is a relatively new package, and so colors and theme names may change.

using StatPlots, RDatasets, Distributions

# choose the dark theme (or sand/solarized/etc)
theme(:dark)

# some data
iris = dataset("datasets","iris")
singers = dataset("lattice","singer")
M = randn(1000,4)
M[:,2] += 0.8sqrt(abs(M[:,1])) - 0.5M[:,3] + 5
M[:,3] -= 0.7M[:,1].^2 + 2

# marginalhist, corrplot, and cornerplot
mp = marginalhist(iris, :PetalLength, :PetalWidth)
cp = corrplot(M, label = ["x$i" for i=1:4])
cp2 = cornerplot(M)

# violin/boxplot
vp = violin(singers,:VoicePart,:Height)
boxplot!(singers,:VoicePart,:Height)

# Distributions
np = plot(Normal(3,5), fill=(0, .5,:orange))
dist = Gamma(2)
gp = scatter(dist, leg=false)
bar!(dist, func=cdf, alpha=0.3)

# Regular line plot
lp = plot(cumsum(randn(30,5)).^2,lw=1.5, xlabel = "the x's", ylabel = "the y's")

# Open-High-Low-Close plot
n = 20
hgt = rand(n) + 1
bot = randn(n)
openpct = rand(n)
closepct = rand(n)
y = OHLC[(openpct[i] * hgt[i] + bot[i],bot[i] + hgt[i],bot[i],closepct[i] * hgt[i] + bot[i]) for i = 1:n]
oh = ohlc(y)

# put them all together in a 4x2 grid
plot(mp, cp, cp2, vp, np, gp, lp, oh, layout=(4,2), size=(1000,2000))

dark

Or using the :sand theme. sand

Lime

lime

Orange

orange

Solarized

Using :solarized. solarized dark theme

Using :solarized_light. solarized light theme

First Commit

05/04/2016

Last Touched

about 2 months ago

Commits

37 commits