Last active
October 7, 2022 00:34
-
-
Save Miladiouss/754a660425f7694b601a21361ee54a66 to your computer and use it in GitHub Desktop.
Plotting on a 1-D number axis.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import plotly.graph_objects as go | |
fig = go.Figure() | |
xdata = [(1 - 1/i) for i in range(1, 15)] | |
fig.add_trace(go.Scatter( | |
x=xdata, y=len(xdata)*[0], mode='markers', marker_size=10, marker_color='red' | |
)) | |
fig.update_xaxes(showgrid=False) | |
fig.update_yaxes(showgrid=False, | |
zeroline=True, zerolinecolor='black', zerolinewidth=3, | |
showticklabels=False) | |
fig.update_layout(height=200, plot_bgcolor='white') | |
fig.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment