Skip to content

Commit

Permalink
add check for None variable name (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc2 authored Jul 17, 2024
1 parent 5c590bd commit e36030b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions uxarray/plot/dataarray_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _point_raster(
):
"""Implementation of Point Rasterization."""

if "clabel" not in kwargs:
if "clabel" not in kwargs and uxda.name is not None:
# set default label for color bar
kwargs["clabel"] = uxda.name

Expand Down Expand Up @@ -302,7 +302,7 @@ def _polygon_raster(
):
"""Implementation of Polygon Rasterization."""

if "clabel" not in kwargs:
if "clabel" not in kwargs and uxda.name is not None:
# set default label for color bar
kwargs["clabel"] = uxda.name

Expand Down Expand Up @@ -385,7 +385,7 @@ def polygons(
width: int
Plot Width for Bokeh Backend
"""
if "clabel" not in kwargs:
if "clabel" not in kwargs and uxda.name is not None:
# set default label for color bar
kwargs["clabel"] = uxda.name

Expand Down Expand Up @@ -493,7 +493,7 @@ def _plot_data_as_points(

from holoviews import Points

if "clabel" not in kwargs:
if "clabel" not in kwargs and uxda.name is not None:
# set default label for color bar
kwargs["clabel"] = uxda.name

Expand Down

0 comments on commit e36030b

Please sign in to comment.