ggforce v0.1.1


Monthly downloads



by Thomas Pedersen

Accelerating 'ggplot2'

The aim of 'ggplot2' is to aid in visual data investigations. This focus has led to a lack of facilities for composing specialised plots. 'ggforce' aims to be a collection of mainly new stats and geoms that fills this gap. All additional functionality is aimed to come through the official extension system so using 'ggforce' should be a stable experience.



Accelerating ggplot2

Travis-CI Build Status AppVeyor Build Status CRAN_Release_Badge CRAN_Download_Badge


ggforce is a package aimed at providing missing functionality to ggplot2 through the extension system introduced with ggplot2 v2.0.0. Broadly speaking ggplot2 has been aimed primarily at explorative data visualization in order to investigate the data at hand, and less at providing utilities for composing custom plots a la D3.js. ggforce is mainly an attempt to address these "shortcomming" (design choices might be a better description). The goal is to provide a repository of geoms, stats, etc. that are as well documented and implemented as the official ones found in ggplot2.


The inclusion of any geom, stat, position etc in ggforce is not necessarily a recommendation of their use. ggplot2 has been succesfull in being opinionated about what functionality should be available. This is good as it insulates the user from making bad decisions when analyzing their data (to a certain degree), but it also makes it difficult to develop novel visualizations using the ggplot2 API. ggforce on the other hand positions itself closer to the "anything goes - the user is responsible for the quality of the output". Be very aware of this responsibility! Bad visualizations lie about, distorts, and obscurify the data behind them, both to you and the ones you share your visualizations with.


ggforce is available on CRAN and can be installed in the regular way:


It is very possible that the GitHub repository contains new experimental features not released on CRAN yet. To get a taste of the future use devtools to install the development version:

if (!require(devtools)) {


ggforce is by design a collection of features with the only commonality being their tie to the ggplot2 API. Because of this an overview of all features would get too long for a README. The package does contain a vignette where every feature is described and justified with examples and plots. There should be a plot in the README of a visualization package though, so without further ado:

ggplot(iris, aes(Petal.Length, Petal.Width, colour = Species)) +
    geom_point() +
    facet_zoom(x = Species == "versicolor")



Pull and feature requests are very welcome. Obviously PR's will lead to faster implementations than feature requests. I would like to urge requests to include the following if possible:

Pull requests

If a PR is for a new feature, it should be self contained, possibly using already implemented functionality if applicable. All exported functions should be documented following the style from ggplot2 using roxygen2 comment. You can credit yourself with the implementation in the documentation. If the feature concerns a visualization appraoch invented by others, please link to the article describing the approach.

Feature requests

If a feature is wished, but skill, time or other is lacking to create a full PR, please file an issue. The feature request should provide a detailed description of the nature of the feature, with links to relevant litterature describing the visualization type, as well as possible use cases to guide in designing the use cases.


For an overview of already requested features, enhancements, and bug fixes please consult the issues list. I will try to keep the labels up to date so it should be easy to identify whether an issue is related to any of the above.

ggforce is by no means unique. The ggplot2 ecosystem is flourishing following the release of v2.0.0. To help keep on top of all ggplot2 extension packages a web page has been created where developers can submit their packages. Please explore to get an overview of the current state of ggplot2 extensions.

Functions in ggforce

Name Description
geom_bspline B-splines based on control points
geom_circle Circles based on center and radius
facet_grid_paginate Split facet_grid over multiple plots
geom_sina Sina plot
facet_wrap_paginate Split facet_wrap over multiple plots
geom_link Link points with paths
geom_bezier Create quadratic or cubic bezier curves
facet_zoom Facet data for zoom with context
geom_arc_bar Arcs and wedges as polygons
geom_arc Arcs based on radius and radians
interpolateDataFrame Interpolate layer data
n_pages Determine the number of pages in a paginated facet plot
trans_reverser Reverse a transformation
theme_no_axes Theme without axes and gridlines
scale_unit Position scales for units data
power_trans Create a power transformation object
radial_trans Create radial data in a cartesian coordinate system
StatArcBar ggforce extensions to ggplot2
ggforce ggforce: Accelerating ggplot2
No Results!

Last month downloads


Type Package
Date 2016-11-27
License GPL (>= 2)
LazyData TRUE
LinkingTo Rcpp
RoxygenNote 5.0.1
VignetteBuilder knitr
Collate 'RcppExports.R' 'aaa.R' 'arc_bar.R' 'arc.R' 'bezier.R' 'bspline.R' 'circle.R' 'facet_grid_paginate.R' 'facet_wrap_paginate.R' 'facet_zoom.R' 'ggforce_package.R' 'ggproto-classes.R' 'interpolate.R' 'link.R' 'scale-unit.R' 'sina.R' 'themes.R' 'trans.R'
NeedsCompilation yes
Packaged 2016-11-28 12:37:16 UTC; tlp
Repository CRAN
Date/Publication 2016-11-28 16:54:01

Include our badge in your README