Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,9 +14,10 @@ def convert_to_meters(value, unit):
|
|
| 14 |
def draw_floor_plan(length, width, unit):
|
| 15 |
fig, ax = plt.subplots(figsize=(8, 8))
|
| 16 |
ax.plot([0, length, length, 0, 0], [0, 0, width, width, 0], marker='o', color='blue')
|
| 17 |
-
ax.set_xlim(-1
|
| 18 |
-
ax.set_ylim(-1
|
| 19 |
-
ax.set_aspect('equal', adjustable='
|
|
|
|
| 20 |
ax.set_title(f"Floor Plan ({unit})")
|
| 21 |
ax.set_xlabel(f"Length ({unit})")
|
| 22 |
ax.set_ylabel(f"Width ({unit})")
|
|
|
|
| 14 |
def draw_floor_plan(length, width, unit):
|
| 15 |
fig, ax = plt.subplots(figsize=(8, 8))
|
| 16 |
ax.plot([0, length, length, 0, 0], [0, 0, width, width, 0], marker='o', color='blue')
|
| 17 |
+
ax.set_xlim(-0.1 * length, 1.1 * length)
|
| 18 |
+
ax.set_ylim(-0.1 * width, 1.1 * width)
|
| 19 |
+
ax.set_aspect('equal', adjustable='datalim')
|
| 20 |
+
ax.grid(True, linestyle='--', alpha=0.6)
|
| 21 |
ax.set_title(f"Floor Plan ({unit})")
|
| 22 |
ax.set_xlabel(f"Length ({unit})")
|
| 23 |
ax.set_ylabel(f"Width ({unit})")
|