Skip to content

Commit

Permalink
Update percentVJ.R
Browse files Browse the repository at this point in the history
Fix issue #415
No longer assumes > 1 group for faceting
  • Loading branch information
ncborcherding committed Oct 8, 2024
1 parent 21e3b54 commit 8ccc535
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/percentVJ.R
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ percentVJ <- function(input.data,
geom_tile(lwd= 0.25, color = "black") +
scale_fill_gradientn(name = "Percentage", colors = .colorizer(palette,21)) +
theme_classic() +
facet_wrap(~L1) +
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1),
axis.title = element_blank())
if(length(unique(mat_melt$L1)) > 1) {
plot <- plot + facet_wrap(~L1)
}
return(plot)
}

0 comments on commit 8ccc535

Please sign in to comment.