<jupyter_start><jupyter_text>Visualization 1: Matplotlib Basics Exercises<jupyter_code>%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np<jupyter_output><empty_output><jupyter_text>Scatter plots Learn how to use Matplotlib's `plt.scatter` function to make a 2d scatter plot.* Generate random data using `np.random.randn`.* Style the markers (color, size, shape, alpha) appropriately.* Include an x and y label and title.<jupyter_code>a= 10
x = np.random.rand(a)
y = np.random.rand(a)
colors = np.random.rand(a)
area = np.pi * (12 * np.random.rand(a))**2
plt.scatter(x, y, s=area, c=colors, alpha=0.5)
plt.xlabel('x')
plt.ylabel('y')
plt.title('Dots Are Fun')
plt.show()<jupyter_output><empty_output><jupyter_text>Histogram Learn how to use Matplotlib's `plt.hist` function to make a 1d histogram.* Generate randpom data using `np.random.randn`.* Figure out how to set the number of histogram bins and other style options.* Include an x and y label and title.<jupyter_code>np.random.randn
plt.hist(x, bins=10, normed = True)
plt.xlabel('x')
plt.ylabel('y')

plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12813620071684587, 'fraction_numerical': 0.010752688172043012, 'mean_word_length': 5.937888198757764, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '58689', 'license': 'MIT', 'n_tokens_mistral': 427, 'n_tokens_neox': 398, 'n_words': 117, 'path': 'assignments/assignment04/.ipynb_checkpoints/MatplotlibExercises-checkpoint.ipynb', 'repo_name': 'sthuggins/phys202-2015-work', 'size': '1116'}