3 Commits
2 changed files with 14 additions and 9 deletions

No files matched your search

+4 -4
View File
@@ -7,8 +7,8 @@ VSVersionInfo(
ffi=FixedFileInfo( ffi=FixedFileInfo(
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4) # filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
# Set not needed items to zero 0. Must always contain 4 elements. # Set not needed items to zero 0. Must always contain 4 elements.
filevers=(2026,5,0,0), filevers=(2026,5,1,0),
prodvers=(2026,5,0,0), prodvers=(2026,5,1,0),
# Contains a bitmask that specifies the valid bits 'flags'r # Contains a bitmask that specifies the valid bits 'flags'r
mask=0x3f, mask=0x3f,
# Contains a bitmask that specifies the Boolean attributes of the file. # Contains a bitmask that specifies the Boolean attributes of the file.
@@ -32,12 +32,12 @@ VSVersionInfo(
u'040904B0', u'040904B0',
[StringStruct(u'CompanyName', u''), [StringStruct(u'CompanyName', u''),
StringStruct(u'FileDescription', u'pyFi: WiFi Heatmap Generator'), StringStruct(u'FileDescription', u'pyFi: WiFi Heatmap Generator'),
StringStruct(u'FileVersion', u'2026.5.0.0'), StringStruct(u'FileVersion', u'2026.5.1.0'),
StringStruct(u'InternalName', u'pyFi'), StringStruct(u'InternalName', u'pyFi'),
StringStruct(u'LegalCopyright', u'© iamdoubz'), StringStruct(u'LegalCopyright', u'© iamdoubz'),
StringStruct(u'OriginalFilename', u'pyFi.exe'), StringStruct(u'OriginalFilename', u'pyFi.exe'),
StringStruct(u'ProductName', u'pyFi'), StringStruct(u'ProductName', u'pyFi'),
StringStruct(u'ProductVersion', u'2026.5.0.0')]) StringStruct(u'ProductVersion', u'2026.5.1.0')])
]), ]),
VarFileInfo([VarStruct(u'Translation', [1033, 1200])]) VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
] ]
+10 -5
View File
@@ -63,10 +63,12 @@ def render_heatmap(
if fig is None or ax is None: if fig is None or ax is None:
fig, ax = plt.subplots(figsize=(10, 7)) fig, ax = plt.subplots(figsize=(10, 7))
fig.subplots_adjust(right=0.88) # permanent right margin for the colorbar
# Remove any colorbars left over from previous renders. # Remove any axes that aren't the main plot (stale colorbars, etc.).
# Colorbars attach to the figure, not the axes, so ax.clear() doesn't touch them. # We then recreate a fixed-position colorbar axes below so matplotlib never
for ax_obj in fig.axes[1:]: # axes[0] is the main plot; everything else is a colorbar # steals space from ax — that is what caused ax to shrink on every redraw.
for ax_obj in fig.axes[1:]:
ax_obj.remove() ax_obj.remove()
ax.clear() ax.clear()
@@ -115,14 +117,17 @@ def render_heatmap(
) )
if show_colorbar: if show_colorbar:
cbar = fig.colorbar(img_heatmap, ax=ax, fraction=0.03, pad=0.02) # Add a fixed-position axes for the colorbar. Using cax= instead of
# ax= means matplotlib draws into this dedicated axes without
# touching ax at all — no space is stolen, ax never shrinks.
cax = fig.add_axes([0.91, 0.15, 0.02, 0.70]) # [left, bottom, width, height]
cbar = fig.colorbar(img_heatmap, cax=cax)
cbar.set_label("Signal Strength (dBm)", fontsize=10) cbar.set_label("Signal Strength (dBm)", fontsize=10)
cbar.ax.tick_params(labelsize=8) cbar.ax.tick_params(labelsize=8)
cbar.ax.text(1.4, -90, "Poor", transform=cbar.ax.get_yaxis_transform(), cbar.ax.text(1.4, -90, "Poor", transform=cbar.ax.get_yaxis_transform(),
fontsize=7, color='gray', va='bottom') fontsize=7, color='gray', va='bottom')
cbar.ax.text(1.4, -30, "Excellent", transform=cbar.ax.get_yaxis_transform(), cbar.ax.text(1.4, -30, "Excellent", transform=cbar.ax.get_yaxis_transform(),
fontsize=7, color='gray', va='top') fontsize=7, color='gray', va='top')
# Black swatch at the very bottom representing "no signal found"
cbar.ax.text(1.4, -95, "No signal", transform=cbar.ax.get_yaxis_transform(), cbar.ax.text(1.4, -95, "No signal", transform=cbar.ax.get_yaxis_transform(),
fontsize=7, color='black', va='top', fontsize=7, color='black', va='top',
bbox=dict(facecolor='white', edgecolor='none', pad=1.5)) bbox=dict(facecolor='white', edgecolor='none', pad=1.5))