|
11 | 11 | import matplotlib.pyplot as plt
|
12 | 12 | import plotly.express as px
|
13 | 13 | import plotly.io as pio
|
| 14 | +import pymatviz # noqa: F401 |
14 | 15 |
|
15 | 16 | from matbench_discovery.enums import ( # noqa: F401
|
16 | 17 | Key,
|
|
22 | 23 | Task,
|
23 | 24 | )
|
24 | 25 |
|
25 |
| -pkg_name = "matbench-discovery" |
26 |
| -direct_url = Distribution.from_name(pkg_name).read_text("direct_url.json") or "{}" |
| 26 | +PKG_NAME = "matbench-discovery" |
| 27 | +direct_url = Distribution.from_name(PKG_NAME).read_text("direct_url.json") or "{}" |
27 | 28 | pkg_is_editable = json.loads(direct_url).get("dir_info", {}).get("editable", False)
|
28 | 29 |
|
29 | 30 | PKG_DIR = os.path.dirname(__file__)
|
|
70 | 71 | # --- start global plot settings
|
71 | 72 | px.defaults.labels = Quantity.dict() | Model.dict()
|
72 | 73 |
|
73 |
| - |
74 | 74 | global_layout = dict(
|
75 | 75 | paper_bgcolor="rgba(0,0,0,0)",
|
76 | 76 | font_size=13,
|
77 | 77 | # increase legend marker size and make background transparent
|
78 | 78 | legend=dict(itemsizing="constant", bgcolor="rgba(0, 0, 0, 0)"),
|
79 | 79 | )
|
80 | 80 | pio.templates["global"] = dict(layout=global_layout)
|
81 |
| -pio.templates.default = "plotly_dark+global" |
82 |
| -px.defaults.template = "plotly_dark+global" |
| 81 | +pio.templates.default = "pymatviz_dark+global" |
| 82 | +px.defaults.template = "pymatviz_dark+global" |
83 | 83 |
|
84 | 84 | # https://github.com/plotly/Kaleido/issues/122#issuecomment-994906924
|
85 | 85 | # when seeing MathJax "loading" message in exported PDFs,
|
|
0 commit comments