plotly / plotly/plotly.R

plot_dendro renders with the graph all squashed to the right

Open
#1,391 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: low
Dominant language
R
Stars
2.7k
Forks
641
PR merge metrics
No merged PRs in 30d

Description

when i run this code:

library(plotly)

set.seed(3)
N <- 50
df <- data.frame(x = rnorm(N), y = rnorm(N))
rownames(df) <- paste0("p_", 1:N) 

dend <- as.dendrogram(hclust(dist(df)))
plot_dendro(dend)

i end up with the dendrogram all squashed to the right:

image

Any idea how i can force it to fill in the entire graph viewer?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the supplied R example with plot_dendro(dend) and compare the resulting layout with the attached image. Start at the plot_dendro entry point and trace how the dendrogram dimensions are passed to the graph viewer; done means the rendered dendrogram fills the viewer instead of being squashed to the right.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.