Skip to content

Commit

Permalink
show_matrixplotly uses automargin = T to show complete x-axis text
Browse files Browse the repository at this point in the history
  • Loading branch information
fawda123 committed Aug 12, 2024
1 parent 51565e6 commit 3cd5fad
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/show_matrixplotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@ show_matrixplotly <- function(mat, family = NA, tooltip = 'Result', width = NULL
tickfont = list(size=14),
overlaying = "x",
nticks = length(collev),
side = "top"
side = "top",
automargin = T
)

out <- plotly::ggplotly(plo, tooltip = tooltip, width = width, height = height) %>%
plotly::add_bars(x = collev,y = seq(1, length(collev)), xaxis = 'x2', inherit = F, showlegend = F) %>%
plotly::layout(xaxis2 = ax)
plotly::layout(
xaxis2 = ax
)

# plotly output
out <- out %>%
Expand Down

0 comments on commit 3cd5fad

Please sign in to comment.