Skip to content

Commit

Permalink
Add theming for plotly figures (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Kallekleiv authored Jan 8, 2020
1 parent 26e7846 commit fd5f96e
Showing 1 changed file with 55 additions and 22 deletions.
77 changes: 55 additions & 22 deletions webviz_config_equinor/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import os
import glob
from webviz_config import WebvizConfigTheme
from pkg_resources import get_distribution, DistributionNotFound

from webviz_config import WebvizConfigTheme


try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
Expand All @@ -28,25 +30,56 @@
os.path.join(os.path.dirname(os.path.abspath(__file__)), "assets", "*")
)

equinor_theme.plotly_layout = {
"font": {"family": "Equinor"},
"hoverlabel": {"font": {"family": "Equinor"}},
"colorway": [
"#007079",
"#66737d",
"#7d0023",
"#4c9ba1",
"#a44c65",
"#80b7bc",
"#ff1243",
"#919ba2",
"#be8091",
"#b2d4d7",
"#ff597b",
"#bdc3c7",
"#d8b2bd",
"#ffe7d6",
"#d5eaf4",
"#ff88a1",
],
equinor_theme.plotly_theme = {
"layout": {
"font": {"family": "Equinor"},
"hoverlabel": {"font": {"family": "Equinor"}},
"paper_bgcolor": "rgba(0,0,0,0)",
"plot_bgcolor": "rgba(0,0,0,0)",
"colorscale": {
"diverging": [
[0, "rgb(255, 18, 67)"],
[0.1, "rgb(36, 55, 70)"],
[0.2, "rgb(0, 112, 121)"],
[0.3, "rgb(213, 234, 244)"],
[0.4, "rgb(230, 250, 236)"],
[0.5, "rgb(255, 231, 214)"],
[0.6, "rgb(128, 183, 188)"],
[0.7, "rgb(255, 18, 67)"],
[0.8, "rgb(145, 155, 162)"],
[0.9, "rgb(190, 128, 145)"],
[1, "rgb(178, 212, 215)"],
],
"sequential": [
[0.0, "rgb(36, 55, 70)"],
[0.125, "rgb(102, 115, 125)"],
[0.25, "rgb(145, 155, 162)"],
[0.375, "rgb(189, 195, 199)"],
[0.5, "rgb(255, 231, 214)"],
[0.625, "rgb(216, 178, 189)"],
[0.75, "rgb(190, 128, 145)"],
[0.875, "rgb(164, 76, 101)"],
[1.0, "rgb(125, 0, 35)"],
],
},
"colorway": [
"#FF1243",
"#243746",
"#007079",
"#D5EAF4",
"#E6FAEC",
"#FFE7D6",
"#80B7BC",
"#FF1243",
"#919BA2",
"#BE8091",
"#B2D4D7",
"#FF597B",
"#BDC3C7",
"#D8B2BD",
"#FFE7D6",
"#D5EAF4",
"#FF88A1",
],
}
}

0 comments on commit fd5f96e

Please sign in to comment.