Skip to content

Commit

Permalink
Fix point plot color
Browse files Browse the repository at this point in the history
  • Loading branch information
SorooshMani-NOAA committed Mar 5, 2024
1 parent 3c485be commit 7a495a1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ensembleperturbation/plotting/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,14 @@ def plot_points(
:param title: whether to add a title to the plot
"""

if isinstance(points, Iterable):
if not isinstance(points, MultiPoint):
points = MultiPoint(points)
points = numpy.squeeze(numpy.stack((point._get_coords() for point in points), axis=0))
if isinstance(points, MultiPoint):
points = numpy.squeeze(
numpy.stack(
[list(point.coords)[0][:3] for point in points.geoms],
axis=0))

if not isinstance(points, numpy.ndarray):
points = numpy.array(points)

if axis is None:
axis = pyplot.gca()
Expand Down

0 comments on commit 7a495a1

Please sign in to comment.