Plotter
Methods:
.helper_for_plotting_fig_3abcde
.helper_for_plotting_fig_3abcde(
interpreter, xlim, gs, row, fig, max_y_percent, ADD_SECOND_COLUMN,
split_legend = True
)
.helper_for_plotting_fig_2abcde
.helper_for_plotting_fig_2abcde(
ax, interpreter, xlim, title, add_ylabel = True, add_xlabel = True,
ylim_constraint = 100000, split_legend = True
)
.plot_fig_3abcde_updated
.plot_fig_3abcde_updated(
results, xlim, ADD_SECOND_COLUMN = False
)
.plot_fig_3ab
.plot_fig_3ab(
monte_carlo_data, food_names, removed, added
)
.plot_fig_s2abcd
.plot_fig_s2abcd(
interpreter1, interpreter2, xlim1, xlim2
)
.getylim_nutrients
.getylim_nutrients(
interpreter, xlim
)
.plot_histogram
.plot_histogram(
ax, data, N, xlabel, ylabel, title
)
Plots a histogram of the given data on the given axis with the given labels and title.
Args
- ax (matplotlib.axes.Axes) : The axis to plot the histogram on.
- data (list) : The data to plot.
- N (int) : The number of data points.
- xlabel (str) : The label for the x-axis.
- ylabel (str) : The label for the y-axis.
- title (str) : The title for the plot.
Returns
None
Example
>>> data = [1, 2, 3, 4, 5]
>>> N = 5
>>> xlabel = "X Label"
>>> ylabel = "Y Label"
>>> title = "Title"
>>> plot_histogram(ax, data, N, xlabel, ylabel, title)
.plot_histogram_with_boxplot
.plot_histogram_with_boxplot(
data, xlabel, title
)
.get_people_fed_legend
.get_people_fed_legend(
interpreter, is_nuclear_winter, split_legend = False
)
.get_feed_biofuels_legend
.get_feed_biofuels_legend(
interpreter
)
.plot_monthly_reductions_seasonally
.plot_monthly_reductions_seasonally(
ratios
)
.plot_monthly_reductions_no_seasonality
.plot_monthly_reductions_no_seasonality(
all_months_reductions
)
Plot the reduction each month, showing the seasonal variability.
.plot_food
.plot_food(
food, title
)
Plot the food generically with the 3 macronutrients.
.plot_food_alternative
.plot_food_alternative(
food, title
)
Plot the food generically with the 3 macronutrients (alternative layout).