This notebook plots the number of origins of viviparity and reversions to oviparity, broken down by tree. The result is a grouped histogram.
In [1]:
import pandas as pd
from pandas import *
import matplotlib.pyplot as plt
%matplotlib inline
from ggplot import *
from numpy import random
plt.style.use('ggplot')
Read data using pandas.
In [3]:
data = pd.read_csv("../Data/Histogram/pared_down.csv")
data
Out[3]:
In [99]:
data.columns
Out[99]:
Pivot the table to group the data by tree.
In [ ]:
table = pivot_table(data, index=['Tree'], columns=['Parameter'])
table
Plot using native pandas plotting.
In [32]:
table.plot(kind='bar', width=.7, sort_columns=True).set_ylim(0,75)
plt.tight_layout()
plt.savefig('exTotal.svg', bbox_inches='tight', dpi=300)
In [81]:
In [ ]: