tracts.plot.plot_migration_matrices_from_output#
- plot_migration_matrices_from_output(output_dir, output_filename_format=None, save_dir=None, title_mean='Mean migration matrix', title_sex_bias='Sex-bias in migration', title_fontsize=None, tick_fontsize=None, annot_fontsize=None)#
Re-produces the
_migration_matricesplot (mean migration matrix and sex-bias values per generation), directly from the_female_migration_matrix/_male_migration_matrixoutput files saved inoutput_dirby a previousrun_tracts()run, without re-running the inference.- Parameters:
output_dir (
str|Path) – The output directory (as produced byrun_tracts()) from which to read the migration matrices.output_filename_format (
str|None) – The output filename format used to produce the files inoutput_dir, as specified in the driver file used for the original run (or its default value, seeOutputConfig). If None, it is automatically inferred from the files present inoutput_dir.save_dir (
str|Path|None) – The directory in which to save the re-produced plot (created if it does not already exist). If None, defaults tooutput_dir, overwriting the original plot in place.title_mean (
str) – The title of the left panel (mean migration matrix). Defaults to “Mean migration matrix”.title_sex_bias (
str) – The title of the right panel (sex bias matrix). Defaults to “Sex-bias in migration”.title_fontsize (
float|None) – The font size of both panel titles (and colorbar labels). If None (default), an adaptive font size is used, based on the number of populations/generations being plotted.tick_fontsize (
float|None) – The font size of the tick labels. If None (default), an adaptive font size is used.annot_fontsize (
float|None) – The font size of the value annotations inside each matrix cell. If None (default), an adaptive font size is used.
- Return type:
None