colorway is going to be a very useful parameter for the new Themes feature of Chart Studio, because by setting just that attribute and saving it in a template, one will be able to provide custom defaults for colors of new traces, plus pie charts.
I think it will be necessary to add the equivalent custom defaults for sequential and diverging colorscales (overriding the current built-in default white-to-red and blue-to-white-to-red that appear when you first try to color by data in the editor), such that a template can specify just these three to prepopulate the default colors in all three modes: categorical, sequential and diverging.
To clarify: this would be two new keys in layout, something like layout.sequentialscale and layout.divergingscalewhich would be arrays of color-strings, and whose defaults would be the current defaults plotly.js uses for those kinds of scales when colorscale is not specified.
Good idea. To be precise this would be three scales, since we have positive sequential, negative sequential, and diverging.
Even better :)
On Sat, Aug 18, 2018 at 15:22 alexcjohnson notifications@github.com wrote:
Good idea. To be precise this would be three scales, since we have
positive sequential, negative sequential, and diverging.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/plotly/plotly.js/issues/2925#issuecomment-414080727,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMbA2oYv56rd4vkZltuFooddmYMnE1bks5uSGlggaJpZM4WCpu7
.
This now seems fairly necessary, as Themes support in Chart Studio Cloud doesn't seem to grab the Theme-provided sequential colorscales ... or at least plotly.js isn't offering them up as defaults in fullData ...? http://plot.ly/create and try to make a scatter plot colored by a column with a theme.
This would be great. Right now themes have to individually set defaults for every colorscale across all trace types. It would be nice to be able to specify this in one place (or one place for sequential and one place for diverging).
Could we assume that diverging is the concatenation of increasing and
decreasing sequential or do we need all three?
On Sat, Nov 3, 2018 at 10:00 Jon Mease notifications@github.com wrote:
This would be great. Right now themes have to individually set defaults
for every colorscale across all trace types. It would be nice to be able to
specify this in one place (or one place for sequential and one place for
diverging).—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/plotly/plotly.js/issues/2925#issuecomment-435590087,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMbA99QG_T0CLK3FBWsc4J8GnYmkMqCks5uraGEgaJpZM4WCpu7
.
I'm not used to thinking of increasing and decreasing as separate colorscale types. Could you elaborate? I was picturing that the defaults would be for sequential and diverging colorscales.
I’m with you Jon but see comment above from Alex :)
On Sat, Nov 3, 2018 at 11:04 Jon Mease notifications@github.com wrote:
I'm not used to thinking of increasing and decreasing as separate
colorscale types. Could you elaborate? I was picturing that the defaults
would be for sequential and diverging colorscales.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/plotly/plotly.js/issues/2925#issuecomment-435594703,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMbA9ASB4t_P5SghlCBuWQtSHZW8C-Aks5urbCTgaJpZM4WCpu7
.
Ah, missed that. @alexj how does plotly.js decide which scale to use?
Right, the negative sequential is unusual, we only use it when you have uniformly negative data and you ask for autocolorscale (If you don't explicitly ask for autocolorscale we default to the diverging blue->gray->red). The idea being that the goal with a sequential colorscale is generally to vary from a "weak" color representing small values to a "strong" one representing large values, and "larger" more often means "bigger absolute value" than ">"
We could simply flip the positive sequential scale if all the data are negative, but the original thought was that this would be misleading to users used to seeing that scale the other way, so it would be better to use a separate scale.
Could we assume that diverging is the concatenation of increasing and decreasing sequential or do we need all three?
You're right that our defaults are close to that - negative sequential being blue (most negative) to gray (least negative) and positive being gray (least positive) to red (most positive), vs the diverging blue->gray->red. But if we actually used the two concatenated together you'd see that the sequential ones end at a brighter gray than the diverging one, so there's a clear cusp at the boundary - which the diverging one smooths out in the name of perceptual uniformity.

Perhaps if you only specify diverging and sequential, the negative sequential scale defaults to the reversed positive sequential?
If plotly.js uses all three il happy with being able to specify all three
and let the template authors decide the details later on. If a layout-wide
setting is easy it would be great to get this into Chart Studio before the
end of the month :)
On Sat, Nov 3, 2018 at 13:08 alexcjohnson notifications@github.com wrote:
Right, the negative sequential is unusual, we only use it when you have
uniformly negative data and you ask for autocolorscale (If you don't
explicitly ask for autocolorscale we default to the diverging
blue->gray->red). The idea being that the goal with a sequential colorscale
is generally to vary from a "weak" color representing small values to a
"strong" one representing large values, and "larger" more often means
"bigger absolute value" than ">"We could simply flip the positive sequential scale if all the data are
negative, but the original thought was that this would be misleading to
users used to seeing that scale the other way, so it would be better to use
a separate scale.Could we assume that diverging is the concatenation of increasing and
decreasing sequential or do we need all three?You're right that our defaults are close to that - negative sequential
being blue (most negative) to gray (least negative) and positive being gray
(least positive) to red (most positive), vs the diverging blue->gray->red.
But if we actually used the two concatenated together you'd see that
the sequential ones end at a brighter gray than the diverging one, so
there's a clear cusp at the boundary - which the diverging one smooths out
in the name of perceptual uniformity.
[image: concat vs rdbu]
https://user-images.githubusercontent.com/2678795/47955105-4828e580-df69-11e8-83b2-8ebc31160b36.pngPerhaps if you only specify diverging and sequential, the negative
sequential scale defaults to the reversed positive sequential?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/plotly/plotly.js/issues/2925#issuecomment-435604418,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMbA51hd9k-cCFLQgcmVJVyCBPn1OW9ks5urc2igaJpZM4WCpu7
.
I am about to submit a PR for this one. What would be good names for those 3 new attributes?
cc @plotly/plotly_js
layout.colorscales.positivesequential, layout.colorscales.negativesequential, layout.colorscales.diverging ?
layout.colorscale.sequentiallayout.colorscale.sequentialminus (similar to error bar's arrayminus)layout.colorscale.divergingI am curious to know if one could apply diverging reversed?
When having e.g. a topography model it would be nice to have the option of presenting the mountains in red and the elevations below zero in blue.
@archmoj these are just for defaults... you can definitely reverse the colorscale, there's a different parameter for that :)
Most helpful comment
layout.colorscale.sequentiallayout.colorscale.sequentialminus(similar to error bar'sarrayminus)layout.colorscale.diverging