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

autoplot.conf_mat() text is hard to read at times #437

Open
EmilHvitfeldt opened this issue Jul 11, 2023 · 1 comment
Open

autoplot.conf_mat() text is hard to read at times #437

EmilHvitfeldt opened this issue Jul 11, 2023 · 1 comment
Labels
feature a feature request or enhancement

Comments

@EmilHvitfeldt
Copy link
Member

High frequency areas of the conf_mat() can be hard to read because of the contrast. something should be done.

It is hard because sometime the text isn't super needed (at a glance you can read the plot with the grey), and sometimes it would be nice to read the numbers directly

library(yardstick)
library(ggplot2)

two_class_example |>
  conf_mat(truth, predicted) |>
  autoplot(type = "heatmap")

Created on 2023-07-11 with reprex v2.0.2

@EmilHvitfeldt EmilHvitfeldt added the feature a feature request or enhancement label Jul 11, 2023
@bappa10085
Copy link

bappa10085 commented Aug 2, 2024

If I use different color scales, the high-frequency features become more difficult to read like

library(yardstick)
library(ggplot2)
library(colorspace)

two_class_example |>
  conf_mat(truth, predicted) |>
  autoplot(type = "heatmap") +
  scale_fill_continuous_sequential(palette = "Blues") +
  theme(text=element_text(family = "serif", size=15), 
        axis.text.x = element_text(colour="black"), 
        axis.text.y = element_text(colour="black"))

image

It would be much better if the output is rendered in the following way

image

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

No branches or pull requests

2 participants