In [7]:
%matplotlib inline
import numpy as np
import pandas as pd
from ggplot import *

x = np.array([1.458, 1.515, 1.535, 1.602, 1.931, 2.008, 2.200])
# x = np.array([0.263, 0.272, 0.282, 0.292, 0.419, 0.428, 0.871])
qplot(x) + geom_histogram() + xlab('Edge Weight') + ylab('# of Edges')


Out[7]:
<ggplot: (8781542520477)>

In [8]:
import matplotlib.pyplot as plt
from bionlp.util import plot
plot.MON = False
plt.rcParams['axes.labelweight'] = 'bold'
plot.plot_hist(x, 'Edge Weight', 'Number of Edges', title='', style='ggplot', facecolor='skyblue', fmt='pdf')