Skip to content
Snippets Groups Projects

allow single-param plot with np.atleast_2d(axes)

Merged David Keitel requested to merge dkeitel/gridcorner:patch-1 into master
1 file
+ 1
0
Compare changes
  • Side-by-side
  • Inline
+ 1
0
@@ -56,6 +56,7 @@ def _get_fig_and_axes(ndim, factor, whspace):
@@ -56,6 +56,7 @@ def _get_fig_and_axes(ndim, factor, whspace):
plotdim = factor * ndim + factor * (ndim - 1.) * whspace
plotdim = factor * ndim + factor * (ndim - 1.) * whspace
dim = lbdim + plotdim + trdim
dim = lbdim + plotdim + trdim
fig, axes = plt.subplots(ndim, ndim, figsize=(dim, dim))
fig, axes = plt.subplots(ndim, ndim, figsize=(dim, dim))
 
axes = np.atleast_2d(axes) # allow single-parameter plots
# Format the figure.
# Format the figure.
lb = lbdim / dim
lb = lbdim / dim
Loading