This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def stacked_bar_chart(pivoted_df, stack_vals, level_values_field, chart_title, x_label, y_label, filename, color1, color2): | |
# | |
# stacked_bar_chart: draws and saves a barchart figure to filename | |
# | |
# pivoted_df: dataframe which has been pivoted so columns correspond to the values to be plotted | |
# stack_vals: the column names in pivoted_df to plot | |
# level_values_field: column in the dataframe which has the values to be plotted along the x axis (typically time dimension) | |
# chart_title: how to title chart | |
# x_label: label for x axis | |
# y_label: label for y axis |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import numpy as np | |
import matplotlib.pyplot as plt | |
%matplotlib inline | |
import matplotlib as mpl | |
# plot title | |
mpl.rcParams['axes.titlesize'] = 18 |
OlderNewer