In [1]:
import matplotlib.pyplot as plt
import numpy as np
In [2]:
%matplotlib inline
In [3]:
hotels = ['La Quinta', 'Omni', 'Premiere Hote & Suits', 'Econo Lodge', 'The Study']
bringfidoratings = [4, 4, 4, 1, 0]
tripadvisorratings = [3, 4.2, 4, 1.5, 4.5]
bringfidonum = [2, 0, 6, 3, 0]
tripadvisornum = [334, 905, 314, 74, 566]
In [4]:
font = {'family' : 'normal',
'weight' : 'bold',
'size' : 22}
plt.rc('font', **font)
plt.rcParams['figure.figsize'] = 12.94, 8
fig, ax = plt.subplots(1, 1)
ax.plot(bringfidoratings, tripadvisorratings, 'o', color='#46959E', ms=12, markeredgecolor='#555555')
ax.set_xlim([-0.5, 5.5])
ax.set_ylim([-0.5, 5.5])
ax.set_xlabel('BringFido.com Rating')
ax.set_ylabel('TripAdvisor Rating')
ax.plot([-0.5, 5.5], [-0.5, 5.5], color='#BA4C37')
plt.savefig('Ratings.png', dpi=144)
In [5]:
plt.rcParams['figure.figsize'] = 12.94, 8
fig, ax = plt.subplots(1, 1)
ax.plot(bringfidonum, tripadvisornum, 'o', color='#46959E', ms=12, markeredgecolor='#555555')
ax.set_xlim([np.min(bringfidonum) - 1, np.max(bringfidonum) + 1])
#ax.set_ylim([-0.5, 5.5])
ax.set_xlabel('Number of BringFido.com Text Reviews')
ax.set_ylabel('Number of TripAdvisor Text Reviews')
#ax.plot([-0.5, 5.5], [-0.5, 5.5], color='#BA4C37')
plt.savefig('Reviews.png', dpi=144)
In [6]:
plt.rcParams['figure.figsize'] = 10.5, 12.94
fig, ax = plt.subplots(2, 1)
ax[0].plot(bringfidoratings, tripadvisorratings, 'o', color='#46959E', ms=12, markeredgecolor='#555555')
ax[0].set_xlim([-0.5, 5.5])
ax[0].set_ylim([-0.5, 5.5])
ax[0].set_xlabel('BringFido.com Rating')
ax[0].set_ylabel('TripAdvisor Rating')
ax[0].plot([-0.5, 5.5], [-0.5, 5.5], color='#BA4C37')
ax[1].plot(bringfidonum, tripadvisornum, 'o', color='#46959E', ms=12, markeredgecolor='#555555')
ax[1].set_xlim([np.min(bringfidonum) - 1, np.max(bringfidonum) + 1])
ax[1].set_xlabel('Number of BringFido.com Text Reviews')
ax[1].set_ylabel('Number of TripAdvisor Text Reviews')
plt.savefig('CombinedPlot.png', dpi=144)
In [ ]: