import plotly.graph_objs as go # Create data
x = [1, 2, 3, 4, 5]
y = [1, 3, 2, 5, 4] # Create a trace for the knot graph
trace = go.Scatter(x=x, y=y, mode=’lines+markers’, line_shape=’spline’, name=’Knot Graph’) # Create the figure layout
layout = go.Layout(title=’Knot Graph’, xaxis=dict(title=’X-axis’), yaxis=dict(title=’Y-axis’)) # Create the figure object
fig = go.Figure(data=[trace], layout=layout)