Skip to content

Commit

Permalink
fix: consider full list of resources
Browse files Browse the repository at this point in the history
  • Loading branch information
rouille committed Sep 17, 2020
1 parent 775a92e commit f92338a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions postreise/plot/analyze_pg.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import matplotlib.dates as mdates
from pandas.plotting import scatter_matrix

from postreise.analyze.helpers import get_resources_in_grid
from powersimdata.network.usa_tamu.constants.plants import type2color, type2label


Expand Down Expand Up @@ -378,7 +377,7 @@ def _get_chart(self, zone):
)

t2l = type2label.copy()
for t in get_resources_in_grid(self.grid):
for t in type2label.keys():
if t not in pg_groups.columns:
del t2l[t]

Expand Down Expand Up @@ -505,7 +504,7 @@ def _get_stacked(self, zone):
ax = fig.gca()

t2l = type2label.copy()
for t in get_resources_in_grid(self.grid):
for t in type2label.keys():
if t not in pg_stack.columns:
del t2l[t]

Expand Down

0 comments on commit f92338a

Please sign in to comment.