def make_contribplot(self, pc_to_look_at=1, sigadder=0.01, outpath=None, dpi=150, return_top_contribs=False):
        """Make a plot showing contributions of properties to a PC"""
        cont = pd.DataFrame(self.pca.components_, columns=self.features_df.index, index=self.pc_names_list)
        tmp_df = pd.DataFrame(cont.iloc[pc_to_look_at - 1]).reset_index().rename(columns={'index': 'Property'})
        tmp_df['Contribution'] = tmp_df.iloc[:, 1] ** 2
        tmp_df = tmp_df[tmp_df['Contribution'] > 1 / len(
                cont.iloc[0]) + sigadder]  # Alter sigadder to just plot more/less significant contributors
        tmp_df['Sign'] = np.where(tmp_df.iloc[:, 1] >= 0, 'Positive', 'Negative')
        tmp_df = tmp_df.sort_values(by='Contribution', ascending=False)

        fig, ax = plt.subplots(figsize=(30, 10))
        sns.barplot(data=tmp_df, y='Property', x='Contribution', hue='Sign', dodge=False, ax=ax, hue_order=['Positive', 'Negative'],
                        palette=sns.color_palette("coolwarm", 2))

        # Random formatting crap
        self._change_height(ax, .6)  # Make bars thinner
        ax.set_title('{} contributors'.format(self.pc_names_list[pc_to_look_at - 1]))
        legend = plt.legend(loc=8, bbox_to_anchor=(1.2, .8), ncol=1, title='Sign', fontsize=10)
        plt.setp(legend.get_title(), fontsize=12)
        plt.gcf().subplots_adjust(left=.5, right=.65)
        if outpath:
            fig.savefig(outpath, dpi=dpi)
        else:
            plt.show()
        plt.close()

        if return_top_contribs:
            return tmp_df.Property.values.tolist()
Make a plot showing contributions of properties to a PC