reparameterisation - janeshdev/ggplot2 GitHub Wiki

Scales and geoms interact because the geom may not be parameterised in variables that the scales know about. For example:

  • bar: width, ymin = 0
  • boxplot: width
  • crossbar: width
  • errorbar: width
  • errorbarh: height
  • map: uses locations of map polygons
  • tile: width and height

This has impacts in two places:

  • training: needs to be mediated through the geom
  • mapping:
  • munching: munching requires only locations

Reparameterisation is currently implemented as a data transformation after statistics are calculated and their aesthetics are remapped. This is because

For large data also want to not have to convert data into a data frame.

Position scales are special because:

  • they vary across facets, so there can be multiple copies
  • some statistics use them: smooth, bin, bin2d, binhex, density, abline, function
  • many statistics modify them

train_position.gbar <- function(train_x, train_y)

⚠️ **GitHub.com Fallback** ⚠️