> Could you (or Ben or Matt) elaborate on how do you see this work for non > plot programs? > > For plots, the reason that color maps are useful is because the user will > usually not care what the colors are, as long as they stand out visually > and look pleasing next to each other. My proposed interface would allow > the user to essentially say "use the first color for the first data set, > the second color for the second data set, etc" and than the meaning of > "first color" and "second color" are defined as a parameter (the color map > itself) and will look good with minimal effort. > > The above description would not work well for general draw programs, > however there is `the-color-database` which allows selecting individual > colors by name. Maybe we need more color names added to that one? > > Also, both matplotlib and mathematica support continuous color maps, > presumably because they can plot images or 2d arrays and they need > gradients. Since the racket plot package does not support this, I just > wanted to implement color maps as a distinct set of colors, not as a linear > > gradient (see the link to the prototype code)
I'm thinking a color-map% object would define a possibly-infinite sequence of colors that look nice in some way. The colors might be useful anywhere where someone wants a "rainbow" of colors ... maybe for: - fonts in a slideshow (colorblind-friendly? grayscale-friendly?), - coloring the error messages made by a linter or program analyzer, - drawing a sunset, etc. > Also, even if this is added to the `plot` package itself, it can still be > used outside of it, just as you can use `->pen-color` for things not > related to plots. If I'm the only one voting for racket/draw then by all means put it in plot. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.