Skip to content

Commit b7ad0f2

Browse files
ilivnitacaswell
authored andcommitted
Solarize_Light2
Adapted from ggplot2 Title padding Title color Minor grid width Alpha for graphs with a "fill" Solarized_License Taken from the Solarized Github page: https://github.com/altercation/solarized Example Script No changes to the mplstyle. Changed Name of File File Conventions Conforming to matplolib conventions Deleted Some Empty Lines Failed last Travis regression Get Rid of white spaces 2 Solaraized Light Style File Fixed style sheet remove white spaces Tried setting the user save preference "trim_trailing_white_space_on_save": true 3rd Try White Spaces Used convert tabs -> spaces script Used PSPAD to check whitespace Set Sublime to UNIX Line style endings Tried Unix style line endings with sublime
1 parent 2bc6b59 commit b7ad0f2

File tree

3 files changed

+108
-0
lines changed

3 files changed

+108
-0
lines changed

LICENSE/Solarized.txt

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
https://github.com/altercation/solarized/blob/master/LICENSE
2+
Copyright (c) 2011 Ethan Schoonover
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in
12+
all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20+
THE SOFTWARE.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"""
2+
Version 0.1
3+
This shows an example of "Solarized_Light2" styling, which
4+
tries to replicate the styles of:
5+
- http://ethanschoonover.com/solarized
6+
- https://github.com/jrnold/ggthemes
7+
- http://pygal.org/builtin_styles/#idlight-solarized
8+
9+
and work of:
10+
- https://github.com/tonysyu/mpltools
11+
12+
using all 8 accents of the color palette - starting with blue
13+
14+
ToDo:
15+
- Create alpha values for bar and stacked charts. .33 or .5
16+
- Apply Layout Rules
17+
"""
18+
from matplotlib import pyplot as plt
19+
import numpy as np
20+
x = np.linspace(0, 10)
21+
with plt.style.context('Solarize_Light2'):
22+
plt.plot(x, np.sin(x) + x + np.random.randn(50))
23+
plt.plot(x, np.sin(x) + 2 * x + np.random.randn(50))
24+
plt.plot(x, np.sin(x) + 3 * x + np.random.randn(50))
25+
plt.plot(x, np.sin(x) + 4 + np.random.randn(50))
26+
plt.plot(x, np.sin(x) + 5 * x + np.random.randn(50))
27+
plt.plot(x, np.sin(x) + 6 * x + np.random.randn(50))
28+
plt.plot(x, np.sin(x) + 7 * x + np.random.randn(50))
29+
plt.plot(x, np.sin(x) + 8 * x + np.random.randn(50))
30+
#Number of accent colors in the color scheme
31+
plt.title('8 Random Lines - Line')
32+
plt.xlabel('x label', fontsize=14)
33+
plt.ylabel('y label', fontsize=14)
34+
plt.show( )
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Solarized color palette taken from http://ethanschoonover.com/solarized
2+
# Inspired by, and copied from ggthemes https://github.com/jrnold/ggthemes
3+
4+
#TODO:
5+
# 1. Padding to title from face
6+
# 2. Remove top & right ticks
7+
# 3. Give Title a Magenta Color(?)
8+
9+
#base00 ='#657b83'
10+
#base01 ='#93a1a1'
11+
#base2 ='#eee8d5'
12+
#base3 ='#fdf6e3'
13+
#base01 ='#586e75'
14+
#Magenta ='#d33682'
15+
#Blue ='#268bd2'
16+
#cyan ='#2aa198'
17+
#violet ='#6c71c4'
18+
#green ='#859900'
19+
#orange ='#cb4b16'
20+
21+
figure.facecolor : FDF6E3
22+
23+
patch.facecolor : eee8d5 # Not sure what this does
24+
patch.antialiased : True
25+
26+
lines.linewidth : 2.0
27+
lines.solid_capstyle: butt
28+
29+
axes.titlesize : 16
30+
axes.labelsize : 12
31+
axes.labelcolor : 657b83
32+
axes.facecolor : eee8d5
33+
axes.edgecolor : eee8d5
34+
axes.axisbelow : True
35+
axes.color_cycle : 268BD2, 2AA198, 859900, B58900, CB4B16, DC322F, D33682, 6C71C4
36+
# Blue
37+
# Cyan
38+
# Green
39+
# Yellow
40+
# Orange
41+
# Red
42+
# Magenta
43+
# Violet
44+
axes.grid : True
45+
grid.color : fdf6e3 # grid color
46+
grid.linestyle : - # line
47+
grid.linewidth : 1 # in points
48+
49+
### TICKS
50+
xtick.color : 657b83
51+
xtick.direction : out
52+
53+
ytick.color : 657b83
54+
ytick.direction : out

0 commit comments

Comments
 (0)