Spaces:
Sleeping
Sleeping
add horizontal line as well
Browse files
app.py
CHANGED
|
@@ -97,6 +97,7 @@ value, aux = loss_fn(params)
|
|
| 97 |
(cicle_plot,) = axes[0].plot(x, circle_fn(x), color="blue")
|
| 98 |
(circle_perpendicular_plot,) = axes[0].plot(x, aux["perpendicular_circle_fn"](x), color="blue", linestyle="--")
|
| 99 |
x_star, y_star = aux["x_star"], aux["y_star"]
|
|
|
|
| 100 |
radius = aux["r"]
|
| 101 |
axes[0].add_patch(plt.Circle((x_star, y_star), radius, fill=False))
|
| 102 |
|
|
@@ -123,6 +124,7 @@ with st.empty():
|
|
| 123 |
cicle_plot.set_data(x, circle_fn(x))
|
| 124 |
circle_perpendicular_plot.set_data(x, aux["perpendicular_circle_fn"](x))
|
| 125 |
x_star, y_star = aux["x_star"], aux["y_star"]
|
|
|
|
| 126 |
radius = aux["r"]
|
| 127 |
axes[0].add_patch(plt.Circle((x_star, y_star), radius, fill=False))
|
| 128 |
|
|
|
|
| 97 |
(cicle_plot,) = axes[0].plot(x, circle_fn(x), color="blue")
|
| 98 |
(circle_perpendicular_plot,) = axes[0].plot(x, aux["perpendicular_circle_fn"](x), color="blue", linestyle="--")
|
| 99 |
x_star, y_star = aux["x_star"], aux["y_star"]
|
| 100 |
+
(x0_perpendicular_plot,) = axes[0].plot([0, 1], [y_star, y_star], color="black", linestyle="--")
|
| 101 |
radius = aux["r"]
|
| 102 |
axes[0].add_patch(plt.Circle((x_star, y_star), radius, fill=False))
|
| 103 |
|
|
|
|
| 124 |
cicle_plot.set_data(x, circle_fn(x))
|
| 125 |
circle_perpendicular_plot.set_data(x, aux["perpendicular_circle_fn"](x))
|
| 126 |
x_star, y_star = aux["x_star"], aux["y_star"]
|
| 127 |
+
x0_perpendicular_plot.set_data([0, 1], [y_star, y_star])
|
| 128 |
radius = aux["r"]
|
| 129 |
axes[0].add_patch(plt.Circle((x_star, y_star), radius, fill=False))
|
| 130 |
|