def test_line_filter_title(plot_df): fig, ax = plt.subplots(figsize=(8, 8)) plot_df.filter(variable='Primary Energy|Coal').line_plot(ax=ax, color='model', marker='scenario', legend=True) return fig
def test_bar_plot_title(plot_df): fig, ax = plt.subplots(figsize=(8, 8)) (plot_df.filter(variable='Primary Energy', model='test_model').bar_plot(ax=ax, bars='scenario', title='foo')) return fig
def test_bar_plot_stacked(plot_df): fig, ax = plt.subplots(figsize=(8, 8)) (plot_df.filter(variable='Primary Energy', model='test_model').bar_plot(ax=ax, bars='scenario', stacked=True)) return fig
def test_line_plot_1_var(plot_df): fig, ax = plt.subplots(figsize=(8, 8)) (plot_df.filter(model='test_model', scenario='test_scenario').line_plot(x='Primary Energy', y='year', ax=ax, legend=False)) return fig
def test_pie_plot_legend(plot_df): fig, ax = plt.subplots(figsize=(8, 8)) (plot_df.filter(variable='Primary Energy', model='test_model', year=2010).pie_plot(ax=ax, category='scenario', labels=None, legend=True)) return fig
def test_bar_plot_rc(plot_df): with update_run_control( {'color': { 'scenario': { 'test_scenario': 'black' } }}): fig, ax = plt.subplots(figsize=(8, 8)) (plot_df.filter(variable='Primary Energy', model='test_model').bar_plot(ax=ax, bars='scenario')) return fig
def test_stack_plot_other(plot_df): fig, ax = plt.subplots(figsize=(8, 8)) with update_run_control( {'color': { 'scenario': { 'test_scenario': 'black' } }}): (plot_df.filter(variable='Primary Energy', model='test_model').stack_plot(ax=ax, stack='scenario', cmap='viridis', title='foo')) return fig
def test_stack_plot(plot_df): fig, ax = plt.subplots(figsize=(8, 8)) (plot_df.filter(variable='Primary Energy', model='test_model').stack_plot(ax=ax, stack='scenario')) return fig