In [1]:
%matplotlib inline
import matplotlib.pyplot as plt
In [2]:
y = [1, 7, 3, 5, 12]
x = [1, 2, 3, 4, 5]
plt.plot(x, y, marker='o');
In [3]:
plt.plot(x, y, marker='o')
plt.grid()
In [4]:
plt.scatter(x, y, marker='x');
In [5]:
plt.bar(x, y);
In [6]:
%config InlineBackend.figure_format = 'pdf'
plt.bar(x, y);
In [7]:
%config InlineBackend.figure_format = 'png'
plt.bar(x, y);
In [8]:
anos = [1950, 1960, 1970, 1980, 1990, 2000, 2010]
pib = [300.2, 543.3, 1075.9, 2862.5, 5979.6, 10289.7, 14958.3]
plt.plot(anos, pib, marker='o')
plt.title('PIB')
plt.xlabel('Ano')
plt.ylabel(u'Bilhões de R$')
plt.grid()
In [9]:
import matplotlib
matplotlib.__version__
Out[9]:
In [10]:
print(plt.style.available)
In [11]:
plt.rcdefaults()
In [12]:
plt.plot(x, y, marker='o')
plt.grid()
In [13]:
plt.style.use('classic')
In [14]:
plt.plot(x, y, marker='o')
plt.grid()
In [15]:
plt.rcdefaults()
plt.style.use('seaborn-white')
In [16]:
plt.plot(x, y, marker='o')
plt.grid()
In [ ]: