Guest User

Untitled

a guest
Nov 17th, 2024
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3.  
  4. # Generate theta values
  5. theta = np.linspace(0, 2 * np.pi, 1000)
  6.  
  7. # Generate radius values as a sine wave
  8. sine = 30 + np.sin(6 * theta)
  9. circle = np.full_like(theta, 30)
  10.  
  11. # Create polar plot
  12. plt.figure()
  13. ax = plt.subplot(111, projection='polar')
  14. ax.plot(theta, sine)
  15. ax.plot(theta, circle)
  16.  
  17. # Set the limits for the radial axis
  18. ax.set_ylim(0, 35)
  19.  
  20. # Display the plot
  21. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment