plotly / plotly/plotly.R

Call for feature: supporting of expressions

Open
#1,091 3 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When I try use expression object as lab labels, ggplotly raises an error.

p <- ggplot(data=de$table, aes(x=logFC, y=-log10(PValue), colour=threshold)) +
        geom_point(size=1.75, alpha = 0.4) +
        # ylim(c(0, input$ylmslider)) +
        xlab(expression("log"[2]*"(Fold Change)")) + ylab(expression("-log"[10]*"(p-value)")) +
        geom_vline(xintercept = 0, colour = "grey",
  linetype = "dashed", size = 2) + # add line at 0
        geom_hline(yintercept = -log10(0.05), colour = "grey",
  linetype = "dashed", size = 2) + theme(legend.position = "none") # p(0.05) = 1.3
#> Everything is ok up to now
ggplotly(p)
#> Error in unique.default(x) : unimplemented type 'expression' in 'HashTableSetup'

You can reproduce this scenario by using any expression as axis titles.

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 by reproducing the issue with the supplied ggplotly example and expression axis titles. Trace how ggplotly handles those labels, then verify that the same plot converts without the HashTableSetup error and that the expression labels are preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.