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

Skip to content

Sty solarized #9026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 17, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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
  • Loading branch information
ilivni authored and tacaswell committed Aug 13, 2017
commit b7ad0f2d8a999251fed73c98308f63ccb9aab5bb
20 changes: 20 additions & 0 deletions LICENSE/Solarized.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
https://github.com/altercation/solarized/blob/master/LICENSE
Copyright (c) 2011 Ethan Schoonover

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
34 changes: 34 additions & 0 deletions examples/style_sheets/plot_solarizedlight2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""
Version 0.1
This shows an example of "Solarized_Light2" styling, which
tries to replicate the styles of:
- http://ethanschoonover.com/solarized
- https://github.com/jrnold/ggthemes
- http://pygal.org/builtin_styles/#idlight-solarized

and work of:
- https://github.com/tonysyu/mpltools

using all 8 accents of the color palette - starting with blue

ToDo:
- Create alpha values for bar and stacked charts. .33 or .5
- Apply Layout Rules
"""
from matplotlib import pyplot as plt
import numpy as np
x = np.linspace(0, 10)
with plt.style.context('Solarize_Light2'):
plt.plot(x, np.sin(x) + x + np.random.randn(50))
plt.plot(x, np.sin(x) + 2 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 3 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 4 + np.random.randn(50))
plt.plot(x, np.sin(x) + 5 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 6 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 7 * x + np.random.randn(50))
plt.plot(x, np.sin(x) + 8 * x + np.random.randn(50))
#Number of accent colors in the color scheme
plt.title('8 Random Lines - Line')
plt.xlabel('x label', fontsize=14)
plt.ylabel('y label', fontsize=14)
plt.show( )
54 changes: 54 additions & 0 deletions lib/matplotlib/mpl-data/stylelib/Solarize_Light2.mplstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Solarized color palette taken from http://ethanschoonover.com/solarized
# Inspired by, and copied from ggthemes https://github.com/jrnold/ggthemes

#TODO:
# 1. Padding to title from face
# 2. Remove top & right ticks
# 3. Give Title a Magenta Color(?)

#base00 ='#657b83'
#base01 ='#93a1a1'
#base2 ='#eee8d5'
#base3 ='#fdf6e3'
#base01 ='#586e75'
#Magenta ='#d33682'
#Blue ='#268bd2'
#cyan ='#2aa198'
#violet ='#6c71c4'
#green ='#859900'
#orange ='#cb4b16'

figure.facecolor : FDF6E3

patch.facecolor : eee8d5 # Not sure what this does
patch.antialiased : True

lines.linewidth : 2.0
lines.solid_capstyle: butt

axes.titlesize : 16
axes.labelsize : 12
axes.labelcolor : 657b83
axes.facecolor : eee8d5
axes.edgecolor : eee8d5
axes.axisbelow : True
axes.color_cycle : 268BD2, 2AA198, 859900, B58900, CB4B16, DC322F, D33682, 6C71C4
# Blue
# Cyan
# Green
# Yellow
# Orange
# Red
# Magenta
# Violet
axes.grid : True
grid.color : fdf6e3 # grid color
grid.linestyle : - # line
grid.linewidth : 1 # in points

### TICKS
xtick.color : 657b83
xtick.direction : out

ytick.color : 657b83
ytick.direction : out