Skip to content

Commit

Permalink
refactor: changing to allow user to pass layout of mosaic subplots ex… (
Browse files Browse the repository at this point in the history
ARM-DOE#677)

* refactor: changing to allow user to pass layout of mosaic subplots explicitly as a keyword argument

* setting the new layout keyword argument to constrained for image testing
  • Loading branch information
cgodine authored May 23, 2023
1 parent b53dab5 commit 078aba4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion act/plotting/skewtdisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ def plot_enhanced_skewt(
uv_flag=False,
dsname=None,
figsize=(14, 10),
layout='constrained',
):
"""
This will plot an enhanced Skew-T plot with a Hodograph on the top right
Expand Down Expand Up @@ -736,6 +737,10 @@ def plot_enhanced_skewt(
Name of the datastream to plot if multiple in the plot object
figsize : tuple
Figure size for the plot
layout : str
String to pass to matplotlib.figure.Figure object layout keyword
argument. Choice of 'constrained,' 'compressed,' 'tight,' or None.
Default is 'constrained'.
Returns
-------
Expand All @@ -749,7 +754,7 @@ def plot_enhanced_skewt(
subplot_kw = {'a': {'projection': 'skewx'}}
fig, axs = plt.subplot_mosaic(
[['a', 'a', 'b'], ['a', 'a', 'b'], ['a', 'a', 'c'], ['a', 'a', 'c']],
layout='constrained',
layout=layout,
per_subplot_kw=subplot_kw,
)
self.fig = fig
Expand Down

0 comments on commit 078aba4

Please sign in to comment.