Skip to content

Commit

Permalink
Improve chart titles for influence plots
Browse files Browse the repository at this point in the history
  • Loading branch information
Rucknium committed Jul 2, 2021
1 parent 92ddafc commit 205a7f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/geo.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ tf_plot_influence <- function(url, building.type, effect.type, cut.out.flags = T
Matrix::image(infl.grid.ls$infl.grid, useRaster = TRUE,
col.regions = hcl.colors(max.effect, palette = "Hawaii", rev = TRUE),
colorkey = list(tick.number = max.effect), cuts = max.effect - 1,
main = "Production boost, in percent")
main = paste0("Production boost for ", building.type, ", in percent") )
# useRaster = TRUE is faster

},
need = {
Matrix::image(infl.grid.ls$infl.grid, useRaster = TRUE,
main = "Area where building is able to be built")
main = paste0("Area where ", building.type, " is able to be built") )
},
penalty = {
infl.grid.ls$infl.grid <- infl.grid.ls$infl.grid * (-5)
Expand All @@ -69,7 +69,7 @@ tf_plot_influence <- function(url, building.type, effect.type, cut.out.flags = T
Matrix::image(infl.grid.ls$infl.grid, useRaster = TRUE,
col.regions = hcl.colors(max.effect, palette = "ag_GrnYl"),
colorkey = list(tick.number = max.effect), cuts = max.effect - 1,
main = "Production penalty, in percent")
main = paste0("Production penalty for ", building.type, ", in percent") )
}
# TODO: military's complex effects not calculated yet. Maybe best to combined penalty and boost calculations
# https://townforge.net/manual/
Expand Down

0 comments on commit 205a7f0

Please sign in to comment.