racket / drracket

DrRacket, IDE for Racket
http://www.racket-lang.org/
Other
454 stars 93 forks source link

Console error when with wrong #:legend-anchor in plot #305

Open gus-massa opened 5 years ago

gus-massa commented 5 years ago

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