-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
680 additions
and
722 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Generated by cpp11: do not edit by hand | ||
|
||
cactusTree <- function(parent, order, weight, scale, overlap, upright) { | ||
.Call(`_ggraph_cactusTree`, parent, order, weight, scale, overlap, upright) | ||
} | ||
|
||
pack <- function(areas) { | ||
.Call(`_ggraph_pack`, areas) | ||
} | ||
|
||
circlePackLayout <- function(parent, weight) { | ||
.Call(`_ggraph_circlePackLayout`, parent, weight) | ||
} | ||
|
||
dendrogram_spread <- function(graph, starts, y, leaf, repel, pad, ratio) { | ||
.Call(`_ggraph_dendrogram_spread`, graph, starts, y, leaf, repel, pad, ratio) | ||
} | ||
|
||
force_bundle_iter <- function(edges_xy, K, C, P, P_rate, S, I, I_rate, compatibility_threshold, eps) { | ||
.Call(`_ggraph_force_bundle_iter`, edges_xy, K, C, P, P_rate, S, I, I_rate, compatibility_threshold, eps) | ||
} | ||
|
||
hTree <- function(parent, order) { | ||
.Call(`_ggraph_hTree`, parent, order) | ||
} | ||
|
||
partitionTree <- function(parent, order, weight, height) { | ||
.Call(`_ggraph_partitionTree`, parent, order, weight, height) | ||
} | ||
|
||
cut_lines <- function(x, y, id, start_width, start_height, end_width, end_height, start_type, end_type) { | ||
.Call(`_ggraph_cut_lines`, x, y, id, start_width, start_height, end_width, end_height, start_type, end_type) | ||
} | ||
|
||
pathAttr <- function(group, alpha, width, lty, colour, ngroups) { | ||
.Call(`_ggraph_pathAttr`, group, alpha, width, lty, colour, ngroups) | ||
} | ||
|
||
splitTreemap <- function(parent, order, weight, width, height) { | ||
.Call(`_ggraph_splitTreemap`, parent, order, weight, width, height) | ||
} | ||
|
||
unrooted <- function(parent, order, length, daylight, tol, rotation_mod, maxiter) { | ||
.Call(`_ggraph_unrooted`, parent, order, length, daylight, tol, rotation_mod, maxiter) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#' Pack circles together | ||
#' | ||
#' This function is a direct interface to the circle packing algorithm used by | ||
#' \code{\link{layout_tbl_graph_circlepack}}. It takes a vector of sizes and | ||
#' returns the x and y position of each circle as a two-column matrix. | ||
#' | ||
#' @param areas A vector of circle areas | ||
#' | ||
#' @return A matrix with two columns and the same number of rows as the length | ||
#' of the "areas" vector. The matrix has the following attributes added: | ||
#' "enclosing_radius" giving the radius of the smallest enclosing circle, and | ||
#' "front_chain" giving the terminating members of the front chain (see | ||
#' Wang \emph{et al}. 2006). | ||
#' | ||
#' @references | ||
#' Wang, W., Wang, H. H., Dai, G., & Wang, H. (2006). \emph{Visualization of | ||
#' large hierarchical data by circle packing}. Chi, 517-520. | ||
#' | ||
#' @export | ||
#' | ||
#' @examples | ||
#' library(ggforce) | ||
#' sizes <- sample(10, 100, TRUE) | ||
#' | ||
#' position <- pack_circles(sizes) | ||
#' data <- data.frame(x = position[,1], y = position[,2], r = sqrt(sizes/pi)) | ||
#' | ||
#' ggplot() + | ||
#' geom_circle(aes(x0 = x, y0 = y, r = r), data = data, fill = 'steelblue') + | ||
#' geom_circle(aes(x0 = 0, y0 = 0, r = attr(position, 'enclosing_radius'))) + | ||
#' geom_polygon(aes(x = x, y = y), | ||
#' data = data[attr(position, 'front_chain'), ], | ||
#' fill = NA, | ||
#' colour = 'black') | ||
#' | ||
pack_circles <- function(areas) { | ||
pack(as.numeric(areas)) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.o | ||
*.so | ||
*.dll |
Oops, something went wrong.