Skip to content

Commit

Permalink
Updated cartoee add_colorbar
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Apr 11, 2022
1 parent 2bd276f commit 2ed8d98
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions geemap/cartoee.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,6 @@ def add_colorbar(
if tick_font_size is not None:
cb.ax.tick_params(labelsize=tick_font_size)

return cb


def _buffer_box(bbox, interval):
"""Helper function to buffer a bounding box to the nearest multiple of interval
Expand Down Expand Up @@ -988,7 +986,7 @@ def scale_number(x):
if str(x)[0] in ["1", "2", "5"]:
return int(x)
else:
return scale_number(x - 10**ndim)
return scale_number(x - 10 ** ndim)

length = scale_number(length)
num = length
Expand Down Expand Up @@ -1019,8 +1017,8 @@ def add_legend(
legend_elements=None,
loc="lower right",
font_size=14,
font_weight='normal',
font_color='black',
font_weight="normal",
font_color="black",
font_family=None,
):
"""Adds a legend to the map. The legend elements can be formatted as:
Expand Down Expand Up @@ -1062,7 +1060,7 @@ def add_legend(
leg = ax.legend(handles=legend_elements, loc=loc, prop=fontdict)

# Change font color If default color is changed.
if font_color != 'black':
if font_color != "black":
for text in leg.get_texts():
text.set_color(font_color)
return
Expand Down

0 comments on commit 2ed8d98

Please sign in to comment.