Closed SteffanDavies closed 3 months ago
Thanks. I'm surprised you didn't before because my articles and notebooks might be so helpful for your projects.
All the plots can be tuned using the common Matplotlib approach, such as:
plt.rcParams['figure.figsize'] = [12, 4]
plt.rcParams['figure.dpi'] = 300
In case you need to change a single plot only, a context manager helps to do it:
from contextlib import contextmanager
import matplotlib.pyplot as plt
@contextmanager
def mpl_settings(settings):
original_settings = {k: plt.rcParams[k] for k in settings}
plt.rcParams.update(settings)
yield
plt.rcParams.update(original_settings)
with mpl_settings({'figure.dpi': 300, 'figure.figsize': [12, 4]}):
sbas.plot_baseline(baseline_pairs)
It's better to maintain smaller sizes for most of the plots to limit the notebook size.
Alexey, I have become a Patreon supporter to support your work.
When plotting large stacks, the plot is too tight. I suggest altering plot width based on length of dates: