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()
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter