ashokkrish / spatialEpisim

spatialEpisim: Spatial Tracking of Infectious Disease Epidemics using Mathematical Models
GNU General Public License v3.0
8 stars 5 forks source link

Refactor plotting functions to use `cptcity::cpt("jjg_misc_seminf_haxby")` #43

Open bryce-carson opened 1 month ago

bryce-carson commented 1 month ago

All plotting functions that used the Semi-infinite Haxby colour pallete will now use a function in the cptcity package to acquire the palette on demand.

bryce-carson commented 1 month ago

Throughout the plotting functions the Haxby colour pallet is hard-coded and duplicated, again, and again, and again.

Just use cptcity::cpt("jjg_misc_seminf_haxby", n = 30), where n is the desired number of breaks or bins.

ashokkrish commented 1 month ago

Throughout the plotting functions the Haxby colour pallet is hard-coded and duplicated, again, and again, and again.

Just use cptcity::cpt("jjg_misc_seminf_haxby", n = 30), where n is the desired number of breaks or bins.

This is great!

bryce-carson commented 2 weeks ago

options("terra.pal" = map.pal("haxby", length(cuts)))

bryce-carson commented 2 weeks ago

cuts <- (NA, 0, ...)