Untitled
unknown
plain_text
4 months ago
1.2 kB
1
Indexable
import matplotlib.pyplot as plt # Create a figure for the design fig, ax = plt.subplots(figsize=(8, 6)) # Set the background to mimic the sky ax.set_facecolor("skyblue") # Draw the main tower using a rectangle tower = plt.Rectangle((3.5, 1), 1, 3, color="silver") ax.add_patch(tower) # Draw side arches using triangles left_arch = plt.Polygon([[3, 4], [4, 4], [3.5, 3]], color="lightblue") right_arch = plt.Polygon([[4, 4], [5, 4], [4.5, 3]], color="lightblue") ax.add_patch(left_arch) ax.add_patch(right_arch) # Draw the base of the memorial using a rectangle base = plt.Rectangle((3, 0.5), 2, 0.5, color="gray") ax.add_patch(base) # Draw the ground base for the structure ground = plt.Rectangle((2.5, 0), 3, 0.5, color="green") ax.add_patch(ground) # Draw the water body water = plt.Rectangle((0, -0.5), 8, 0.5, color="lightblue") ax.add_patch(water) # Set limits and remove axes ax.set_xlim(0, 8) ax.set_ylim(-0.5, 5) ax.axis("off") # Save the output as a JPEG file output_path = "/mnt/data/jatiyo_sriti_shoudho_design.jpeg" plt.savefig(output_path, dpi=300, bbox_inches='tight') plt.close(fig) output_path
Editor is loading...
Leave a Comment