@@ -153,6 +153,8 @@ def calendar(
153153 legend_labels : Optional [Union [List , Literal ["auto" ]]] = None ,
154154 legend_labels_precision : Optional [int ] = None ,
155155 legend_labels_kws : Optional [Dict ] = None ,
156+ less_label : str = "Less" ,
157+ more_label : str = "More" ,
156158 clip_on : bool = False ,
157159 ax : Optional [Axes ] = None ,
158160 ** kwargs : Any ,
@@ -220,6 +222,8 @@ def calendar(
220222 `legend_labels="auto"`.
221223 legend_labels_kws: Additional keyword arguments passed to the matplotlib text
222224 function when rendering legend labels.
225+ less_label: Left label used for the legend.
226+ more_label: Right label used for the legend.
223227 clip_on: Whether the artist (e.g., squares) is clipped to the axes boundaries (True) or allowed to extend
224228 beyond them (False).
225229 ax: A matplotlib axes. If None, plt.gca() will be used. It is advisable to make this explicit
@@ -377,7 +381,7 @@ def calendar(
377381 legend_labels_style .update (legend_labels_kws )
378382 ax .text (x = i + 0.5 , y = 9 , s = legend_label , ** legend_labels_style ) # type: ignore[invalid-argument-type]
379383
380- ax .text (- 0.6 , 8 , "Less" , va = "center" , ha = "right" , size = 8 )
381- ax .text (legend_bins + 0.5 , 8 , "More" , va = "center" , ha = "left" , size = 8 )
384+ ax .text (- 0.6 , 8 , less_label , va = "center" , ha = "right" , size = 8 )
385+ ax .text (legend_bins + 0.5 , 8 , more_label , va = "center" , ha = "left" , size = 8 )
382386
383387 return rect_patches
0 commit comments