-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added plot function to plot stacked end-uses
- Loading branch information
eggimasv
authored and
eggimasv
committed
Mar 20, 2017
1 parent
798bf92
commit ca604f1
Showing
16 changed files
with
157,802 additions
and
157,742 deletions.
There are no files selected for viewing
This file contains 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
Binary file modified
BIN
+184 KB
(1100%)
data/residential_model/_EXCELFILES/SANSOM_residential_gas_hourly_shape.xlsx
Binary file not shown.
14 changes: 7 additions & 7 deletions
14
data/residential_model/data_residential_by_fuel_end_uses.csv
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
fuel_id,light | ||
0,100 | ||
1,100 | ||
2,1159 | ||
3,100 | ||
4,100 | ||
5,100 | ||
fuel_id,light,cold,wet,consumer_electronics,home_computing,cooking | ||
0,0,0,0,0,0,0 | ||
1,0,0,0,0,0,0 | ||
2,1159,1037,1306,1838,549,1138 | ||
3,0,0,0,0,0,0 | ||
4,0,0,0,0,0,0 | ||
5,0,0,0,0,0,0 |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
|
||
|
||
def fnx(): | ||
return np.random.randint(5, 50, 10) | ||
|
||
y = np.row_stack((fnx(), fnx(), fnx())) | ||
x = np.arange(10) | ||
|
||
y1, y2, y3 = fnx(), fnx(), fnx() | ||
''' | ||
fig, ax = plt.subplots() | ||
ax.stackplot(x, y) | ||
plt.show() | ||
''' | ||
fig, ax = plt.subplots() | ||
|
||
ax.stackplot(x, y1, y2, y3) | ||
plt.show() | ||
|
||
|
||
'''import numpy as NP | ||
from matplotlib import pyplot as PLT | ||
# just create some random data | ||
fnx = lambda : NP.random.randint(3, 10, 10) | ||
y = NP.row_stack([fnx(), fnx(), fnx()]) | ||
# this call to 'cumsum' (cumulative sum), passing in your y data, | ||
# is necessary to avoid having to manually order the datasets | ||
x = NP.arange(10) | ||
y_stack = NP.cumsum(y, axis=0) # a 3x10 array | ||
fig = PLT.figure() | ||
ax1 = fig.add_subplot(111) | ||
ax1.fill_between(x, 0, y_stack[0,:], facecolor="green", alpha=1) | ||
ax1.fill_between(x, y_stack[0,:], y_stack[1,:], facecolor="red", alpha=.4) | ||
ax1.fill_between(x, y_stack[1,:], y_stack[2,:], facecolor="#6E5160") | ||
PLT.show() | ||
''' |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.