<jupyter_start><jupyter_text>___ ___ Matplotlib Exercises Welcome to the exercises for reviewing matplotlib! Take your time with these, Matplotlib can be tricky to understand at first. These are relatively simple plots, but they can be hard if this is your first time with matplotlib, feel free to reference the solutions as you go along.Also don't worry if you find the matplotlib syntax frustrating, we actually won't be using it that often throughout the course, we will switch to using pandas built-in visualization capabilities. But, those are built-off of matplotlib, which is why it is still important to get exposure to it!** * NOTE: ALL THE COMMANDS FOR PLOTTING A FIGURE SHOULD ALL GO IN THE SAME CELL. SEPARATING THEM OUT INTO MULTIPLE CELLS MAY CAUSE NOTHING TO SHOW UP. * ** ExercisesFollow the instructions to recreate the plots using this data: Data<jupyter_code>import numpy as np
x = np.arange(0,100)
y = x * 2
z = x ** 2<jupyter_output><empty_output><jupyter_text>** Import matplotlib.pyplot as plt and set %matplotlib inline if you are using the jupyter notebook. What command do you use if you aren't using the jupyter notebook?**<jupyter_code>import matplotlib.pyplot as plt
%matplotlib inline

plt.show()<jupyter_output><empty_output><jupyter_text>Exercise 1** Follow along with these steps: *** ** Create a figure object called fig using plt.figure() *** ** Use add_axes to add an axis to the figure canvas at [0,0,1,1]. Call this new axis ax. *** ** Plot (x,y) on that axes and set the labels and titles to match the plot below:**  Exercise 2** Create a figure object and put two axes on it, ax1 and ax2. Located at [0,0,1,1] and [0.2,0.5,.2,.2] respectively.**<jupyter_code>print('hi')<jupyter_output>hi
{'fraction_non_alphanumeric': 0.07696759259259259, 'fraction_numerical': 0.013888888888888888, 'mean_word_length': 5.045454545454546, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '576472', 'license': 'Apache-2.0', 'n_tokens_mistral': 543, 'n_tokens_neox': 511, 'n_words': 248, 'path': '04-Visualization-Matplotlib-Pandas/04a-Matplotlib/.ipynb_checkpoints/4a - Matplotlib Exercises -checkpoint.ipynb', 'repo_name': 'funeconomist/algorithmic-trading', 'size': '1728'}