Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template updates #1549

Merged
merged 3 commits into from
May 6, 2019
Merged

Template updates #1549

merged 3 commits into from
May 6, 2019

Conversation

jonmmease
Copy link
Contributor

Changes

autocolorscale

Closes #1454 by turning off autocolorscale in heatmap (and related) trace templates and setting the colorscale to the theme colorscale. See plotly/plotly.js#3829 for discussion.

default colorscale

Closes #1274 setting default sequential colorscale to plasma.

colorway

Closes #1508 by reordering template colorway to improve contrast. Also slightly lighten the former 6th color in the colorway (Plotly brand "Lavender") to improve contrast with the former 4th color (Plotly brand "Lavender shade").

Before: https://projects.susielu.com/viz-palette?colors=[%22#636efa%22,%22#EF553B%22,%22#00cc96%22,%22#ab63fa%22,%22#19d3f3%22,%22#e763fa%22,%22#FECB52%22,%22#FFA15A%22,%22#FF6692%22,%22#B6E880%22]&backgroundColor=%22#ffffff%22&fontColor=%22black%22

After: https://projects.susielu.com/viz-palette?colors=[%22#636efa%22,%22#EF553B%22,%22#00cc96%22,%22#ab63fa%22,%22#FFA15A%22,%22#19d3f3%22,%22#FF6692%22,%22#B6E880%22,%22#ff97ff%22,%22#FECB52%22]&backgroundColor=%22#ffffff%22&fontColor=%22black%22&mode=%22normal%22

future flag

The default colorscale and colorway changes are only in effect when using the built-in plotly, plotly_white, and plotly_dark templates if the template_defaults (or v4) future flag is activated. E.g.

from _plotly_future_ import template_defaults
import plotly
...

The intention is for this to become the default behavior in plotly.py version 4.

v3 template plotly template examples

newplot-9

newplot-10

v4 template plotly template examples (candidate default)

newplot-11

newplot-12

heatmap, histogram2d, histogram2dcontour, and contour.

This way users can override colorscale without setting autocolorscale
to False.
@jonmmease jonmmease added this to the v3.9.0 milestone May 5, 2019
@jonmmease jonmmease requested review from nicolaskruchten and removed request for nicolaskruchten May 5, 2019 11:54
@jonmmease jonmmease merged commit 364321f into master May 6, 2019
@nicolaskruchten nicolaskruchten deleted the template_updates branch June 19, 2020 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant