You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've very much appreciated the simplicity of scale_y_dendrogram() to pair bar graphs and dendrograms in ggplot(), and would like to use the code in a shiny app via ggplotly. I'm sure this is my lack of knowledge as to how scale_y_dendrogram() is functioning under the hood rather than an issue, but I can't get the dendrogram to appear within the plot.
The same problem exists with scale_x_dendrogram() and scale_y_dendrogram(). Am I missing something in how ggh4x is pairing with the ggplot() output and is there a solution to this with ggplotly?
The text was updated successfully, but these errors were encountered:
I'm not too familiar with the inner workings of {plotly} and how axes are handled.
From a small experiment, it seems that any non-default axis isn't displayed. You can check for yourself by running this example:
library(ggplot2)
library(plotly)
p<- ggplot(mpg, aes(displ, hwy)) +
geom_point() +
guides(x="none", y="none")
# No x/y axesp# Has x/y axes
ggplotly(p)
In any case, since plotly doesn't appear to support custom axes, there isn't anything I can do from ggh4x's side to make it possible.
I've very much appreciated the simplicity of
scale_y_dendrogram()
to pair bar graphs and dendrograms inggplot()
, and would like to use the code in a shiny app viaggplotly
. I'm sure this is my lack of knowledge as to howscale_y_dendrogram()
is functioning under the hood rather than an issue, but I can't get the dendrogram to appear within the plot.Example code below:
Works fine:
![Screenshot 2023-09-17 at 8 49 13 pm](https://private-user-images.githubusercontent.com/93563980/268497437-87dee4be-b6a3-4a0c-a84a-85203596b23d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIyNzc3NzUsIm5iZiI6MTcyMjI3NzQ3NSwicGF0aCI6Ii85MzU2Mzk4MC8yNjg0OTc0MzctODdkZWU0YmUtYjZhMy00YTBjLWE4NGEtODUyMDM1OTZiMjNkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZ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mNTZkMDdjMzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Avup-9QXXBD_zIbgsEQYK7sOmfeaAnvGYkYNjAgCaHU)
The same problem exists with
scale_x_dendrogram()
andscale_y_dendrogram()
. Am I missing something in howggh4x
is pairing with theggplot()
output and is there a solution to this withggplotly
?The text was updated successfully, but these errors were encountered: