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

Scatter w/ Color + Trendline #76

Open
S-UP opened this issue Oct 17, 2018 · 1 comment
Open

Scatter w/ Color + Trendline #76

S-UP opened this issue Oct 17, 2018 · 1 comment

Comments

@S-UP
Copy link

S-UP commented Oct 17, 2018

Hi,

Just discovered this package. Generally very nice!

Question:
It seems not possible to show the trend line simultaneously with colored scatter points when each point is its own group.

What I would like to achieve is having a legend identifying every point (as they represent store fronts in our case). For this I (afaik) need to specify 'color'. Yet color seems to do some sort of grouping as well, thus preventing the trend line to show up (as there is only one data point per group).

Is it possible to add a legend, preferably w/ colored observations, and add a trend line treating all points the same?

Shows a legend + trend line (but grouped):

tauchart(cars_data) %>%
  tau_point("milespergallon", c("class", "price"), color="class") %>%
  tau_trendline() %>% 
  tau_legend()

Shows legend but (almost) no trend line (changed color to vehicle to make the point):

tauchart(cars_data) %>%
  tau_point("milespergallon", "price", color="vehicle") %>%
  tau_trendline() %>% 
  tau_legend()
@S-UP
Copy link
Author

S-UP commented Jan 30, 2019

As an alternative, if one could calculate trend line values independently and then add them as an additional layer, this could be a work around. But it seems combining e.g. tau_point and tau_line is not currently supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant