-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Solarize_Light2 #3851
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
Solarize_Light2 #3851
Changes from 1 commit
3afdbf8
79fc1f8
a9e83a4
668b025
6ab82cc
3fcd6d1
f8faf18
70d5d99
f85ba42
79c0e86
c17c07d
a42bc6f
4a48fc6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
No changes to the mplstyle.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
""" | ||
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( ) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# 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' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lets get these things lined up nicely, please (through out the file). I suspect there is a mix of tabs and spaces. |
||
#orange ='#cb4b16' | ||
|
||
|
||
figure.facecolor : FDF6E3 | ||
|
||
patch.facecolor : eee8d5 # Not sure what this does | ||
patch.antialiased : True | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some of these entries are not related to coloring. Perhaps they should be taken out? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Like the tick direction? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, like the tick direction. It is up to you, it is your style that you are creating, and we don't have any set rules or guidelines yet. But matplotlib has the ability to mix style files, so it might make sense to keep them logically organized. If not, that's fine, too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmmm... I was hoping to closely align it with my perceived intentions of the original palette including fonts. Let me know if you disagree and I will change it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I re-read this from http://matplotlib.org/users/style_sheets.html
I will make it just about the color scheme ... |
||
|
||
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 | ||
|
There was a problem hiding this commen 8000 t.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have a file extension.