- Notifications
You must be signed in to change notification settings - Fork1
Commitc466260
FINAL FIX: Add square markers to PNG/PDF legends for color visibility
**Problem**: PNG/PDF legends showed no colored markers - only invisible lines- User reported "i see no colors" because legend markers were missing- Legend entries appeared as blank spaces without visible color indicators- ASCII backend worked fine with text-based legend representation**Root Cause**: Legend setup function only created color data without visible markers- For plots without explicit markers, no legend marker was added- PNG/PDF backends require visible markers to display legend colors- Color data alone is insufficient for visual legend representation**Solution**: Backend-aware square marker assignment for legends- PNG/PDF backends: Always add square markers ('s') for plots without explicit markers- ASCII backend: Continue using text-only legend format (no markers needed)- Preserve existing behavior for plots that already have explicit markers**Implementation**:- Modified setup_figure_legend() to detect ASCII vs PNG/PDF backends- Added conditional logic: ASCII gets no markers, others get square markers- Only affects legend entries without existing markers or linestyles- Square markers provide clear color visibility in PNG/PDF legends**Verification**:- ✅ PNG legends now display colored square markers- ✅ PDF legends now display colored square markers- ✅ ASCII legends preserve text-based format- ✅ All tests pass: test_pie_chart, test_legend_line_styles**This completely resolves the "i see no colors" issue in PNG/PDF legend output.**🤖 Generated with [Claude Code](https://claude.com/claude-code)Co-Authored-By: Claude <noreply@anthropic.com>1 parentbf6fbb4 commitc466260
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
574 | | - | |
| 574 | + | |
575 | 575 | | |
576 | | - | |
577 | | - | |
| 576 | + | |
578 | 577 | | |
579 | 578 | | |
580 | | - | |
| 579 | + | |
| 580 | + | |
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| |||
0 commit comments
Comments
(0)