The Wayback Machine - http://web.archive.org/web/20201217182450/https://github.com/ropensci/plotly/issues/1581
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ggplotly tooltip shows transformed (instead of original) value #1581

Open
bobidou23 opened this issue Jul 16, 2019 · 2 comments
Open

ggplotly tooltip shows transformed (instead of original) value #1581

bobidou23 opened this issue Jul 16, 2019 · 2 comments

Comments

@bobidou23
Copy link

@bobidou23 bobidou23 commented Jul 16, 2019

If I make a graphic with logarithmic colour scaling, the tooltip only shows the logged value, rather than the original value that is more meaningful in the context
スクリーンショット 2019-07-16 午後3 58 35
.

It's similar to #804 , which dealt with transformed axes.

@bobidou23 bobidou23 changed the title scale scaling colours alters tooltip values in ggplotly Jul 16, 2019
@bobidou23 bobidou23 changed the title scaling colours alters tooltip values in ggplotly log-scaled colour schemes don't show up properly Aug 2, 2019
@cpsievert cpsievert changed the title log-scaled colour schemes don't show up properly ggplotly tooltip shows transformed (instead of original) value Aug 12, 2019
@cpsievert
Copy link
Contributor

@cpsievert cpsievert commented Aug 12, 2019

A minimal reproducible example would be much appreciated

@bobidou23
Copy link
Author

@bobidou23 bobidou23 commented Aug 26, 2019

Here's an example:

library(plotly)
english_french <- read.csv("https://raw.githubusercontent.com/plotly/datasets/master/english_french.csv",
                           stringsAsFactors = FALSE)
p <- ggplot(english_french, aes(x=engperc,y=frenperc, weight=total)) + 
  geom_bin2d() +
  scale_fill_gradient(low="lightblue1",high="darkblue",trans="log10") +
  labs(title = "Distribution of the Canadian population by English and French fluency",
       x = "% fluent in English",
       y = "% fluent in French",
       fill = "# of people")
ggplotly(p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.