Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9f72b566c | ||
|
|
cf0180b3b7 | ||
|
|
afbc6f77e9 |
No files matched your search
+4
-4
@@ -7,8 +7,8 @@ VSVersionInfo(
|
||||
ffi=FixedFileInfo(
|
||||
# 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.
|
||||
filevers=(2026,5,0,0),
|
||||
prodvers=(2026,5,0,0),
|
||||
filevers=(2026,5,1,0),
|
||||
prodvers=(2026,5,1,0),
|
||||
# Contains a bitmask that specifies the valid bits 'flags'r
|
||||
mask=0x3f,
|
||||
# Contains a bitmask that specifies the Boolean attributes of the file.
|
||||
@@ -32,12 +32,12 @@ VSVersionInfo(
|
||||
u'040904B0',
|
||||
[StringStruct(u'CompanyName', u''),
|
||||
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'LegalCopyright', u'© iamdoubz'),
|
||||
StringStruct(u'OriginalFilename', u'pyFi.exe'),
|
||||
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])])
|
||||
]
|
||||
|
||||
+10
-5
@@ -63,10 +63,12 @@ def render_heatmap(
|
||||
|
||||
if fig is None or ax is None:
|
||||
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.
|
||||
# Colorbars attach to the figure, not the axes, so ax.clear() doesn't touch them.
|
||||
for ax_obj in fig.axes[1:]: # axes[0] is the main plot; everything else is a colorbar
|
||||
# Remove any axes that aren't the main plot (stale colorbars, etc.).
|
||||
# We then recreate a fixed-position colorbar axes below so matplotlib never
|
||||
# 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.clear()
|
||||
|
||||
@@ -115,14 +117,17 @@ def render_heatmap(
|
||||
)
|
||||
|
||||
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.ax.tick_params(labelsize=8)
|
||||
cbar.ax.text(1.4, -90, "Poor", transform=cbar.ax.get_yaxis_transform(),
|
||||
fontsize=7, color='gray', va='bottom')
|
||||
cbar.ax.text(1.4, -30, "Excellent", transform=cbar.ax.get_yaxis_transform(),
|
||||
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(),
|
||||
fontsize=7, color='black', va='top',
|
||||
bbox=dict(facecolor='white', edgecolor='none', pad=1.5))
|
||||
|
||||
Reference in new issue
Block a user