Console error when with wrong #:legend-anchor in plot
Open
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 516
- Forks
- 103
- PR merge metrics
- No merged PRs in 30d
Description
If you run this program in DrRacket(in Windows), where #:legend-anchor is a string
#lang racket
(require plot)
(plot (points '((1 2) (3 4)))
#:legend-anchor "Hello") ; <-- wrong type
you get a graphic. But if you move the mouse over the graphic it opens the console with an error
plot-legend-anchor: contract violation
expected: (or/c (quote auto) [...])
given: "Hello"
in: the parameter of
(parameter/c (or/c 'auto [...]) any/c)
contract from: <pkgs>/plot-lib/plot/private/common/parameters.rkt
blaming: <pkgs>/plot-gui-lib/plot/private/gui/snip.rkt
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the DrRacket example on Windows, then inspect plot/private/common/parameters.rkt and plot/private/gui/snip.rkt, the files named in the contract error. Start by tracing when #:legend-anchor is validated during mouse interaction. Done should be defined by the invalid value no longer causing an unexpected console error while interacting with the plot.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100