PLOTS

In this section we will make some plots. Dataset credit: http://www.climatedata.info/proxies/data-downloads/

Download the dataset here: https://raw.githubusercontent.com/IIPBC/Material/master/HandsOn_2_matplotlib/climatedata.csv

1) Import the wished libraries

2) Read your dataset

3) Read the variables

4) Make a simple plot!

5) Show that to us!

6) Change the color of your plot.

7) Configure your the axis of your plot (label, size, etc.)

8) Change the y axis of your plot to log scale! (You may want to test both axis and see what happens)

8) Now make a histogram of the temperature.

9) Change the bins of your histogram.

10) Add a random text in your histogram.

11) Make small tailoring of your histogram: add a grid, edit the opacity of the plot and/or the grid, change the bin size, change the color, etc.

12) Create two plots at once. Hint: use "subplots"


In [1]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt


/home/mldantas/anaconda2/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')

In [ ]:
my_data = pd.read_csv("/home/climatedata.csv")