Scatterplot by residue charge.

def scatterplot_charges(self, title, csv_filename, analysis_set = ''):
        '''Scatterplot by residue charge.'''

        # Create CSV input
        new_dataframe = self.dataframe.copy()
        experimental_field = BenchmarkRun.get_analysis_set_fieldname('Experimental', analysis_set)
        new_dataframe = new_dataframe[[experimental_field, 'Predicted', 'ResidueCharges']]
        new_dataframe['Opacity'] = 0.4
        new_dataframe = new_dataframe.dropna(subset = [experimental_field, 'Predicted'])
        new_dataframe.to_csv(csv_filename, sep = ',', header = True)

        plot_scale = '''
plot_scale <- scale_color_manual(
    values = c( "None" = '#777777', "Change" = '%(cornflower_blue)s', "Polar/Charged" = 'magenta', "Hydrophobic/Non-polar" = 'green'),
    labels = c( "None" = "N/A", "Change" = "Change", "Polar/Charged" = "Polar/Charged", "Hydrophobic/Non-polar" = "Hydrophobic/Non-polar"))''' % plot_colors
        return self.scatterplot_color_by_series(xseries = experimental_field, colorseries = "ResidueCharges", title = title, plot_scale = plot_scale, point_opacity = 0.6, analysis_set = analysis_set)