Skip to content
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

Save figs fix #39

Merged
merged 8 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions niceplots/styles/doumont-light.mplstyle
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
# Figure settings
savefig.dpi : 600
figure.constrained_layout.use : True
savefig.dpi: 600
figure.constrained_layout.use: True


# Axes settings
axes.spines.top : False
axes.spines.right : False
axes.labelpad : 8.0
axes.xmargin : 0
axes.ymargin : 0
axes.spines.top: False
axes.spines.right: False
axes.labelpad: 8.0
axes.xmargin: 0
axes.ymargin: 0


# Font settings
font.family : sans-serif
font.sans-serif : CMU Bright
axes.unicode_minus : False
font.size : 18
font.family: sans-serif
font.sans-serif: CMU Bright
axes.unicode_minus: False
font.size: 18

axes.labelweight : bold
axes.labelweight: bold

xtick.labelsize : small
ytick.labelsize : small
xtick.labelsize: small
ytick.labelsize: small

text.latex.preamble : r"\usepackage{cmbright}"
text.latex.preamble: r"\usepackage{cmbright}"
mathtext.default: regular
pgf.rcfonts : True
pgf.rcfonts: True


# Legend settings
legend.columnspacing : 0.2
legend.frameon : False
legend.columnspacing: 1.0
legend.frameon: False


# Line settings
lines.linewidth : 2.0
lines.markeredgewidth : 1.0
lines.linewidth: 2.0
lines.markeredgewidth: 1.0

# Color settings
axes.prop_cycle : cycler('color', ['e29400ff', '1E90FF', 'E21A1A', '00a650ff', '800000ff', 'ff8f00', '800080ff', '00A6D6', '000000ff'])
axes.prop_cycle: cycler('color', ['e29400ff', '1E90FF', 'E21A1A', '00a650ff', '800000ff', 'ff8f00', '800080ff', '00A6D6', '000000ff'])

# Use this parameter, which (hopefully) nobody will ever use, to store text the names of the colors in the color cycle
keymap.help : Yellow, Blue, Red, Green, Maroon, Orange, Purple, Cyan, Black

lines.markeredgecolor : w
axes.edgecolor : 5a5758ff
text.color : 5a5758ff
axes.labelcolor : 5a5758ff
xtick.color : 5a5758ff
ytick.color : 5a5758ff
keymap.help: Yellow, Blue, Red, Green, Maroon, Orange, Purple, Cyan, Black

lines.markeredgecolor: w
axes.edgecolor: 5a5758ff
text.color: 5a5758ff
axes.labelcolor: 5a5758ff
xtick.color: 5a5758ff
ytick.color: 5a5758ff
3 changes: 1 addition & 2 deletions niceplots/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import warnings
import os
import copy
from collections.abc import Iterable
from collections import OrderedDict

# ==============================================================================
Expand Down Expand Up @@ -1036,7 +1035,7 @@ def save_figs(fig, name, formats, format_kwargs=None, **kwargs):
fileName = os.path.splitext(name)[0]

# --- Convert the file format to a list if only one given ---
if not isinstance(formats, Iterable):
if isinstance(formats, str):
formats = [formats]

# --- Save the figures ---
Expand Down
Loading