scale_shift | R Documentation |
Draws two parallel axes. The lower axis shows the input to the function without a scaled input, e.g. the input to the pattern book function. The upper axis shows the input that goes into the scaling before being handed off to the pattern-book function.
scale_shift(min, max, r, x0 = 0, nticks = 10, color = "blue") plot_scaled_input(ftilde, domain, r, x0, nticks = 10, color = "blue")
min |
lower end of domain |
max |
upper end of domain |
r |
r parameter in linear scaling |
x0 |
x0 parameter in linear scaling |
nticks |
number of ticks on new axis (add_scale) |
color |
color of new axis (e.g. "blue") |
ftilde |
tilde expression as in |
domain |
domain specifier as in |
plot_scaled_input()
is for drawing pattern-book functions on
their natural unscaled input (plain "x"), but then adds a second scale
that shows the input to the scaled function.
Only handles linear transformations: r*(x-x0)
a ggplot2 object
scale_shift(-40, 100, 9/5, 32, 10, color="magenta") plot_scaled_input(exp(x) ~ x, domain(x=c(-2,2)), 2.4, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.