add kpfonts and change mpl prologue to load kpfonts and updated style
This commit is contained in:
BIN
scripts/fonts/KpMath-Bold.otf
Normal file
BIN
scripts/fonts/KpMath-Bold.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpMath-Light.otf
Normal file
BIN
scripts/fonts/KpMath-Light.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpMath-Regular.otf
Normal file
BIN
scripts/fonts/KpMath-Regular.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpMath-Sans.otf
Normal file
BIN
scripts/fonts/KpMath-Sans.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpMath-Semibold.otf
Normal file
BIN
scripts/fonts/KpMath-Semibold.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpMono-Bold.otf
Normal file
BIN
scripts/fonts/KpMono-Bold.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpMono-BoldItalic.otf
Normal file
BIN
scripts/fonts/KpMono-BoldItalic.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpMono-Italic.otf
Normal file
BIN
scripts/fonts/KpMono-Italic.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpMono-Regular.otf
Normal file
BIN
scripts/fonts/KpMono-Regular.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpRoman-Bold.otf
Normal file
BIN
scripts/fonts/KpRoman-Bold.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpRoman-BoldItalic.otf
Normal file
BIN
scripts/fonts/KpRoman-BoldItalic.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpRoman-Italic.otf
Normal file
BIN
scripts/fonts/KpRoman-Italic.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpRoman-Light.otf
Normal file
BIN
scripts/fonts/KpRoman-Light.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpRoman-LightItalic.otf
Normal file
BIN
scripts/fonts/KpRoman-LightItalic.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpRoman-Regular.otf
Normal file
BIN
scripts/fonts/KpRoman-Regular.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpRoman-Semibold.otf
Normal file
BIN
scripts/fonts/KpRoman-Semibold.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpRoman-SemiboldItalic.otf
Normal file
BIN
scripts/fonts/KpRoman-SemiboldItalic.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpSans-Bold.otf
Normal file
BIN
scripts/fonts/KpSans-Bold.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpSans-BoldItalic.otf
Normal file
BIN
scripts/fonts/KpSans-BoldItalic.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpSans-Italic.otf
Normal file
BIN
scripts/fonts/KpSans-Italic.otf
Normal file
Binary file not shown.
BIN
scripts/fonts/KpSans-Regular.otf
Normal file
BIN
scripts/fonts/KpSans-Regular.otf
Normal file
Binary file not shown.
36
scripts/matplotlib-stylelib/my-tex.mplstyle
Normal file
36
scripts/matplotlib-stylelib/my-tex.mplstyle
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# https://matplotlib.org/stable/tutorials/introductory/customizing.html
|
||||||
|
|
||||||
|
# font
|
||||||
|
font.family: serif # family via latex
|
||||||
|
text.usetex: True
|
||||||
|
text.latex.preamble: \usepackage{kpfonts}
|
||||||
|
|
||||||
|
# size
|
||||||
|
savefig.bbox: tight
|
||||||
|
|
||||||
|
# color page area
|
||||||
|
figure.facecolor: 0C1C2300 # 'paper color not chart area'
|
||||||
|
savefig.facecolor: auto # 'paper color not chart area' auto = same as figure
|
||||||
|
savefig.transparent: False
|
||||||
|
|
||||||
|
# color chart area
|
||||||
|
axes.facecolor: FFFFFF07 # low white alpha; a little brighter than background
|
||||||
|
axes.edgecolor: FFFFFF20
|
||||||
|
legend.facecolor: 0C1C23 # no alpha setable
|
||||||
|
legend.frameon: True # background color
|
||||||
|
legend.framealpha: 0.75
|
||||||
|
legend.edgecolor: 606060
|
||||||
|
grid.color: FFFFFF
|
||||||
|
grid.alpha: 0.1
|
||||||
|
|
||||||
|
# color text
|
||||||
|
text.color: FFFFFFD9 # title, legend
|
||||||
|
xtick.color: 606060 # xtick label and xtick line, but not xlabel
|
||||||
|
xtick.labelcolor: FFFFFFD9 # xtick label, not xtick line
|
||||||
|
ytick.color: 606060 # ytick label and ytick line, but not ylabel
|
||||||
|
ytick.labelcolor: FFFFFFD9 # ytick label, not ytick line
|
||||||
|
axes.labelcolor: FFFFFFD9 # xlabel, ylabel
|
||||||
|
legend.labelcolor: FFFFFFD9
|
||||||
|
|
||||||
|
# color data
|
||||||
|
axes.prop_cycle: cycler('color', ['1F78B4', 'E31A1C', '33A02C', 'FF7F00', '6A3D9A', 'FB9A99', 'B2DF8A', 'FDBF6F', 'A6CEE3', 'CAB2D6'])
|
||||||
41
scripts/matplotlib-stylelib/my.mplstyle
Normal file
41
scripts/matplotlib-stylelib/my.mplstyle
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# https://matplotlib.org/stable/tutorials/introductory/customizing.html
|
||||||
|
|
||||||
|
# font
|
||||||
|
font.family: KpRoman, serif
|
||||||
|
text.usetex: False
|
||||||
|
mathtext.fontset: custom
|
||||||
|
mathtext.rm: KpMath
|
||||||
|
mathtext.bf: KpRoman:bold
|
||||||
|
mathtext.it: KpRoman:italic
|
||||||
|
mathtext.sf: KpSans
|
||||||
|
mathtext.tt: KpMono
|
||||||
|
|
||||||
|
# size
|
||||||
|
savefig.bbox: tight
|
||||||
|
|
||||||
|
# color page area
|
||||||
|
figure.facecolor: 0C1C2300 # 'paper color not chart area'
|
||||||
|
savefig.facecolor: auto # 'paper color not chart area' auto = same as figure
|
||||||
|
savefig.transparent: False
|
||||||
|
|
||||||
|
# color chart area
|
||||||
|
axes.facecolor: FFFFFF07 # low white alpha; a little brighter than background
|
||||||
|
axes.edgecolor: FFFFFF20
|
||||||
|
legend.facecolor: 0C1C23 # no alpha setable
|
||||||
|
legend.frameon: True # background color
|
||||||
|
legend.framealpha: 0.75
|
||||||
|
legend.edgecolor: 606060
|
||||||
|
grid.color: FFFFFF
|
||||||
|
grid.alpha: 0.1
|
||||||
|
|
||||||
|
# color text
|
||||||
|
text.color: FFFFFFD9 # title, legend
|
||||||
|
xtick.color: 606060 # xtick label and xtick line, but not xlabel
|
||||||
|
xtick.labelcolor: FFFFFFD9 # xtick label, not xtick line
|
||||||
|
ytick.color: 606060 # ytick label and ytick line, but not ylabel
|
||||||
|
ytick.labelcolor: FFFFFFD9 # ytick label, not ytick line
|
||||||
|
axes.labelcolor: FFFFFFD9 # xlabel, ylabel
|
||||||
|
legend.labelcolor: FFFFFFD9
|
||||||
|
|
||||||
|
# color data
|
||||||
|
axes.prop_cycle: cycler('color', ['1F78B4', 'E31A1C', '33A02C', 'FF7F00', '6A3D9A', 'FB9A99', 'B2DF8A', 'FDBF6F', 'A6CEE3', 'CAB2D6'])
|
||||||
@@ -903,7 +903,24 @@ usage: #+HEADER: :prologue (mpl-prologue)
|
|||||||
"
|
"
|
||||||
(by-backend (latex "")
|
(by-backend (latex "")
|
||||||
(article-latex "")
|
(article-latex "")
|
||||||
(t "import matplotlib.pyplot as plt;plt.style.use('dark_background');"))))
|
(t (format "\
|
||||||
|
import matplotlib.font_manager
|
||||||
|
kpfonts = matplotlib.font_manager.findSystemFonts(fontpaths=['%s'])
|
||||||
|
[matplotlib.font_manager.fontManager.addfont(i) for i in kpfonts]
|
||||||
|
|
||||||
|
import matplotlib.style
|
||||||
|
matplotlib.style.reload_library()
|
||||||
|
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
styles = plt.style.core.read_style_directory('%s')
|
||||||
|
plt.style.core.update_nested_dict(plt.style.library, styles)
|
||||||
|
try:
|
||||||
|
plt.style.use('my')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
"
|
||||||
|
(concat config-dir "scripts/fonts")
|
||||||
|
(concat config-dir "scripts/matplotlib-stylelib")))))
|
||||||
|
|
||||||
(use-package ol-notmuch
|
(use-package ol-notmuch
|
||||||
:after (org))
|
:after (org))
|
||||||
|
|||||||
Reference in New Issue
Block a user