You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Search for duplicates among the existing issues (both open and closed).
Proposal
During the posit::conf 2024 workshop we discussed how the color palette domain (when not specified) is calculated based on the minimum and maximum values within each column. This makes sense as a default given gt doesn't know whether particular columns share a domain so best to presume each column has an independent domain. There are situations, however, when the visualization would benefit from columns sharing a domain so values are consistent and comparable across columns. The initial suggestion in our discussion was to add some sort of grouping argument that could accept a list of columns (or tidy select function e.g. starts_with, ends_with,contains). In this situation, gt would calculate the domain based on the range of values across all of those columns and, then, create the color gradient.
This is currently possible with a custom function that calculates the domain and, then, that range is passed along to the domain argument. Integrating this within data_color() would be more user friendly.
Prework
Proposal
During the posit::conf 2024 workshop we discussed how the color palette domain (when not specified) is calculated based on the minimum and maximum values within each column. This makes sense as a default given
gt
doesn't know whether particular columns share a domain so best to presume each column has an independent domain. There are situations, however, when the visualization would benefit from columns sharing a domain so values are consistent and comparable across columns. The initial suggestion in our discussion was to add some sort ofgrouping
argument that could accept a list of columns (or tidy select function e.g.starts_with
,ends_with
,contains
). In this situation,gt
would calculate the domain based on the range of values across all of those columns and, then, create the color gradient.This is currently possible with a custom function that calculates the domain and, then, that range is passed along to the
domain
argument. Integrating this withindata_color()
would be more user friendly.example possible code
The text was updated successfully, but these errors were encountered: