geom_spring() has been redesigned. Coils are now computed when the plot is drawn, in physical units, so springs look the same in every group and facet panel, whatever the scales of x and y. This fixes the long-standing problems with grouping and faceting.
diameter is now in mm (default 3), not data units.
tension is replaced by coils, the number of coils in each spring (default 10). With a fixed number of coils, longer springs are drawn more stretched (Hooke’s law), so tension no longer needs to be set by hand.
stat_spring() and StatSpring have been removed.
GeomSmoothSpring and the exported qstat*(), qlayer() and proto_update() helpers have been removed. Use geom_residual_springs() instead.
New features
New weight aesthetic: the stiffness of a spring. As with a real spring, a stiffer spring has fewer coils (coils / weight, at least 1) and is drawn thicker (linewidth * sqrt(weight)). In geom_residual_springs() it is also used as case weights in the fit, to show weighted least squares.
New shape argument to geom_spring() and create_spring(): "zigzag" (the default, the classic textbook spring), "wave", or "coil" (round coils that open into a wave when stretched). With "zigzag" and "wave", springs of different lengths have the same form, so only the spacing of the coils shows how far each is stretched.
The vignette now includes animations of a regression line and of the first principal component settling under the forces of the springs (code in examples/), and a section on principal components.
README rewritten. All roxygen documentation now uses markdown.
Added testthat tests.
ggsprings 0.1.0
Completed vignette on least squares by springs.
Added functions from geomsmoothfit
ggsprings 0.0.1
Under-development version, still trying to pass R Cmd check
delete tension and diameter from GeomSpring proto default_aes per PR#1 (thx: @EvaMaeRay)
work on vignettes/least-squares.Rmd nearly done.
Fix documentation problems for optional parameters per PR#2 (thx: @teunbrand)