Skip to content

Fix plot_allocation's hardcoded PDF output and MB-only unit scaling#27

Merged
fpedd merged 1 commit into
mainfrom
fix/visualize-format-and-units
Jul 7, 2026
Merged

Fix plot_allocation's hardcoded PDF output and MB-only unit scaling#27
fpedd merged 1 commit into
mainfrom
fix/visualize-format-and-units

Conversation

@fpedd

@fpedd fpedd commented Jul 6, 2026

Copy link
Copy Markdown
Owner

fig.savefig always passed format="pdf" regardless of the requested file
extension, so a .png path silently contained PDF bytes. And every axis tick,
title, and limit annotation divided by MB unconditionally, so capacities below
1MB (small demo/test instances) rendered every y-tick as 0.0 and were
unreadable.

Let savefig infer the format from the path's own extension, and add
_byte_unit/_format_bytes to pick B/KB/MB/GB per value instead of assuming MB.

fig.savefig always passed format="pdf" regardless of the requested file
extension, so a .png path silently contained PDF bytes. And every axis tick,
title, and limit annotation divided by MB unconditionally, so capacities below
1MB (small demo/test instances) rendered every y-tick as 0.0 and were
unreadable.

Let savefig infer the format from the path's own extension, and add
_byte_unit/_format_bytes to pick B/KB/MB/GB per value instead of assuming MB.
@fpedd fpedd merged commit 866382e into main Jul 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant