@staticmethod
def _plot_theme(grid_axis='both', grid_lines='both', theme='bw'):
    """Internal function provides consistent theme across plots.
        Currently a slightly modified version of theme_bw() with configurable grid lines.

        Args:
            grid_axis: controls the axis on which to draw grid lines
                - Accepts: None, 'x', 'y', 'both'
                - Default: 'both'
            grid_lines: controls whether major or minor grid lines are drawn
                - Accepts: None, 'major', 'minor', 'both'
                - Default: 'both'
            theme:
                - Accepts: 'bw', 'classic', 'gray', 'grey', 'seaborn', '538', 'dark', 'matplotlib', 'minimal', 'xkcd', 'light'
                - Default: 'bw'
        Returns:
            A theme object to be added to a plotnine.ggplot() object.
        """
    import plotnine as gg
    assert grid_axis in [None, 'x', 'y', 'both']
    assert grid_lines in [None, 'major', 'minor', 'both']
    assert theme in ['bw', 'classic', 'gray', 'grey', 'seaborn', '538',
        'dark', 'matplotlib', 'minimal', 'xkcd', 'light']
    drop_grid = set()
    if grid_axis is None or grid_lines is None:
        drop_grid.update(['panel_grid_major', 'panel_grid_minor'])
    elif grid_axis == 'x':
        drop_grid.update(['panel_grid_major_y', 'panel_grid_minor_y'])
        if grid_lines == 'major':
            drop_grid.add('panel_grid_minor_y')
        elif grid_lines == 'minor':
            drop_grid.add('panel_grid_major_y')
    elif grid_axis == 'y':
        drop_grid.update(['panel_grid_major_x', 'panel_grid_minor_x'])
        if grid_lines == 'major':
            drop_grid.add('panel_grid_minor_x')
        elif grid_lines == 'minor':
            drop_grid.add('panel_grid_major_x')
    grid_opt = dict()
    for x in drop_grid:
        grid_opt[x] = gg.element_blank()
    return getattr(gg, 'theme_' + theme)() + gg.theme(panel_border=gg.
        element_blank(), axis_line=gg.element_line(color='black'), **grid_opt)
