Make a scatter plot of two principal components. You can create
        differently colored, sized, or marked scatter points.

        Parameters
        ----------
        pc1 : str
            String of form PCX where X is the number of the principal component
            you want to plot on the x-axis.
        
        pc2 : str
            String of form PCX where X is the number of the principal component
            you want to plot on the y-axis.

        v : bool
            If True, use the v matrix for plotting the principal components
            (typical if input data was genes as rows and samples as columns).
            If False, use the u matrix.

        subset : list
            Make the scatter plot using only a subset of the rows of u or v.

        ax : matplotlib.axes
            Plot the scatter plot on this axis.

        color : pandas.Series
            Pandas series containing a categorical variable to color the scatter
            points. Currently limited to 10 distinct values (colors).

        s : pandas.Series
            Pandas series containing a categorical variable to size the scatter
            points. Currently limited to 7 distinct values (sizes).

        marker : pandas.Series
            Pandas series containing a categorical variable to choose the marker
            type for the scatter points. Currently limited to 21 distinct values
            (marker styles).

        color_name : str
            Name for the color legend if a categorical variable for color is
            provided.

        s_name : str
            Name for the size legend if a categorical variable for size is
            provided.

        marker_name : str
            Name for the marker legend if a categorical variable for marker type
            is provided.

        Returns
        -------
        ax : matplotlib.axes._subplots.AxesSubplot
            Scatter plot axis.

        TODO: Add ability to label points.

def plot_pc_scatter(self, pc1, pc2, v=True, subset=None, ax=None,
                        color=None, s=None, marker=None, color_name=None,
                        s_name=None, marker_name=None):
        """
        Make a scatter plot of two principal components. You can create
        differently colored, sized, or marked scatter points.

        Parameters
        ----------
        pc1 : str
            String of form PCX where X is the number of the principal component
            you want to plot on the x-axis.
        
        pc2 : str
            String of form PCX where X is the number of the principal component
            you want to plot on the y-axis.

        v : bool
            If True, use the v matrix for plotting the principal components
            (typical if input data was genes as rows and samples as columns).
            If False, use the u matrix.

        subset : list
            Make the scatter plot using only a subset of the rows of u or v.

        ax : matplotlib.axes
            Plot the scatter plot on this axis.

        color : pandas.Series
            Pandas series containing a categorical variable to color the scatter
            points. Currently limited to 10 distinct values (colors).

        s : pandas.Series
            Pandas series containing a categorical variable to size the scatter
            points. Currently limited to 7 distinct values (sizes).

        marker : pandas.Series
            Pandas series containing a categorical variable to choose the marker
            type for the scatter points. Currently limited to 21 distinct values
            (marker styles).

        color_name : str
            Name for the color legend if a categorical variable for color is
            provided.

        s_name : str
            Name for the size legend if a categorical variable for size is
            provided.

        marker_name : str
            Name for the marker legend if a categorical variable for marker type
            is provided.

        Returns
        -------
        ax : matplotlib.axes._subplots.AxesSubplot
            Scatter plot axis.

        TODO: Add ability to label points. 
        """
        import matplotlib.pyplot as plt
        if v:
            df = self.v
        else:
            df = self.u
        if color is not None:
            colormap = pd.Series(dict(zip(set(color.values),
                                          tableau20[0:2 * len(set(color)):2])))
            color = pd.Series([colormap[x] for x in color.values],
                              index=color.index)
            color_legend = True
            if not color_name:
                color_name = color.index.name
        else:
            color = pd.Series([tableau20[0]] * df.shape[0], index=df.index)
            color_legend = False
        if s is not None:
            smap = pd.Series(dict(zip(
                set(s.values), range(30, 351)[0::50][0:len(set(s)) + 1])))
            s = pd.Series([smap[x] for x in s.values],
                          index=s.index)
            s_legend = True
            if not s_name:
                s_name = s.index.name
        else:
            s = pd.Series(30, index=df.index)
            s_legend = False
        markers = ['o', '*', 's', 'v', '+', 'x', 'd', 
                   'p', '2', '<', '|', '>', '_', 'h', 
                   '1', '2', '3', '4', '8', '^', 'D']
        if marker is not None:
            markermap = pd.Series(dict(zip(set(marker.values), markers)))
            marker = pd.Series([markermap[x] for x in marker.values],
                               index=marker.index)
            marker_legend = True
            if not marker_name:
                marker_name = marker.index.name
        else:
            marker = pd.Series('o', index=df.index)
            marker_legend = False
        if ax is None:
            fig, ax = plt.subplots(1, 1)
        for m in set(marker.values):
            mse = marker[marker == m]
            cse = color[mse.index]
            sse = s[mse.index]
            ax.scatter(df.ix[mse.index, pc1], df.ix[mse.index, pc2],
                       s=sse.values, color=list(cse.values), marker=m, 
                       alpha=0.8)
        
        ax.set_title('{} vs. {}'.format(pc1, pc2))
        ax.set_xlabel(pc1)
        ax.set_ylabel(pc2)
    
        if color_legend:
            legend_rects = make_color_legend_rects(colormap)
            for r in legend_rects:
                ax.add_patch(r)
            lgd = ax.legend(legend_rects.values, labels=legend_rects.index, 
                             title=color_name,
                             loc='upper left',
                             bbox_to_anchor=(1, 1))
        
        if s_legend:
            if lgd:
                lgd = ax.add_artist(lgd)
            xa, xb = ax.get_xlim()
            ya, yb = ax.get_ylim()
            for i in smap.index:
                ax.scatter([xb + 1], [yb + 1], marker='o', 
                           s=smap[i], color='black', label=i)
            lgd = ax.legend(title=s_name, loc='center left', 
                            bbox_to_anchor=(1, 0.5))
            ax.set_xlim(xa, xb)
            ax.set_ylim(ya, yb)
            
        if marker_legend:
            if lgd:
                lgd = ax.add_artist(lgd)
            xa, xb = ax.get_xlim()
            ya, yb = ax.get_ylim()
            for i in markermap.index:
                t = ax.scatter([xb + 1], [yb + 1], marker=markermap[i], 
                               s=sse.min(), color='black', label=i)
                
            handles, labels = ax.get_legend_handles_labels()
            if s_legend:
                handles = handles[len(smap):]
                labels = labels[len(smap):]
            lgd = ax.legend(handles, labels, title=marker_name, 
                            loc='lower left', bbox_to_anchor=(1, 0))
            ax.set_xlim(xa, xb)
            ax.set_ylim(ya, yb)
        # fig.tight_layout()
        return fig, ax