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
setup_data(): called once per layer. Returns modified data. (aka geom$parameterise(),
setup_params(): called one per layer. Returns modified params.
compute_layer() calls compute_panel() calls compute_group(). Only ever override one of the three. The further up the stack, the more work, but also the more options for efficiency savings.
Biggest difference is scales/panel ranges, because geom called after facets are trained, so get panel ranges rather than scales. I think the main difference here is due to the interaction between coords and scales for computing the expansion. It's too hard to change this now, so it just needs to be clearly documented.
Need to make as homogeneous as possible.
setup_data()
: called once per layer. Returns modified data. (akageom$parameterise()
,setup_params()
: called one per layer. Returns modified params.compute_layer()
callscompute_panel()
callscompute_group()
. Only ever override one of the three. The further up the stack, the more work, but also the more options for efficiency savings.Biggest difference is scales/panel ranges, because geom called after facets are trained, so get panel ranges rather than scales. I think the main difference here is due to the interaction between coords and scales for computing the expansion. It's too hard to change this now, so it just needs to be clearly documented.
Other stuff to change:
layer()
needscompute_geom()
,compute_stat()
,compute_position()
build_grob()
inggplot_gtable()
should callcompute_geom()
withby_layer()
ggplot_build()
andggplot_gtable()
in the same filepanel_info
argument to scales inStat$compute_panel()
andscales
argument topanel_ranges
inGeom$compute_panel()
remove_missing()
by default incompute_data()
. Need to document that if you override this method you need to call it yourself.Some code ideas
The text was updated successfully, but these errors were encountered: