-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Feature request: custom pillar formatting for diagnostic columns #97
Comments
I think we currently use the default tibble printing which already colors negative numbers red, so additionally coloring diagnostics could be quite confusing. But to be honest I like the idea of coloring the diagnostics above/below thresholds much better than coloring numbers based on whether they are positive or negative, which could be totally irrelevant. I think we need to opt for one or the other coloring scheme and not both (unless you have a creative solution to that!). I would vote for what you're proposing here over using the colors for positive and negative. What do others think? |
For the columns showing parameter summaries (mean, quantiles, etc), I think it'd be useful to still have some distinction between negative and positive, but I propose that red should be reserved for use in the diagnostics columns to indicate something below threshold so that it stands out best. If restricting to the 8 colors that should be pretty universally available, maybe cyan for negative quantities? Seems to be equally legible on light/dark backgrounds. I should also say I'd volunteer to implement if folks thought this made sense. |
Yeah I definitely agree that red is better suited to the diagnostic columns. But I wonder if that will confuse people who are used to the standard that's been set by the tidyverse people to use red for negative numbers. Thoughts?
Thanks! |
Oh! How about leaving the negative values as red as tidyverse-standard, but use the ansi background characters to put a red background behind the values in the diagnostics columns that are below threshold? It's not going to look as pretty, but that's kinda the point and it'll really grab the user's attention. |
Yeah that's a possibility. I suppose we could also provide options for the user to control what colors are used. Curious what @paul-buerkner @avehtari @mjskay think. |
I would need to see how it looks in action. |
How relevant is this issue still in light of implementing #257? |
@mike-lawrence can you comment on the relevance of this compared to #257 ? |
Sure, #257 pertains to numeric display while this suggests adding color to those diagnostics with clear pass/fail criteria (rhat, bfmi). Note that it’s via pillar that tibbles came to have custom-specifiable numeric display. |
Although pillar has the option to color negative values (annoyingly on by default), I have not been able to find documentation or examples with user defined conditional coloring of cells. I see others have asked the same question, but the answers and examples I can find are using some table package like kable, gt, or tinytable, that make nice markdown/html/latex tables, but no user defined conditional color on terminals. |
I believe that the pillar package (used by tibble) permits custom colors, in which case it would be useful to color the contents of the diagnostics columns (rhat, bulk_ess, tail_ess) red if they are below a threshold.
The text was updated successfully, but these errors were encountered: