#!/usr/bin/env python # coding: utf-8 # # Weekly exercise 8: Simple Matplotlib exercises # # Follow the compulsory QuantEcon DataScience tutorial at # [https://datascience.quantecon.org/applications/visualization_rules.html](https://datascience.quantecon.org/applications/visualization_rules.html) # ## Task 1 # # Import the necessary libraries # In[ ]: # hint: we need pd and plt @@@ # print the graphs in the notebook get_ipython().run_line_magic('matplotlib', 'inline') # ## Task 2 # # Import the dataset from [https://raw.githubusercontent.com/guipsamora/pandas_exercises/master/07_Visualization/Tips/tips.csv](https://raw.githubusercontent.com/guipsamora/pandas_exercises/master/07_Visualization/Tips/tips.csv) # # Assign it to a variable called tips # # Take the first look at the dataset # In[ ]: # write your code here # ## Task 3 # # Delete the Unnamed 0 column # In[ ]: # write your code here # ## Task 4 # # Plot the total_bill column histogram: # # - create the histogram plot object # - set axes labels and plot title # # # Follow [https://matplotlib.org/gallery/pyplots/pyplot_text.html#sphx-glr-gallery-pyplots-pyplot-text-py](https://matplotlib.org/gallery/pyplots/pyplot_text.html#sphx-glr-gallery-pyplots-pyplot-text-py) # In[ ]: # write your code here # ## Task 5 # # Create a scatter plot presenting the relationship between total_bill and tip, # using one function. # In[ ]: # write your code here # ## Task 6 # # Create one 3 by 3 image with the relationship of total_bill, tip and size. # Again, use just one function. # In[ ]: # write your code here # ## Task 7 # # Present the relationship between days and total_bill value. # Use `jitter = True` argument for visual appeal. # In[ ]: # write your code here # ## Task 8 # # Create two scatterplot graphs, one for Male and another for Female, presenting the total_bill value and tip relationship, differing by smoker or non-smoker. Add a legend. # In[ ]: # write your code here