Skip to content

Instantly share code, notes, and snippets.

@nikitakhutorni
Created January 27, 2021 07:05
def create_reference_line(x, name, meta=""):
"""Returns a dictionary that defines a
black line bound to the secondary yaxis.
"""
ref_line = dict(
x=[x, x],
y=[0, 1],
name=name,
yaxis="y2",
mode="lines",
type="scatter",
line=dict(
color="black",
width=0.5
),
meta=meta
)
return ref_line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment