Skip to content

Instantly share code, notes, and snippets.

@powergold1
powergold1 / symlog.py
Last active March 3, 2024 02:55
Symlog plot in plotly (python)
# Plotly does currently not have a symlog plot built-in, but you can do the symlog
# transformation yourself, plot the data on a linear scale, and adjust the
# ticks and hovertext.
# This script below creates a plot with a symlogged y-axis similar to the second
# plot in the matplotlib demo.
# https://matplotlib.org/stable/gallery/scales/symlog_demo.html
import numpy as np
import plotly.graph_objects as go