Hello.
As the title says(ppp...), I am looking for the way to give different color respectively to each point which points of plot library.
#lang racket
(require (only-in srfi/41 stream-iterate) plot)
(define (chaos p q d x0 y0)
(let ((a (* 2 (cos (* 2 pi (/ p q))))))
(let ((ksx (sqrt (/ (+ 2 a) 2))) (ksy (sqrt (/ (- 2 a) 2))))
(stream-map (lambda (z)
(match-let (((vector x y) z))
(vector (* (/ ksx (sqrt 2)) (+ x y))
(* (/ ksy (sqrt 2)) (+ (- x) y)))))
(stream-iterate (lambda (z)
(match-let (((vector x y) z))
(vector
(+ (* a x) y (/ (* d x) (add1 (expt x 2))))
(- x)))) (vector x0 y0))))))
(define *data* '((1 34 5 0.1 0 60000)
(1 26 5 0.1 0 90000)
(1 25 5 0.1 0 60000)
(1 13 5 0.1 0 60000)
(1 10 5 0.5 0 60000)
(1 8 5 0.1 0 60000)
(1 7 5 1 0 60000)
(2 13 5 1 0 60000)
(1 5 5 0.1 0 60000)
(3 14 5 0.1 0 60000)
(2 9 5 0.1 0 60000)
(3 13 5 0.1 0 60000)
(3 10 5 1 0 60000)
(8 25 5 0.1 0 60000)
(1 3 5 0.1 0 60000)
(6 17 5 0.5 0 60000)
(3 8 5 1 0 60000)
(5 13 5 0.1 0 60000)
(2 5 5 1 0 60000)
(7 17 5 0.1 0 60000)
(11 25 5 0.1 0 60000)
(6 13 5 1 0 90000)
(8 17 5 0.1 1 60000)))
(module+ main
(parameterize ((plot-x-label #f)
(plot-y-label #f))
(map (lambda (datum)
(match-let ((`(,p ,q ,d ,x ,y ,n) datum))
(plot
(points
(stream->list
(stream-take
(chaos p q d x y) n))
#:alpha 0.4
#:sym 'fullcircle1
#:color "blue" ;; how to change the color of a point, according to its co-ordinate?
)))) *data*)))
Thanks.