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

plots styling #110

Open
tmikolajczyk opened this issue Sep 15, 2019 · 2 comments
Open

plots styling #110

tmikolajczyk opened this issue Sep 15, 2019 · 2 comments

Comments

@tmikolajczyk
Copy link
Member

Hi, what do you think of separating legends for different geoms (layers) in your plots? Something like this one:
image

And adding theme_drwhy to your plots would be nice too ;)

@krystian8207
Copy link
Collaborator

Hi, thank you for this suggestion. This will probably take some time to me, but I'd be happy to implement this feature. Do you have any suggestions/links on how to do this properly?

About theme_drwhy this is a simple change but unfortunately, I cannot find the function in the latest version of ingredients. Is this function moved to separate package now?

@tmikolajczyk
Copy link
Member Author

Sure, below my code. Of course it is not ready to implement, rather a suggestion of solution. Anyway, each plot needs individual attention; I can help you with that if it is a problem. Besides, functions theme_drwhy_colors() and theme_drwhy() should be imported as they are going to be common for all DrWhy family (e.g. ingredients imports them from DALEX). Let me talk to @agosiewska about that and we will come with a solution in a while.

color_values[2:3] <- theme_drwhy_colors(2)

ggplot(data = base_data, aes_string(x = variable_name, y = response_var)) + geom_point(data = base_data[base_data$type == "data", ], aes(fill = type), alpha = 0.35) + geom_line(data = base_data[base_data$type != "data", ], aes(colour = type)) + scale_color_manual(values = color_values) + theme_drwhy() + theme(legend.title = element_blank(), legend.position = "bottom")

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

2 participants