diff --git a/maidr/core/plot/heatmap.py b/maidr/core/plot/heatmap.py index 88dbeee..465673f 100644 --- a/maidr/core/plot/heatmap.py +++ b/maidr/core/plot/heatmap.py @@ -21,7 +21,7 @@ class HeatPlot( ): def __init__(self, ax: Axes, **kwargs) -> None: self._fill_label = kwargs.pop("fill_label") - self._fmt = kwargs.pop("fmt", ".2f") + self._fmt = kwargs.pop("fmt") super().__init__(ax, PlotType.HEAT) def render(self) -> dict: diff --git a/maidr/patch/heatmap.py b/maidr/patch/heatmap.py index 9fde774..9a6f188 100644 --- a/maidr/patch/heatmap.py +++ b/maidr/patch/heatmap.py @@ -12,17 +12,14 @@ def heat(wrapped, _, args, kwargs) -> Axes | AxesImage: # Check for additional label used by MAIDR heatmap. fill_label = kwargs.pop("fill_label", "Fill") - - _fmt = ".2f" - if "fmt" in kwargs: - _fmt = kwargs.get("fmt") + fmt = kwargs.get("fmt", "") # Patch `ax.imshow()` and `seaborn.heatmap`. plot = wrapped(*args, **kwargs) # Extract the heatmap data points for MAIDR from the plots. ax = FigureManager.get_axes(plot) - FigureManager.create_maidr(ax, PlotType.HEAT, fill_label=fill_label, fmt=_fmt) + FigureManager.create_maidr(ax, PlotType.HEAT, fill_label=fill_label, fmt=fmt) # Return to the caller. return plot