-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
Copy pathscatter.py
130 lines (126 loc) · 3.7 KB
/
scatter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import plotly.graph_objs as go
D = dict(
x1=[1, 2, 2, 4, 5, 6, 1, 7, 8, 5, 3],
y1=[5, 3, 7, 2, 9, 7, 8, 4, 5, 9, 2],
x2=[-1, 1, -0.3, -0.6, 0.4, 0.8, -0.1, 0.7],
y2=[-0.5, 0.4, 0.7, -0.6, 0.3, -1, 0, 0.3],
)
SIMPLE_SCATTER = go.Figure(
data=[
go.Scatter(
x=[1.0, 2.0, 2.0, 4.0, 5.0, 6.0, 1.0, 7.0, 8.0, 5.0, 3.0],
y=[5.0, 3.0, 7.0, 2.0, 9.0, 7.0, 8.0, 4.0, 5.0, 9.0, 2.0],
mode="markers",
marker=go.scatter.Marker(
symbol="circle",
line=dict(color="rgba(31,119,180,1.0)", width=1.0),
size=6.0,
color="rgba(31,119,180,1.0)",
),
xaxis="x1",
yaxis="y1",
)
],
layout=go.Layout(
width=640,
height=480,
autosize=False,
margin=go.layout.Margin(l=80, r=63, b=52, t=57, pad=0),
hovermode="closest",
showlegend=False,
xaxis1=go.layout.XAxis(
domain=[0.0, 1.0],
range=[0.64334677419354847, 8.3566532258064505],
type="linear",
showline=True,
ticks="inside",
nticks=10,
showgrid=False,
zeroline=False,
tickfont=dict(size=10.0),
anchor="y1",
side="bottom",
mirror="ticks",
),
yaxis1=go.layout.YAxis(
domain=[0.0, 1.0],
range=[1.6410714285714287, 9.3589285714285726],
type="linear",
showline=True,
ticks="inside",
nticks=10,
showgrid=False,
zeroline=False,
tickfont=dict(size=10.0),
anchor="x1",
side="left",
mirror="ticks",
),
),
)
DOUBLE_SCATTER = go.Figure(
data=[
go.Scatter(
x=[1.0, 2.0, 2.0, 4.0, 5.0, 6.0, 1.0, 7.0, 8.0, 5.0, 3.0],
y=[5.0, 3.0, 7.0, 2.0, 9.0, 7.0, 8.0, 4.0, 5.0, 9.0, 2.0],
mode="markers",
marker=go.scatter.Marker(
symbol="triangle-up",
line=dict(color="rgba(255,0,0,0.5)", width=1.0),
size=11.0,
color="rgba(255,0,0,0.5)",
),
xaxis="x1",
yaxis="y1",
),
go.Scatter(
x=[-1.0, 1.0, -0.3, -0.6, 0.4, 0.8, -0.1, 0.7],
y=[-0.5, 0.4, 0.7, -0.6, 0.3, -1.0, 0.0, 0.3],
mode="markers",
marker=go.scatter.Marker(
symbol="square",
line=dict(color="rgba(128,0,128,0.5)", width=1.0),
size=8.0,
color="rgba(128,0,128,0.5)",
),
xaxis="x1",
yaxis="y1",
),
],
layout=go.Layout(
width=640,
height=480,
autosize=False,
margin=go.layout.Margin(l=80, r=63, b=52, t=57, pad=0),
hovermode="closest",
showlegend=False,
xaxis1=go.layout.XAxis(
domain=[0.0, 1.0],
range=[-1.5159626203173777, 8.4647578206295506],
type="linear",
showline=True,
ticks="inside",
nticks=7,
showgrid=False,
zeroline=False,
tickfont=dict(size=10.0),
anchor="y1",
side="bottom",
mirror="ticks",
),
yaxis1=go.layout.YAxis(
domain=[0.0, 1.0],
range=[-1.588616071428572, 9.5198093820861693],
type="linear",
showline=True,
ticks="inside",
nticks=7,
showgrid=False,
zeroline=False,
tickfont=dict(size=10.0),
anchor="x1",
side="left",
mirror="ticks",
),
),
)