Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -34,12 +34,12 @@ x = np.linspace(-10, 10, 400)
|
|
34 |
y1 = (c1 - a1*x) / b1
|
35 |
y2 = (c2 - a2*x) / b2
|
36 |
|
37 |
-
plt.
|
38 |
-
|
39 |
-
|
40 |
if intersection is not None:
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
st.pyplot()
|
|
|
34 |
y1 = (c1 - a1*x) / b1
|
35 |
y2 = (c2 - a2*x) / b2
|
36 |
|
37 |
+
fig, ax = plt.subplots()
|
38 |
+
ax.plot(x, y1, label='Уравнение 1')
|
39 |
+
ax.plot(x, y2, label='Уравнение 2')
|
40 |
if intersection is not None:
|
41 |
+
ax.scatter(intersection[0], intersection[1], color='red', label='Пересечение')
|
42 |
+
ax.set_xlabel('x')
|
43 |
+
ax.set_ylabel('y')
|
44 |
+
ax.legend()
|
45 |
+
st.pyplot(fig)
|