Skip to content

Commit

Permalink
set default axis name
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Jul 22, 2024
1 parent 9ac26b7 commit 1223e94
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/htanno-dendrogram.R
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ HtannoDendro <- ggplot2::ggproto("HtannoDendro", HtannoProto,
list(panels, index)
},
ggplot = function(self, mapping, segment_params) {
position <- .subset2(self, "position")
ans <- ggplot2::ggplot(mapping = mapping) +
rlang::inject(ggplot2::geom_segment(
mapping = aes(
Expand All @@ -189,6 +190,11 @@ HtannoDendro <- ggplot2::ggproto("HtannoDendro", HtannoProto,
!!!segment_params,
stat = "identity"
)) +
switch_position(
position,
ggplot2::labs(x = "height"),
ggplot2::labs(y = "height")
) +
ggplot2::theme_bw()
add_default_mapping(ans, aes(x = .data$x, y = .data$y))
},
Expand Down

0 comments on commit 1223e94

Please sign in to comment.