Code for Curve 3 Titles 'Curly Bracket'
Tue Nov 14 2023 19:52:50 GMT+0000 (Coordinated Universal Time)
Saved by
@dr_dziedzorm
import numpy as np
import matplotlib.pyplot as plt
# Define the parameters for the bracket
height = 5
width = 1
# Create the figure and axis
fig, ax = plt.subplots()
# Main body of the bracket: vertical line
ax.plot([width, width], [1, height - 1], color='black')
# Top curl: using an Arc
top_curl = Arc((width, height - 1), width * 2, width * 2, angle=0, theta1=0, theta2=180, color='black')
ax.add_patch(top_curl)
# Bottom curl: using an Arc
bottom_curl = Arc((width, 1), width * 2, width * 2, angle=0, theta1=180, theta2=360, color='black')
ax.add_patch(bottom_curl)
# Set the aspect ratio of the plot to equal
ax.set_aspect('equal')
# Remove the axes
plt.axis('off')
# Display the plot
plt.show()
content_copyCOPY
Comments