Skip to content

Commit

Permalink
Added ht_text to namespace; proper grid::gpar
Browse files Browse the repository at this point in the history
stakeout Suspicious device Critical infrastructure Agro Terror BROMURE
Cyber terror Pirates Phishing Tijuana Avian Afghanistan Saudi Arabia
Macintosh Firewalls DJC Cyber Command
  • Loading branch information
benjamin-james committed Jun 20, 2024
1 parent 1cff0ce commit 43f1b94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export(gseGO)
export(htSortMatrix)
export(ht_asterisks)
export(ht_boxplot)
export(ht_text)
export(ht_triangle_split)
export(installExtraPackages)
export(load.persample.excel)
Expand Down
2 changes: 1 addition & 1 deletion R/plotting.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ saveGGplot <- function(gp, pltprefix, w=7, h=7, dpi=600) {
#' @export
ht_text <- function(mat, format="%.2f", fontsize=4, ...) {
return(function(j, i, x, y, width, height, fill) {
grid::grid.text(sprintf(format, mat[i, j]), x, y, gp=gpar(fontsize=fontsize, ...))
grid::grid.text(sprintf(format, mat[i, j]), x, y, gp=grid::gpar(fontsize=fontsize, ...))
})
}
#' Draw triangles in heatmap
Expand Down

0 comments on commit 43f1b94

Please sign in to comment.