[text] POSTER

Viewer

  1. import matplotlib.pyplot as plt
  2.  
  3. # Define the dimensions of the poster
  4. width = 16
  5. height = 12
  6.  
  7. # Create a new figure
  8. fig, ax = plt.subplots(figsize=(width, height))
  9.  
  10. # Set the background color
  11. ax.set_facecolor('black')
  12.  
  13. # Create a circle to represent the head
  14. head_center = (width / 2, height / 2)
  15. head_radius = 4
  16. head_color = 'gray'
  17. head = plt.Circle(xy=head_center, radius=head_radius, color=head_color)
  18. ax.add_patch(head)
  19.  
  20. # Create lines to represent the handicaps
  21. handicap_color = 'red'
  22. handicap_width = 2
  23.  
  24. # Handcuffs on the wrists
  25. handcuff_left_center = (head_center[0] - head_radius / 2, head_center[1] - head_radius)
  26. handcuff_right_center = (head_center[0] + head_radius / 2, head_center[1] - head_radius)
  27. handcuff_length = 2 * head_radius
  28. handcuff_left = plt.Line2D((head_center[0], handcuff_left_center[0]), (head_center[1], handcuff_left_center[1]), color=handicap_color, linewidth=handicap_width)
  29. handcuff_right = plt.Line2D((head_center[0], handcuff_right_center[0]), (head_center[1], handcuff_right_center[1]), color=handicap_color, linewidth=handicap_width)
  30. ax.add_line(handcuff_left)
  31. ax.add_line(handcuff_right)
  32.  
  33. # Leg weights
  34. leg_weight_center = (head_center[0], head_center[1] - head_radius - head_radius / 2)
  35. leg_weight_radius = head_radius / 3
  36. leg_weight_color = 'gray'
  37. leg_weight = plt.Circle(xy=leg_weight_center, radius=leg_weight_radius, color=leg_weight_color)
  38. ax.add_patch(leg_weight)
  39.  
  40. # Text overlay
  41. text_color = 'white'
  42. text_font_size = 24
  43. text_position = (head_center[0], head_center[1] + head_radius / 2)
  44. text = "Mediocrity Reigns"
  45. ax.text(text_position[0], text_position[1], text, ha='center', va='center', color=text_color, fontsize=text_font_size)
  46.  
  47. # Remove axes and ticks
  48. ax.axis('off')
  49. ax.tick_params(bottom=False, left=False, labelbottom=False, labelleft=False)
  50.  
  51. # Save the poster as an image
  52. plt.savefig('mediocrity_reigns.png', bbox_inches='tight')

Editor

You can edit this paste and save as new:


File Description
  • POSTER
  • Paste Code
  • 10 Dec-2023
  • 1.89 Kb
You can Share it: