Please consider using a default color scheme for continuous quantities in which colors vary in brightness uniformly and are either monotonically increasing or decreasing in brightness, such as inferno or viridis. Turbo is probably better suited for diverging data because the largest and smallest values are dark and the middle values are light. Humans don't see colors as ordered by hue, but by brightness. Also, when the largest and smallest values are both dark it can be difficult to identify the extreme values in noisy data.
If optimal contrast with the lightest colors on a white background is desired, please consider using Cool as a default -- it's lightest color is dark enough for good contrast, but otherwise the Cool colors vary almost linearly in brightness.
Thanks for the feedback. We are investigating a replacement for turbo but have not yet converged on a more suitable default. It is likely that there is no good universal default, so we recommend in most cases setting an explicit scheme. Please upvote or comment on this issue if you would like to provide input or follow our progress.
https://github.com/observablehq/plot/issues/527
You might also consider using BuRd as the default for diverging data as per your great example below for temperature. Red and blue differ in perceived depth. Red is considered a 'warm' color that appears closer in depth, which might have a better semantic mapping for showing positive values, while blue is a 'cool' color that appears farther, which might better for showing negative values.
Indeed BuRd is more appropriate for temperature, but Plot isn’t smart enough to know what is being encoded in a diverging scale. In other applications, such as redshift vs. blueshift (admittedly a more esoteric topic than temperature), red represents a decrease and blue an increase. So, there is no universal correct default, and instead our goal is only for it be easy to specify a good color scheme. This is why we provide the "burd" scheme in addition to "rdbu" (and you can also use the reverse option).
It is wonderful to see the pivot option -- an excellent improvement over most diverging color scales, which assume a uniform distribution. Thank you for including it!
I’ve added a few options of using range and interpolate to implement a custom color scheme. That said, I do recommend starting with the built-in schemes: not only is it more convenient, they are thoughtfully designed (thanks, ColorBrewer).
I agree that the built-in scales should be preferred for most cases, but custom categorical schemes are useful, e.g. for coloring sun and rain yellow and blue in weather data. I wonder what's the most elegant solution for that.
You can define a custom ordinal or categorical color scheme by setting the scale type to “ordinal” (or “categorical”) and then specifying the range as an array of colors. You can also optionally specify the domain as the corresponding array of values in the same order as the range. For example, domain: ["sun", "rain"], range: ["yellow", "gray"].
There’s a sqrt scale type (used by the r scale by default, e.g. for sizing dots), but Plot doesn’t currently support radial marks. Please upvote this issue if you are interested in this feature.
https://github.com/observablehq/plot/issues/133
If I want my axis to start at 0 but have no clue what is the max value, is it possible to only give the minimum value with something like domain: [0,]?
There is a specific option (zero: true) for this common use case. If you wanted to include other values, you could also add them as a channel in a mark, for example Plot.dot([], {x: [1, 3]}) would ensure that the domain of x starts ≤1 and ends ≥3 (but it wouldn't show any dot, since the data array is empty).