Used better variable names for formatting code.
This commit is contained in:
parent
56bea69ea6
commit
b030488cb3
@ -118,18 +118,18 @@ def _decode_dict(data):
|
||||
|
||||
def load_style(directory = '.', name='code/custom.css'):
|
||||
if sys.version_info[0] >= 3:
|
||||
s = json.load(open(os.path.join(directory, "code/538.json")))
|
||||
style = json.load(open(os.path.join(directory, "code/538.json")))
|
||||
else:
|
||||
s = json.load(open(directory + "/code/538.json"), object_hook=_decode_dict)
|
||||
style = json.load(open(directory + "/code/538.json"), object_hook=_decode_dict)
|
||||
|
||||
# matplotlib has deprecated the use of axes.color_cycle as of version
|
||||
|
||||
version = [int(version_no) for version_no in matplotlib.__version__.split('.')]
|
||||
if version[0] > 1 or (version[0] == 1 and version[1] >= 5):
|
||||
s["axes.prop_cycle"] = "cycler('color', ['#6d904f','#013afe', '#202020','#fc4f30','#e5ae38','#A60628','#30a2da','#008080','#7A68A6','#CF4457','#188487','#E24A33'])"
|
||||
s.pop("axes.color_cycle", None)
|
||||
style["axes.prop_cycle"] = "cycler('color', ['#6d904f','#013afe', '#202020','#fc4f30','#e5ae38','#A60628','#30a2da','#008080','#7A68A6','#CF4457','#188487','#E24A33'])"
|
||||
style.pop("axes.color_cycle", None)
|
||||
|
||||
plt.rcParams.update(s)
|
||||
plt.rcParams.update(style)
|
||||
reset_axis ()
|
||||
np.set_printoptions(suppress=True)
|
||||
|
||||
|
@ -1,83 +0,0 @@
|
||||
<link href='http://fonts.googleapis.com/css?family=Fenix' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=Alegreya+Sans:100,300,400,500,700,800,900,100italic,300italic,400italic,500italic,700italic,800italic,900italic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:300,400' rel='stylesheet' type='text/css'>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Computer Modern";
|
||||
src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');
|
||||
}
|
||||
div.cell{
|
||||
width:800px;
|
||||
margin-left:16% !important;
|
||||
margin-right:auto;
|
||||
}
|
||||
h1 {
|
||||
font-family: 'Alegreya Sans', sans-serif;
|
||||
}
|
||||
h2 {
|
||||
font-family: 'Fenix', serif;
|
||||
}
|
||||
h3{
|
||||
font-family: 'Fenix', serif;
|
||||
margin-top:12px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
h4{
|
||||
font-family: 'Fenix', serif;
|
||||
}
|
||||
h5 {
|
||||
font-family: 'Alegreya Sans', sans-serif;
|
||||
}
|
||||
div.text_cell_render{
|
||||
font-family: 'Alegreya Sans',Computer Modern, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
|
||||
line-height: 135%;
|
||||
font-size: 120%;
|
||||
width:600px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
.CodeMirror{
|
||||
font-family: "Source Code Pro";
|
||||
font-size: 90%;
|
||||
}
|
||||
/* .prompt{
|
||||
display: None;
|
||||
}*/
|
||||
.text_cell_render h1 {
|
||||
font-weight: 200;
|
||||
font-size: 50pt;
|
||||
line-height: 100%;
|
||||
color:#CD2305;
|
||||
margin-bottom: 0.5em;
|
||||
margin-top: 0.5em;
|
||||
display: block;
|
||||
}
|
||||
.text_cell_render h5 {
|
||||
font-weight: 300;
|
||||
font-size: 16pt;
|
||||
color: #CD2305;
|
||||
font-style: italic;
|
||||
margin-bottom: .5em;
|
||||
margin-top: 0.5em;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.warning{
|
||||
color: rgb( 240, 20, 20 )
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
MathJax.Hub.Config({
|
||||
TeX: {
|
||||
extensions: ["AMSmath.js"]
|
||||
},
|
||||
tex2jax: {
|
||||
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
|
||||
displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
|
||||
},
|
||||
displayAlign: 'center', // Change this to 'center' to center equations.
|
||||
"HTML-CSS": {
|
||||
styles: {'.MathJax_Display': {"margin": 4}}
|
||||
}
|
||||
});
|
||||
</script>
|
@ -1,60 +0,0 @@
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Computer Modern";
|
||||
src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');
|
||||
}
|
||||
div.cell{
|
||||
width:800px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
h1 {
|
||||
font-family: "Charis SIL", Palatino, serif;
|
||||
}
|
||||
h4{
|
||||
margin-top:12px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
div.text_cell_render{
|
||||
font-family: Computer Modern, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
|
||||
line-height: 145%;
|
||||
font-size: 120%;
|
||||
width:800px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
.CodeMirror{
|
||||
font-family: "Source Code Pro", source-code-pro,Consolas, monospace;
|
||||
}
|
||||
.prompt{
|
||||
display: None;
|
||||
}
|
||||
.text_cell_render h5 {
|
||||
font-weight: 300;
|
||||
font-size: 16pt;
|
||||
color: #4057A1;
|
||||
font-style: italic;
|
||||
margin-bottom: .5em;
|
||||
margin-top: 0.5em;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.warning{
|
||||
color: rgb( 240, 20, 20 )
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
MathJax.Hub.Config({
|
||||
TeX: {
|
||||
extensions: ["AMSmath.js"]
|
||||
},
|
||||
tex2jax: {
|
||||
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
|
||||
displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
|
||||
},
|
||||
displayAlign: 'center', // Change this to 'center' to center equations.
|
||||
"HTML-CSS": {
|
||||
styles: {'.MathJax_Display': {"margin": 4}}
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user