Skip to content

Commit 7a1306a

Browse files
author
Radar Distance Monitor
committed
Optimize layout proportions: reduce gap between chart and buttons
- Moved buttons from y=0.34 to y=0.37 for closer proximity to chart - Adjusted chart to [0.08, 0.42, 0.88, 0.53] for better chart-to-button ratio - Enhanced log panel to [0.08, 0.02, 0.88, 0.32] for optimal display area - Maintains clear separation while eliminating excessive white space Improved layout structure: - Chart Title (top) - Main Chart (y: 0.42-0.95) - larger chart area - X-axis Labels (y: ~0.39-0.42) - proper space - Time Window Buttons (y: 0.37) - minimal but clear gap - Log Panel (y: 0.02-0.34) - enhanced display This achieves optimal balance between visual separation and space efficiency.
1 parent 8030cb2 commit 7a1306a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/radar_distance_monitor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,24 +274,24 @@ def __init__(self, collectors: List[RadarDataCollector], max_points: int = 100):
274274

275275
# Set up the plot with an additional text area for recent logs
276276
self.fig = plt.figure(figsize=(12, 8))
277-
# Main chart axes (normal chart area with space for x-axis labels)
278-
self.ax = self.fig.add_axes([0.08, 0.50, 0.88, 0.45])
277+
# Main chart axes (optimized chart area with space for x-axis labels)
278+
self.ax = self.fig.add_axes([0.08, 0.42, 0.88, 0.53])
279279
# Log panel axes (lower area, positioned below button area)
280-
self.log_ax = self.fig.add_axes([0.08, 0.02, 0.88, 0.30])
280+
self.log_ax = self.fig.add_axes([0.08, 0.02, 0.88, 0.32])
281281
self.log_ax.axis('off')
282282
# Increase font size for distance viewing (half previous), and nudge one line down
283283
self.log_text = self.log_ax.text(0.01, 0.90, "", va='top', ha='left', family='monospace', fontsize=22)
284284
self.max_log_lines = 8 # retained but unused for now; kept for future toggles
285285
# Per-host latest log line (timestamp, tag, stream, line)
286286
self.latest_logs = {collector.host_id: None for collector in collectors}
287287

288-
# Add time window selection buttons (positioned in dedicated space between chart and log panel)
288+
# Add time window selection buttons (positioned closer to chart with minimal gap)
289289
self.time_window_buttons = []
290290
button_width = 0.08
291291
button_height = 0.025
292292
button_spacing = 0.02
293293
start_x = 0.08
294-
button_y = 0.34 # Positioned in dedicated button zone, well below chart
294+
button_y = 0.37 # Positioned closer to chart with minimal but clear separation
295295

296296
from matplotlib.widgets import Button
297297

0 commit comments

Comments
 (0)