Skip to content

Commit

Permalink
Format numbers in plots (#121)
Browse files Browse the repository at this point in the history
Use exponential format for big numbers to be more readable.
  • Loading branch information
martin-schlipf authored Dec 18, 2023
1 parent eb4e021 commit 94c359f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/py4vasp/_third_party/graph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@
pio = import_.optional("plotly.io")

if import_.is_imported(go) and import_.is_imported(pio):
pio.templates["vasp"] = go.layout.Template(layout={"colorway": VASP_COLORS})
axis_format = {"showexponent": "all", "exponentformat": "power"}
layout = {"colorway": VASP_COLORS, "xaxis": axis_format, "yaxis": axis_format}
pio.templates["vasp"] = go.layout.Template(layout=layout)
pio.templates.default = "ggplot2+vasp"

0 comments on commit 94c359f

Please sign in to comment.