Spaces:
Sleeping
Sleeping
Joseph Spada
commited on
Commit
·
1df9bbe
1
Parent(s):
b127142
plot formatting
Browse files
app.py
CHANGED
@@ -99,13 +99,23 @@ def plot_interest_coverage(interest_rate, cagr_revenues):
|
|
99 |
label = "Average Rate on Federal Debt"
|
100 |
)
|
101 |
# plot average rate on federal debt projected
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
# plot interest / revenues (baseline)
|
110 |
plt.plot(
|
111 |
data.index,
|
@@ -162,7 +172,7 @@ def plot_interest_coverage(interest_rate, cagr_revenues):
|
|
162 |
plt.ylim(0, 1.05)
|
163 |
plt.yticks(np.arange(0, 1.1, 0.1))
|
164 |
plt.xticks(range(1940,2055,4), rotation = 45)
|
165 |
-
plt.axvline(x =
|
166 |
plt.grid(True, axis = 'y', linestyle = '--', linewidth = 0.7)
|
167 |
|
168 |
# Save the plot to a file
|
|
|
99 |
label = "Average Rate on Federal Debt"
|
100 |
)
|
101 |
# plot average rate on federal debt projected
|
102 |
+
if cagr_revenues != baseline_cagr_revenues or interest_rate != baseline_interest_rate:
|
103 |
+
plt.plot(
|
104 |
+
data.index,
|
105 |
+
data["Average Rate on Federal Debt (Projected)"],
|
106 |
+
color = "Green",
|
107 |
+
label = "Average Rate on Federal Debt (Projected)",
|
108 |
+
linestyle = "--"
|
109 |
+
)
|
110 |
+
else:
|
111 |
+
plt.plot(
|
112 |
+
data.index,
|
113 |
+
data["Average Rate on Federal Debt (Baseline)"],
|
114 |
+
color = "Green",
|
115 |
+
label = "Average Rate on Federal Debt (Projected)",
|
116 |
+
linestyle = "--"
|
117 |
+
)
|
118 |
+
|
119 |
# plot interest / revenues (baseline)
|
120 |
plt.plot(
|
121 |
data.index,
|
|
|
172 |
plt.ylim(0, 1.05)
|
173 |
plt.yticks(np.arange(0, 1.1, 0.1))
|
174 |
plt.xticks(range(1940,2055,4), rotation = 45)
|
175 |
+
plt.axvline(x = 2025, color = "black", linestyle = '--')
|
176 |
plt.grid(True, axis = 'y', linestyle = '--', linewidth = 0.7)
|
177 |
|
178 |
# Save the plot to a file
|