From f8c999be4343bc5d739767f811de793cb8798af2 Mon Sep 17 00:00:00 2001 From: pixelsoup42 Date: Sat, 14 Oct 2023 17:12:32 +0200 Subject: [PATCH] fix images --- .../cardano_account_pandas_dumper.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/cardano_account_pandas_dumper/cardano_account_pandas_dumper.py b/src/cardano_account_pandas_dumper/cardano_account_pandas_dumper.py index 0414f45..e3f2e3a 100644 --- a/src/cardano_account_pandas_dumper/cardano_account_pandas_dumper.py +++ b/src/cardano_account_pandas_dumper/cardano_account_pandas_dumper.py @@ -608,7 +608,7 @@ def make_transaction_frame( return joined_frame def _plot_title(self): - return f"Asset balances in wallet until block {self.data.to_block}." + return f"Asset balances in wallet until block {self.data.to_block}" def _draw_asset_legend(self, ax: Axes, asset_id: str): ticker = None @@ -643,9 +643,17 @@ def _draw_asset_legend(self, ax: Axes, asset_id: str): horizontalalignment="center", transform=ax.transAxes, fontsize="xx-small", + clip_on=True, ) if image_data: - ax.imshow(mpl.image.imread(image_data), aspect="auto") + ax.set_adjustable("datalim") + ax.imshow( + mpl.image.imread(image_data), + aspect="equal", + extent=(0.3, 0.7, 0.8, 0.4), + ) + ax.set_xlim((0.0, 1.0)) + ax.set_ylim((1.0, 0.0)) def plot_balance(self, order: str = "appearance"): """Create a Matplotlib plot with the asset balance over time."""