Skip to content

Commit

Permalink
fix the face color problem
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroJacobLi committed Jul 8, 2023
1 parent f185b23 commit 47228ff
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 13 deletions.
38 changes: 35 additions & 3 deletions src/smplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ def set_style(usetex=False, fontsize=15, fontweight='normal', figsize=(6, 6), dp
"font.weight": "light",
"axes.labelweight": "light",
"mathtext.fontset": "custom",
"mathtext.bf": "AVHershey Complex:light",
"mathtext.bf": "AVHershey Complex:medium",
"mathtext.cal": "AVHershey Complex:light",
"mathtext.it": "AVHershey Complex:light",
"mathtext.it": "AVHershey Complex:light:italic",
"mathtext.rm": "AVHershey Complex:light",
"mathtext.sf": "AVHershey Complex:light",
"mathtext.sf": "AVHershey Duplex:light",
"mathtext.tt": "AVHershey Complex:light",
"mathtext.fallback": "cm",
"mathtext.default": 'it'
Expand All @@ -90,6 +90,38 @@ def set_style(usetex=False, fontsize=15, fontweight='normal', figsize=(6, 6), dp
'\\renewcommand{\\rmdefault}{\\ttdefault}'
])
})
elif fontweight == 'heavy':
rcParams.update({
"axes.linewidth": 0.7,
"xtick.major.width": 0.6,
"xtick.minor.width": 0.5,
"ytick.major.width": 0.6,
"ytick.minor.width": 0.5,
"font.family": "AVHershey Complex",
"font.weight": "heavy",
"font.style": "italic",
"axes.labelweight": "heavy",
"mathtext.fontset": "custom",
"mathtext.bf": "AVHershey Complex:heavy:italic",
"mathtext.cal": "AVHershey Complex:heavy:italic",
"mathtext.it": "AVHershey Simplex:heavy:italic",
"mathtext.rm": "AVHershey Complex:heavy:italic",
"mathtext.sf": "AVHershey Duplex:heavy",
"mathtext.tt": "AVHershey Simplex:heavy",
"mathtext.fallback": "cm",
"mathtext.default": 'it'
})
if usetex is True:
rcParams.update({
"text.latex.preamble": '\n'.join([
'\\usepackage{amsmath}'
'\\usepackage[T1]{fontenc}',
'\\usepackage{courier}',
'\\usepackage[variablett]{lmodern}',
'\\usepackage[LGRgreek]{mathastext}',
'\\renewcommand{\\rmdefault}{\\ttdefault}'
])
})

smplotlib.set_style()

Expand Down
24 changes: 14 additions & 10 deletions src/smplotlib/smplot.mplstyle
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ lines.dashdot_pattern: 6.5, 3, 2, 3
lines.dotted_pattern: 2, 4
#lines.scale_dashes: True

markers.fillstyle: none # {full, left, right, bottom, top, none}
markers.fillstyle: full # {full, left, right, bottom, top, none}

#pcolor.shading: auto
#pcolormesh.snap: True # Whether to snap the mesh to pixel boundaries. This is
Expand Down Expand Up @@ -261,11 +261,15 @@ font.weight: normal
font.stretch: normal
font.size: 12.0

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
font.sans-serif: Helvetica, Arial, DejaVu Sans, Bitstream Vera Sans, Computer Modern Sans Serif, Lucida Grande, Verdana, Geneva, Lucid, Avant Garde, sans-serif
font.serif: AVHershey Complex
font.sans-serif: AVHershey Duplex
font.monospace: AVHershey Complex

# 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
# font.sans-serif: Helvetica, Arial, DejaVu Sans, Bitstream Vera Sans, Computer Modern Sans Serif, Lucida Grande, Verdana, Geneva, Lucid, Avant Garde, sans-serif
#font.cursive: Apple Chancery, Textile, Zapf Chancery, Sand, Script MT, Felipa, cursive
#font.fantasy: Comic Neue, Comic Sans MS, Chicago, Charcoal, ImpactWestern, Humor Sans, xkcd, fantasy
font.monospace: Terminal, Courier New, Courier, Computer Modern Typewriter, monospace, Bitstream Vera Sans Mono, Andale Mono, Terminal, Fixed, Nimbus Mono L, DejaVu Sans Mono,
# font.monospace: Terminal, Courier New, Courier, Computer Modern Typewriter, monospace, Bitstream Vera Sans Mono, Andale Mono, Terminal, Fixed, Nimbus Mono L, DejaVu Sans Mono,


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


## ***************************************************************************
Expand Down
Binary file modified src/smplotlib/ttf/AVHersheyComplexHeavy.ttf
Binary file not shown.
Binary file removed src/smplotlib/ttf/AVHersheyComplexHeavyItalic.ttf
Binary file not shown.
Binary file modified src/smplotlib/ttf/AVHersheyComplexLight.ttf
Binary file not shown.
Binary file modified src/smplotlib/ttf/AVHersheyComplexLightItalic.ttf
Binary file not shown.
Binary file modified src/smplotlib/ttf/AVHersheyComplexMedium.ttf
Binary file not shown.
Binary file modified src/smplotlib/ttf/AVHersheyComplexMediumItalic.ttf
Binary file not shown.
Binary file modified two_phase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 47228ff

Please sign in to comment.