Skip to content

Commit

Permalink
Merge pull request #12 from nismod/export_pdf_graphics
Browse files Browse the repository at this point in the history
Export to pdf
  • Loading branch information
edwardoughton committed Nov 4, 2019
2 parents 3ef380c + bf1f005 commit e5ee9b1
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 47 deletions.
92 changes: 46 additions & 46 deletions scripts/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,16 +456,16 @@ def _get_suffix(pop_scenario, throughput_scenario, intervention_strategy):

POPULATION_SCENARIOS = [
'baseline',
# '0-unplanned',
# '1-new-cities-from-dwellings',
# '2-expansion',
# '3-new-cities23-from-dwellings',
# '4-expansion23',
'0-unplanned',
'1-new-cities-from-dwellings',
'2-expansion',
'3-new-cities23-from-dwellings',
'4-expansion23',
]
THROUGHPUT_SCENARIOS = [
# "high",
"high",
"baseline",
# "low",
"low",
]
INTERVENTION_STRATEGIES = [
"minimal",
Expand Down Expand Up @@ -552,47 +552,47 @@ def _get_suffix(pop_scenario, throughput_scenario, intervention_strategy):

for pop_scenario, throughput_scenario, intervention_strategy in [

# ('baseline', 'low', 'minimal'),
# ('0-unplanned', 'low', 'minimal'),
# ('1-new-cities-from-dwellings', 'low', 'minimal'),
# ('2-expansion', 'low', 'minimal'),
# ('3-new-cities23-from-dwellings', 'low', 'minimal'),
# ('4-expansion23', 'low', 'minimal'),

# ('baseline', 'baseline', 'minimal'),
# ('0-unplanned', 'baseline', 'minimal'),
# ('1-new-cities-from-dwellings', 'baseline', 'minimal'),
# ('2-expansion', 'baseline', 'minimal'),
# ('3-new-cities23-from-dwellings', 'baseline', 'minimal'),
# ('4-expansion23', 'baseline', 'minimal'),

# ('baseline', 'high', 'minimal'),
# ('0-unplanned', 'high', 'minimal'),
# ('1-new-cities-from-dwellings', 'high', 'minimal'),
# ('2-expansion', 'high', 'minimal'),
# ('3-new-cities23-from-dwellings', 'high', 'minimal'),
# ('4-expansion23', 'high', 'minimal'),

# ('baseline', 'baseline', 'macrocell'),
# ('0-unplanned', 'baseline', 'macrocell'),
# ('1-new-cities-from-dwellings', 'baseline', 'macrocell'),
# ('2-expansion', 'baseline', 'macrocell'),
# ('3-new-cities23-from-dwellings', 'baseline', 'macrocell'),
# ('4-expansion23', 'baseline', 'macrocell'),
('baseline', 'low', 'minimal'),
('0-unplanned', 'low', 'minimal'),
('1-new-cities-from-dwellings', 'low', 'minimal'),
('2-expansion', 'low', 'minimal'),
('3-new-cities23-from-dwellings', 'low', 'minimal'),
('4-expansion23', 'low', 'minimal'),

('baseline', 'baseline', 'minimal'),
('0-unplanned', 'baseline', 'minimal'),
('1-new-cities-from-dwellings', 'baseline', 'minimal'),
('2-expansion', 'baseline', 'minimal'),
('3-new-cities23-from-dwellings', 'baseline', 'minimal'),
('4-expansion23', 'baseline', 'minimal'),

('baseline', 'high', 'minimal'),
('0-unplanned', 'high', 'minimal'),
('1-new-cities-from-dwellings', 'high', 'minimal'),
('2-expansion', 'high', 'minimal'),
('3-new-cities23-from-dwellings', 'high', 'minimal'),
('4-expansion23', 'high', 'minimal'),

('baseline', 'baseline', 'macrocell'),
('0-unplanned', 'baseline', 'macrocell'),
('1-new-cities-from-dwellings', 'baseline', 'macrocell'),
('2-expansion', 'baseline', 'macrocell'),
('3-new-cities23-from-dwellings', 'baseline', 'macrocell'),
('4-expansion23', 'baseline', 'macrocell'),

('baseline', 'baseline', 'small-cell'),
# ('0-unplanned', 'baseline', 'small-cell'),
# ('1-new-cities-from-dwellings', 'baseline', 'small-cell'),
# ('2-expansion', 'baseline', 'small-cell'),
# ('3-new-cities23-from-dwellings', 'baseline', 'small-cell'),
# ('4-expansion23', 'baseline', 'small-cell'),

# ('baseline', 'baseline', 'small-cell-and-spectrum'),
# ('0-unplanned', 'baseline', 'small-cell-and-spectrum'),
# ('1-new-cities-from-dwellings', 'baseline', 'small-cell-and-spectrum'),
# ('2-expansion', 'baseline', 'small-cell-and-spectrum'),
# ('3-new-cities23-from-dwellings', 'baseline', 'small-cell-and-spectrum'),
# ('4-expansion23', 'baseline', 'small-cell-and-spectrum'),
('0-unplanned', 'baseline', 'small-cell'),
('1-new-cities-from-dwellings', 'baseline', 'small-cell'),
('2-expansion', 'baseline', 'small-cell'),
('3-new-cities23-from-dwellings', 'baseline', 'small-cell'),
('4-expansion23', 'baseline', 'small-cell'),

('baseline', 'baseline', 'small-cell-and-spectrum'),
('0-unplanned', 'baseline', 'small-cell-and-spectrum'),
('1-new-cities-from-dwellings', 'baseline', 'small-cell-and-spectrum'),
('2-expansion', 'baseline', 'small-cell-and-spectrum'),
('3-new-cities23-from-dwellings', 'baseline', 'small-cell-and-spectrum'),
('4-expansion23', 'baseline', 'small-cell-and-spectrum'),

]:
print("Running:", pop_scenario, throughput_scenario, intervention_strategy)
Expand Down
5 changes: 4 additions & 1 deletion vis/pcds.r
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ costs_geotypes <- ggplot(all_scenarios, aes(x = factor(year), y = (cost/1000000)

### EXPORT TO FOLDER
setwd(output_directory)
tiff('costs_geotypes.tiff', units="in", width=8.5, height=8.5, res=500)
tiff('costs_geotypes.tiff', units="in", width=8.5, height=8.5, res=800)
print(costs_geotypes)
dev.off()
pdf('costs_geotypes.pdf', width=8.5, height=8.5)
print(costs_geotypes)
dev.off()

Expand Down

0 comments on commit e5ee9b1

Please sign in to comment.