'Plotly: How to make a jagged line plot look better?
I made a chart showing the number of items purchased over a period of time. The graph seems unreadable to me, hard to get the right perspective. My code below:
import numpy as np
import plotly.graph_objs as go
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
init_notebook_mode(connected=True)
trace1 = go.Scatter(x=df_temp['Date'],
y=df_temp['Quantity'],
line = dict(color = 'blue'),
opacity = 0.3)
layout = dict(title='Purchases of NC coin',)
fig = dict(data=[trace1], layout=layout)
iplot(fig)
And some of my data:
Id Date Quantity
8 2022-01-16 19:14:56 50814.040553
15 2022-01-12 09:18:01 2563.443420
17 2022-01-11 13:52:38 33055.752836
18 2022-01-11 11:49:54 6483.182959
19 2022-01-11 11:07:48 13005.174783
21 2022-01-11 10:50:20 19605.381370
23 2022-01-11 10:15:30 6561.223602
24 2022-01-11 10:14:44 19762.821100
28 2022-01-07 15:56:50 3307.607665
29 2022-01-07 15:54:30 66868.030051
30 2022-01-07 12:27:07 42683.069577
31 2022-01-07 12:20:51 3423.618394
34 2022-01-05 12:11:57 69607.963793
35 2022-01-05 10:41:48 20370.090947
37 2022-01-05 10:21:22 72415.914082
38 2022-01-05 10:05:04 20687.003754
39 2022-01-05 09:36:53 37410.532342
40 2022-01-05 08:35:06 43815.009603
41 2022-01-04 19:27:27 30581.795021
44 2022-01-03 16:34:41 14290.644375
Do you have any ideas?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

