visualize_spatial_gradient(spatial_data = posi,
sample="SP8",
gradient_type = "Epithelial_cells_A",
fixed_type = "Macrophage",
expression_col = "gen2_SPLIz_numeric",
type_col = "celltype_ABCDepi",
legend_title = "Expression",
background_color = "white")
Run the code above in your browser using DataLab