Skip to content

Commit 3f23f05

Browse files
authored
Merge pull request #76 from GeoOcean/75-mdaplot-two-vars
[JTH] fix bug when 2 varables and just 1 ax
2 parents 31d8ff5 + 1aaefe2 commit 3f23f05

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bluemath_tk/datamining/_base_datamining.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import pandas as pd
66
import xarray as xr
77
from matplotlib import pyplot as plt
8+
from matplotlib.axes import Axes
89

910
from ..core.models import BlueMathModel
1011
from ..core.plotting.base_plotting import DefaultStaticPlotting
@@ -328,6 +329,8 @@ def plot_data_as_clusters(
328329
sharex=False,
329330
sharey=False,
330331
)
332+
if isinstance(axes, Axes):
333+
axes = np.array([[axes]])
331334

332335
# Gets colors for clusters and append to each nearest centroid
333336
colors_for_clusters = default_static_plot.get_list_of_colors_for_colormap(

0 commit comments

Comments
 (0)