- import matplotlib.pyplot as plt
- # Given data
- hours_studying = [0.62, 1.50, 0.34, 0.97, 3.54, 0.69, 1.53, 0.32, 1.94, 1.25, 1.42, 3.07, 3.99, 1.73, 1.29]
- class_performance = [2.02, 4.62, 2.60, 1.59, 4.67, 2.52, 2.28, 1.68, 2.50, 4.04, 2.63, 3.53, 3.90, 2.75, 2.95]
- # Creating scatter plot
- plt.figure(figsize=(8, 6))
- plt.scatter(hours_studying, class_performance, color='blue', alpha=0.7)
- # Adding labels and title
- plt.title('Hours Studying vs Overall Class Performance')
- plt.xlabel('Hours Studying')
- plt.ylabel('Overall Class Performance')
- plt.grid(True)
- plt.show()
[text] b
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new:
File Description
- b
- Paste Code
- 04 May-2024
- 586 Bytes
You can Share it:
Latest Code Pastes