Learns the scale's domain (its trained data range). User-supplied limits win over the data range. Returns an updated scale — S7 objects are values, so training is a functional update, not a mutation.

scale_train(scale, ...)

Arguments

scale

A Scale subclass instance.

...

Method arguments; all methods take values, the raw data vector mapped to this scale's aesthetic.

Value

The scale, with domain filled in.