Skip to content

[WIP] Fix point shape mismatch between plot and legend#14

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-point-shape-mismatch
Draft

[WIP] Fix point shape mismatch between plot and legend#14
Copilot wants to merge 3 commits intomainfrom
copilot/fix-point-shape-mismatch

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

  • Investigate root cause: G2 legend bug in inferShape when shape is the only categorical encoding (no color)
  • Fix: In build_config(), auto-set scale.shape.range to exactly N shapes when shape maps to a data column, so legend wrapping works correctly
  • Add tests for the new behavior (auto-range and user override preserved)
  • Verify with headless browser that plot and legend shapes now match
  • R CMD check passes (Status: OK)

When shape is the only categorical encoding (no color), G2's legend
renders wrong shapes due to a bug in its inferShape function. Auto-set
scale.shape.range to exactly N shapes so ordinal wrapping is correct.

Agent-Logs-Url: https://github.com/yihui/gglite/sessions/798e08dd-4e9f-4b83-a4d7-0093798fd933

Co-authored-by: yihui <163582+yihui@users.noreply.github.com>
Copilot finished work on behalf of yihui April 1, 2026 05:10
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.

2 participants