plotly / plotly/plotly.R

Plotly not rendering in RStudio viewing mode or Shiny but in Browser

Open
#1,843 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description


I am not able to render a Plotly-plot in my RStudio Viewer mode and in Shiny as well. When i open the plot through RStudio in my browser, the plot renders. The viewer as well as Shiny just show a white space.
grafik

d <- diamonds[sample(nrow(diamonds), 1000), ]
plot_ly(d, x = ~carat, y = ~price, text = ~paste("Clarity: ", clarity),
        mode = "markers", color = ~carat, size = ~carat, marker = list(line = list(color = "black")))

When i try to run the code above, i get the following message:
No trace type specified:
Based on info supplied, a 'scatter' trace seems appropriate.
Read more about this trace type -> https://plot.ly/r/reference/#scatter
Warning message:
line.width does not currently support multiple values.

With

plot_ly(economics, x = ~pop, type = "histogram") 

i get no message, but the plot doesnt render too.

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

Start with the two supplied R reproductions using plot_ly, testing them in the RStudio Viewer, Shiny, and an external browser. Compare the blank Viewer and Shiny output with the browser result and the reported warnings; done means both examples render correctly in the affected contexts.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.