Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5044788

Browse files
authored
Merge pull request #9026 from tacaswell/sty_solaized
Sty solarized
2 parents 5fd199c + ae1ddb7 commit 5044788

File tree

3 files changed

+113
-0
lines changed

3 files changed

+113
-0
lines changed

LICENSE/Solarized.txt

Lines changed: 20 additions & 0 deletions
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.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
"""
2+
==========================
3+
Solarized Light stylesheet
4+
==========================
5+
6+
This shows an example of "Solarized_Light" styling, which
7+
tries to replicate the styles of:
8+
9+
- `<http://ethanschoonover.com/solarized>`__
10+
- `<https://github.com/jrnold/ggthemes>`__
11+
- `<http://pygal.org/en/stable/documentation/builtin_styles.html#light-solarized>`__
12+
13+
and work of:
14+
15+
- `<https://github.com/tonysyu/mpltools>`__
16+
17+
using all 8 accents of the color palette - starting with blue
18+
19+
ToDo:
20+
- Create alpha values for bar and stacked charts. .33 or .5
21+
- Apply Layout Rules
22+
"""
23+
from matplotlib import pyplot as plt
24+
import numpy as np
25+
x = np.linspace(0, 10)
26+
with plt.style.context('Solarize_Light2'):
27+
plt.plot(x, np.sin(x) + x + np.random.randn(50))
28+
plt.plot(x, np.sin(x) + 2 * x + np.random.randn(50))
29+
plt.plot(x, np.sin(x) + 3 * x + np.random.randn(50))
30+
plt.plot(x, np.sin(x) + 4 + np.random.randn(50))
31+
plt.plot(x, np.sin(x) + 5 * x + np.random.randn(50))
32+
plt.plot(x, np.sin(x) + 6 * x + np.random.randn(50))
33+
plt.plot(x, np.sin(x) + 7 * x + np.random.randn(50))
34+
plt.plot(x, np.sin(x) + 8 * x + np.random.randn(50))
35+
# Number of accent colors in the color scheme
36+
plt.title('8 Random Lines - Line')
37+
plt.xlabel('x label', fontsize=14)
38+
plt.ylabel('y label', fontsize=14)
39+
40+
plt.show()
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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.antialiased : True
24+
25+
lines.linewidth : 2.0
26+
lines.solid_capstyle: butt
27+
28+
axes.titlesize : 16
29+
axes.labelsize : 12
30+
axes.labelcolor : 657b83
31+
axes.facecolor : eee8d5
32+
axes.edgecolor : eee8d5
33+
axes.axisbelow : True
34+
axes.prop_cycle : cycler('color', ['268BD2', '2AA198', '859900', 'B58900', 'CB4B16', 'DC322F', 'D33682', '6C71C4'])
35+
# Blue
36+
# Cyan
37+
# Green
38+
# Yellow
39+
# Orange
40+
# Red
41+
# Magenta
42+
# Violet
43+
axes.grid : True
44+
grid.color : fdf6e3 # grid color
45+
grid.linestyle : - # line
46+
grid.linewidth : 1 # in points
47+
48+
### TICKS
49+
xtick.color : 657b83
50+
xtick.direction : out
51+
52+
ytick.color : 657b83
53+
ytick.direction : out

0 commit comments

Comments
 (0)