Spaces:
Running
Running
fig format
Browse files
app.py
CHANGED
@@ -28,15 +28,18 @@ def get_blocks_party_spaces_with_formula(formula=None):
|
|
28 |
def create_scatter(x, y, z):
|
29 |
df = get_blocks_party_spaces()
|
30 |
if z is None or z == 'None' or z == '':
|
31 |
-
# fig = plt.figure()
|
32 |
-
# ax = fig.add_subplot()
|
33 |
fig, ax = plt.subplots()
|
34 |
-
|
35 |
-
ax.scatter(list(df[x]),list(df[y]))
|
36 |
for i, label in enumerate(list(df['model'])):
|
37 |
ax.text(list(df[x])[i],list(df[y])[i],str(label))
|
38 |
ax.set_xlabel(x)
|
39 |
ax.set_ylabel(y)
|
|
|
|
|
|
|
|
|
|
|
40 |
else:
|
41 |
fig = px.scatter_3d(df, x=x, y=y, z=z, text=df['model'])
|
42 |
|
@@ -93,3 +96,4 @@ with block:
|
|
93 |
block.load(get_blocks_party_spaces_with_formula, inputs=None, outputs=data)
|
94 |
|
95 |
block.launch(share=True)
|
|
|
|
28 |
def create_scatter(x, y, z):
|
29 |
df = get_blocks_party_spaces()
|
30 |
if z is None or z == 'None' or z == '':
|
|
|
|
|
31 |
fig, ax = plt.subplots()
|
32 |
+
|
33 |
+
ax.scatter(list(df[x]),list(df[y]), marker='o', s=50, c='blue')
|
34 |
for i, label in enumerate(list(df['model'])):
|
35 |
ax.text(list(df[x])[i],list(df[y])[i],str(label))
|
36 |
ax.set_xlabel(x)
|
37 |
ax.set_ylabel(y)
|
38 |
+
|
39 |
+
ax.spines['top'].set_visible(False)
|
40 |
+
ax.spines['right'].set_visible(False)
|
41 |
+
plt.grid(axis='y', linestyle='--', alpha=0.7)
|
42 |
+
|
43 |
else:
|
44 |
fig = px.scatter_3d(df, x=x, y=y, z=z, text=df['model'])
|
45 |
|
|
|
96 |
block.load(get_blocks_party_spaces_with_formula, inputs=None, outputs=data)
|
97 |
|
98 |
block.launch(share=True)
|
99 |
+
# block.launch( )
|