Skip to content

Commit 47228ff

Browse files
committed
fix the face color problem
1 parent f185b23 commit 47228ff

9 files changed

+49
-13
lines changed

src/smplotlib/__init__.py

+35-3
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ def set_style(usetex=False, fontsize=15, fontweight='normal', figsize=(6, 6), dp
7070
"font.weight": "light",
7171
"axes.labelweight": "light",
7272
"mathtext.fontset": "custom",
73-
"mathtext.bf": "AVHershey Complex:light",
73+
"mathtext.bf": "AVHershey Complex:medium",
7474
"mathtext.cal": "AVHershey Complex:light",
75-
"mathtext.it": "AVHershey Complex:light",
75+
"mathtext.it": "AVHershey Complex:light:italic",
7676
"mathtext.rm": "AVHershey Complex:light",
77-
"mathtext.sf": "AVHershey Complex:light",
77+
"mathtext.sf": "AVHershey Duplex:light",
7878
"mathtext.tt": "AVHershey Complex:light",
7979
"mathtext.fallback": "cm",
8080
"mathtext.default": 'it'
@@ -90,6 +90,38 @@ def set_style(usetex=False, fontsize=15, fontweight='normal', figsize=(6, 6), dp
9090
'\\renewcommand{\\rmdefault}{\\ttdefault}'
9191
])
9292
})
93+
elif fontweight == 'heavy':
94+
rcParams.update({
95+
"axes.linewidth": 0.7,
96+
"xtick.major.width": 0.6,
97+
"xtick.minor.width": 0.5,
98+
"ytick.major.width": 0.6,
99+
"ytick.minor.width": 0.5,
100+
"font.family": "AVHershey Complex",
101+
"font.weight": "heavy",
102+
"font.style": "italic",
103+
"axes.labelweight": "heavy",
104+
"mathtext.fontset": "custom",
105+
"mathtext.bf": "AVHershey Complex:heavy:italic",
106+
"mathtext.cal": "AVHershey Complex:heavy:italic",
107+
"mathtext.it": "AVHershey Simplex:heavy:italic",
108+
"mathtext.rm": "AVHershey Complex:heavy:italic",
109+
"mathtext.sf": "AVHershey Duplex:heavy",
110+
"mathtext.tt": "AVHershey Simplex:heavy",
111+
"mathtext.fallback": "cm",
112+
"mathtext.default": 'it'
113+
})
114+
if usetex is True:
115+
rcParams.update({
116+
"text.latex.preamble": '\n'.join([
117+
'\\usepackage{amsmath}'
118+
'\\usepackage[T1]{fontenc}',
119+
'\\usepackage{courier}',
120+
'\\usepackage[variablett]{lmodern}',
121+
'\\usepackage[LGRgreek]{mathastext}',
122+
'\\renewcommand{\\rmdefault}{\\ttdefault}'
123+
])
124+
})
93125

94126
smplotlib.set_style()
95127

src/smplotlib/smplot.mplstyle

+14-10
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ lines.dashdot_pattern: 6.5, 3, 2, 3
128128
lines.dotted_pattern: 2, 4
129129
#lines.scale_dashes: True
130130

131-
markers.fillstyle: none # {full, left, right, bottom, top, none}
131+
markers.fillstyle: full # {full, left, right, bottom, top, none}
132132

133133
#pcolor.shading: auto
134134
#pcolormesh.snap: True # Whether to snap the mesh to pixel boundaries. This is
@@ -261,11 +261,15 @@ font.weight: normal
261261
font.stretch: normal
262262
font.size: 12.0
263263

264-
font.serif: Computer Modern Roman, Times New Roman, Times, DejaVu Serif, Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Palatino, Charter, serif
265-
font.sans-serif: Helvetica, Arial, DejaVu Sans, Bitstream Vera Sans, Computer Modern Sans Serif, Lucida Grande, Verdana, Geneva, Lucid, Avant Garde, sans-serif
264+
font.serif: AVHershey Complex
265+
font.sans-serif: AVHershey Duplex
266+
font.monospace: AVHershey Complex
267+
268+
# font.serif: Computer Modern Roman, Times New Roman, Times, DejaVu Serif, Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Palatino, Charter, serif
269+
# font.sans-serif: Helvetica, Arial, DejaVu Sans, Bitstream Vera Sans, Computer Modern Sans Serif, Lucida Grande, Verdana, Geneva, Lucid, Avant Garde, sans-serif
266270
#font.cursive: Apple Chancery, Textile, Zapf Chancery, Sand, Script MT, Felipa, cursive
267271
#font.fantasy: Comic Neue, Comic Sans MS, Chicago, Charcoal, ImpactWestern, Humor Sans, xkcd, fantasy
268-
font.monospace: Terminal, Courier New, Courier, Computer Modern Typewriter, monospace, Bitstream Vera Sans Mono, Andale Mono, Terminal, Fixed, Nimbus Mono L, DejaVu Sans Mono,
272+
# font.monospace: Terminal, Courier New, Courier, Computer Modern Typewriter, monospace, Bitstream Vera Sans Mono, Andale Mono, Terminal, Fixed, Nimbus Mono L, DejaVu Sans Mono,
269273

270274

271275
## ***************************************************************************
@@ -333,12 +337,12 @@ mathtext.fontset: custom # Should be 'dejavusans' (default),
333337
## "mathtext.fontset: custom" is defined by the mathtext.bf, .cal, .it, ...
334338
## settings which map a TeX font name to a fontconfig font pattern. (These
335339
## settings are not used for other font sets.)
336-
mathtext.bf: AVHershey Complex:heavy
340+
mathtext.bf: AVHershey Complex:heavy:italic # such that font_manager can find it
337341
mathtext.cal: AVHershey Complex:medium
338-
mathtext.it: AVHershey Complex:mediumitalic
339-
mathtext.rm: AVHershey Complex
340-
mathtext.sf: AVHershey Complex
341-
mathtext.tt: AVHershey Complex
342+
mathtext.it: AVHershey Complex:medium:italic
343+
mathtext.rm: AVHershey Complex:medium
344+
mathtext.sf: AVHershey Duplex:medium
345+
mathtext.tt: AVHershey Simplex:medium
342346
mathtext.fallback: cm # Select fallback font from ['cm' (Computer Modern), 'stix'
343347
# 'stixsans'] when a symbol can not be found in one of the
344348
# custom math fonts. Select 'None' to not perform fallback
@@ -621,7 +625,7 @@ hist.bins: 15 # The default number of histogram bins or 'auto'.
621625
## * SCATTER PLOTS *
622626
## ***************************************************************************
623627
#scatter.marker: o # The default marker type for scatter plots.
624-
#scatter.edgecolors: black # The default edge colors for scatter plots.
628+
scatter.edgecolors: black # The default edge colors for scatter plots.
625629

626630

627631
## ***************************************************************************
5.33 KB
Binary file not shown.
-67.3 KB
Binary file not shown.
644 Bytes
Binary file not shown.
624 Bytes
Binary file not shown.
628 Bytes
Binary file not shown.
596 Bytes
Binary file not shown.

two_phase.png

-1.67 KB
Loading

0 commit comments

Comments
 (0)