Package: ggraph 2.2.1.9000

ggraph: An Implementation of Grammar of Graphics for Graphs and Networks

The grammar of graphics as implemented in ggplot2 is a poor fit for graph and network visualizations due to its reliance on tabular data input. ggraph is an extension of the ggplot2 API tailored to graph visualizations and provides the same flexible approach to building up plots layer by layer.

Authors:Thomas Lin Pedersen [cre, aut], RStudio [cph]

ggraph_2.2.1.9000.tar.gz
ggraph_2.2.1.9000.zip(r-4.5)ggraph_2.2.1.9000.zip(r-4.4)ggraph_2.2.1.9000.zip(r-4.3)
ggraph_2.2.1.9000.tgz(r-4.4-x86_64)ggraph_2.2.1.9000.tgz(r-4.4-arm64)ggraph_2.2.1.9000.tgz(r-4.3-x86_64)ggraph_2.2.1.9000.tgz(r-4.3-arm64)
ggraph_2.2.1.9000.tar.gz(r-4.5-noble)ggraph_2.2.1.9000.tar.gz(r-4.4-noble)
ggraph_2.2.1.9000.tgz(r-4.4-emscripten)ggraph_2.2.1.9000.tgz(r-4.3-emscripten)
ggraph.pdf |ggraph.html
ggraph/json (API)
NEWS

# Install 'ggraph' in R:
install.packages('ggraph', repos = c('https://thomasp85.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/thomasp85/ggraph/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • flare - The class hierarchy of the flare visualization library
  • highschool - Friendship among high school boys
  • whigs - Membership network of American Whigs

On CRAN:

ggplot-extensionggplot2graph-visualizationnetwork-visualizationvisualization

242 exports 1.1k stars 10.51 score 51 dependencies 145 dependents 58 mentions 8.1k scripts 47.7k downloads

Last updated 6 months agofrom:9a0bfb1234. Checks:OK: 1 NOTE: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 03 2024
R-4.5-win-x86_64NOTESep 03 2024
R-4.5-linux-x86_64NOTESep 03 2024
R-4.4-win-x86_64NOTESep 03 2024
R-4.4-mac-x86_64NOTESep 03 2024
R-4.4-mac-aarch64NOTESep 03 2024
R-4.3-win-x86_64NOTESep 03 2024
R-4.3-mac-x86_64NOTESep 03 2024
R-4.3-mac-aarch64NOTESep 03 2024

Exports:autographcirclecollect_connectionscollect_edgescreate_layoutedge_angleellipsisfacet_edgesfacet_graphfacet_nodesFacetEdgesFacetGraphFacetNodesgeom_axis_hivegeom_conn_bundlegeom_conn_bundle0geom_conn_bundle2geom_edge_arcgeom_edge_arc0geom_edge_arc2geom_edge_bendgeom_edge_bend0geom_edge_bend2geom_edge_bundle_forcegeom_edge_bundle_force0geom_edge_bundle_force2geom_edge_bundle_minimalgeom_edge_bundle_minimal0geom_edge_bundle_minimal2geom_edge_bundle_pathgeom_edge_bundle_path0geom_edge_bundle_path2geom_edge_densitygeom_edge_diagonalgeom_edge_diagonal0geom_edge_diagonal2geom_edge_elbowgeom_edge_elbow0geom_edge_elbow2geom_edge_fangeom_edge_fan0geom_edge_fan2geom_edge_hivegeom_edge_hive0geom_edge_hive2geom_edge_linkgeom_edge_link0geom_edge_link2geom_edge_loopgeom_edge_loop0geom_edge_parallelgeom_edge_parallel0geom_edge_parallel2geom_edge_pointgeom_edge_sfgeom_edge_spangeom_edge_span0geom_edge_span2geom_edge_tilegeom_node_arc_bargeom_node_circlegeom_node_labelgeom_node_pointgeom_node_rangegeom_node_sfgeom_node_textgeom_node_tilegeom_node_voronoiGeomAxisHiveGeomEdgeBezierGeomEdgeBsplineGeomEdgeParallelPathGeomEdgeParallelSegmentGeomEdgePathGeomEdgePointGeomEdgeSegmentGeomEdgeSfGeomEdgeSpanPathGeomEdgeSpanSegmentGeomEdgeTilegeometryGeomNodeTileget_conget_edgesget_nodesggraphguide_edge_colorbarguide_edge_colorstepsguide_edge_colourbarguide_edge_colourstepsguide_edge_directionis.geometrylabel_rectlayout_to_tablenode_anglenode_rank_fabricpack_circlesqgraphrectanglescale_color_viridisscale_edge_alphascale_edge_alpha_binnedscale_edge_alpha_continuousscale_edge_alpha_discretescale_edge_alpha_identityscale_edge_alpha_manualscale_edge_color_binnedscale_edge_color_brewerscale_edge_color_continuousscale_edge_color_discretescale_edge_color_distillerscale_edge_color_fermenterscale_edge_color_gradientscale_edge_color_gradient2scale_edge_color_gradientnscale_edge_color_greyscale_edge_color_huescale_edge_color_identityscale_edge_color_manualscale_edge_color_stepsscale_edge_color_steps2scale_edge_color_stepsnscale_edge_color_viridisscale_edge_colour_binnedscale_edge_colour_brewerscale_edge_colour_continuousscale_edge_colour_discretescale_edge_colour_distillerscale_edge_colour_fermenterscale_edge_colour_gradientscale_edge_colour_gradient2scale_edge_colour_gradientnscale_edge_colour_greyscale_edge_colour_huescale_edge_colour_identityscale_edge_colour_manualscale_edge_colour_stepsscale_edge_colour_steps2scale_edge_colour_stepsnscale_edge_colour_viridisscale_edge_fill_binnedscale_edge_fill_brewerscale_edge_fill_continuousscale_edge_fill_discretescale_edge_fill_distillerscale_edge_fill_fermenterscale_edge_fill_gradientscale_edge_fill_gradient2scale_edge_fill_gradientnscale_edge_fill_greyscale_edge_fill_huescale_edge_fill_identityscale_edge_fill_manualscale_edge_fill_stepsscale_edge_fill_steps2scale_edge_fill_stepsnscale_edge_fill_viridisscale_edge_linetypescale_edge_linetype_binnedscale_edge_linetype_continuousscale_edge_linetype_discretescale_edge_linetype_identityscale_edge_linetype_manualscale_edge_radiusscale_edge_shapescale_edge_shape_binnedscale_edge_shape_continuousscale_edge_shape_discretescale_edge_shape_identityscale_edge_shape_manualscale_edge_sizescale_edge_size_areascale_edge_size_binnedscale_edge_size_binned_areascale_edge_size_continuousscale_edge_size_discretescale_edge_size_identityscale_edge_size_manualscale_edge_widthscale_edge_width_binnedscale_edge_width_continuousscale_edge_width_discretescale_edge_width_identityscale_edge_width_manualscale_fill_viridisscale_label_sizescale_label_size_binnedscale_label_size_continuousscale_label_size_discretescale_label_size_identityscale_label_size_manualset_graph_stylesquareStatAxisHiveStatConnBundleStatConnBundle0StatConnBundle2StatEdgeArcStatEdgeArc0StatEdgeArc2StatEdgeBendStatEdgeBend0StatEdgeBend2StatEdgeBundleForceStatEdgeBundleForce0StatEdgeBundleForce2StatEdgeBundleMinimalStatEdgeBundleMinimal0StatEdgeBundleMinimal2StatEdgeBundlePathStatEdgeBundlePath0StatEdgeBundlePath2StatEdgeDensityStatEdgeDiagonalStatEdgeDiagonal0StatEdgeDiagonal2StatEdgeElbowStatEdgeElbow0StatEdgeElbow2StatEdgeFanStatEdgeFan0StatEdgeFan2StatEdgeHiveStatEdgeHive0StatEdgeHive2StatEdgeLinkStatEdgeLink2StatEdgeLoopStatEdgeLoop0StatEdgeParallelStatEdgeParallel0StatEdgeParallel2StatFilterStatFilterSfStatNodeArcBarStatNodeCircleStatNodeVoronoiStatReverseth_foregroundth_no_axestheme_graphunset_graph_style

Dependencies:cachemclicolorspacecpp11dplyrfansifarverfastmapgenericsggforceggplot2ggrepelgluegraphlayoutsgridExtragtableigraphisobandlabelinglatticelifecyclemagrittrMASSMatrixmemoisemgcvmunsellnlmepillarpkgconfigpolyclippurrrR6RColorBrewerRcppRcppArmadillorlangscalesstringistringrsystemfontstibbletidygraphtidyrtidyselecttweenrutf8vctrsviridisviridisLitewithr

Edges

Rendered fromEdges.Rmdusingknitr::rmarkdownon Sep 03 2024.

Last update: 2024-01-30
Started: 2017-02-21

Layouts

Rendered fromLayouts.Rmdusingknitr::rmarkdownon Sep 03 2024.

Last update: 2024-01-30
Started: 2017-02-21

Nodes

Rendered fromNodes.Rmdusingknitr::rmarkdownon Sep 03 2024.

Last update: 2024-01-30
Started: 2017-02-21

tidygraph and ggraph

Rendered fromtidygraph.Rmdusingknitr::rmarkdownon Sep 03 2024.

Last update: 2022-08-08
Started: 2018-01-16

Readme and manuals

Help Manual

Help pageTopics
Quickplot wrapper for networksautograph autograph.default
Create small multiples based on edge attributesfacet_edges
Create a grid of small multiples by node and/or edge attributesfacet_graph
Create small multiples based on node attributesfacet_nodes
The class hierarchy of the flare visualization libraryflare
Draw rectangular bars and labels on hive axesgeom_axis_hive
Create hierarchical edge bundles between node connectionsgeom_conn_bundle geom_conn_bundle0 geom_conn_bundle2
Draw edges as Arcsgeom_edge_arc geom_edge_arc0 geom_edge_arc2
Draw edges as diagonalsgeom_edge_bend geom_edge_bend0 geom_edge_bend2
Bundle edges using force directed edge bundlinggeom_edge_bundle_force geom_edge_bundle_force0 geom_edge_bundle_force2
Bundle edges along the minimal spanning treegeom_edge_bundle_minimal geom_edge_bundle_minimal0 geom_edge_bundle_minimal2
Bundle edges using edge path bundlinggeom_edge_bundle_path geom_edge_bundle_path0 geom_edge_bundle_path2
Show edges as a density mapgeom_edge_density
Draw edges as diagonalsgeom_edge_diagonal geom_edge_diagonal0 geom_edge_diagonal2
Draw edges as elbowsgeom_edge_elbow geom_edge_elbow0 geom_edge_elbow2
Draw edges as curves of different curvaturegeom_edge_fan geom_edge_fan0 geom_edge_fan2
Draw edges in hive plotsgeom_edge_hive geom_edge_hive0 geom_edge_hive2
Draw edges as straight lines between nodesgeom_edge_link geom_edge_link0 geom_edge_link2
Draw edges as diagonalsgeom_edge_loop geom_edge_loop0
Draw multi edges as parallel linesgeom_edge_parallel geom_edge_parallel0 geom_edge_parallel2
Draw edges as glyphsgeom_edge_point
Draw edges as LINESTRINGs in geographical spacegeom_edge_sf
Draw edges as vertical spansgeom_edge_span geom_edge_span0 geom_edge_span2
Draw edges as glyphsgeom_edge_tile
Show nodes as thick arcsgeom_node_arc_bar
Show nodes as circlesgeom_node_circle
Show nodes as pointsgeom_node_point
Show nodes as a line spanning a horizontal rangegeom_node_range
Show nodes as POINTs in geographical spacegeom_node_sf
Annotate nodes with textgeom_node_label geom_node_text
Draw the rectangles in a treemapgeom_node_tile
Show nodes as voronoi tilesgeom_node_voronoi
Define simple shapes for line cappingcircle ellipsis geometry is.geometry label_rect rectangle square
Create a connection extractor functionget_con
Create edge extractor functionget_edges get_sf_edges
Create a node extractor functionget_nodes get_sf_nodes
Create a ggraph plotcreate_layout create_layout.default create_layout.layout_ggraph create_layout.tbl_graph ggraph layout_ggraph layout_tbl_graph
Colourbar legend for edgesguide_edge_colorbar guide_edge_colourbar
Coloursteps legend for edgesguide_edge_colorsteps guide_edge_coloursteps
Edge direction guideguide_edge_direction
Friendship among high school boyshighschool
Automatically pick a layout based on graph typelayout_tbl_graph_auto
Place node to emphasize group structurelayout_tbl_graph_backbone
Calculate nodes as fractal circle budslayout_tbl_graph_cactustree
Place nodes in circles according to centrality measurelayout_tbl_graph_centrality
Calculate nodes as circles packed within their parent circlelayout_tbl_graph_circlepack
Apply a dendrogram layout to layout_tbl_graphlayout_tbl_graph_dendrogram
Place nodes according to their eigenvalueslayout_tbl_graph_eigen
Create a fabric layoutlayout_tbl_graph_fabric node_rank_fabric
Place nodes in circles based on distance to a specific nodelayout_tbl_graph_focus
Place nodes in a Hive Plot layoutlayout_tbl_graph_hive
Layout binary trees in a fractal H formationlayout_tbl_graph_htree
Use igraph layout algorithms for layout_tbl_graphlayout_tbl_graph_igraph
Place nodes on a line or circlelayout_tbl_graph_linear
Manually specify a layout for layout_tbl_graphlayout_tbl_graph_manual
Place nodes on a diagonallayout_tbl_graph_matrix
Place nodes according to the standard design of metro mapslayout_tbl_graph_metro
Calculate nodes as areas dividing their parentlayout_tbl_graph_partition
Place nodes based on a multidimensional scaling of a set of pivot nodeslayout_tbl_graph_pmds
Place nodes on their geographical spacelayout_tbl_graph_sf
Place nodes using stress majorisationlayout_tbl_graph_sparse_stress layout_tbl_graph_stress
Calculate nodes as rectangles subdividing that of their parentlayout_tbl_graph_treemap
Create an unrooted layout using equal-angle or equal-daylightlayout_tbl_graph_unrooted
Get the angle of nodes and edgesedge_angle node_angle
Pack circles togetherpack_circles
Edge alpha scalesscale_edge_alpha scale_edge_alpha_binned scale_edge_alpha_continuous scale_edge_alpha_discrete scale_edge_alpha_identity scale_edge_alpha_manual
Edge colour scalesscale_edge_color_binned scale_edge_color_brewer scale_edge_color_continuous scale_edge_color_discrete scale_edge_color_distiller scale_edge_color_fermenter scale_edge_color_gradient scale_edge_color_gradient2 scale_edge_color_gradientn scale_edge_color_grey scale_edge_color_hue scale_edge_color_identity scale_edge_color_manual scale_edge_color_steps scale_edge_color_steps2 scale_edge_color_stepsn scale_edge_color_viridis scale_edge_colour scale_edge_colour_binned scale_edge_colour_brewer scale_edge_colour_continuous scale_edge_colour_discrete scale_edge_colour_distiller scale_edge_colour_fermenter scale_edge_colour_gradient scale_edge_colour_gradient2 scale_edge_colour_gradientn scale_edge_colour_grey scale_edge_colour_hue scale_edge_colour_identity scale_edge_colour_manual scale_edge_colour_steps scale_edge_colour_steps2 scale_edge_colour_stepsn scale_edge_colour_viridis
Edge fill scalesscale_edge_fill scale_edge_fill_binned scale_edge_fill_brewer scale_edge_fill_continuous scale_edge_fill_discrete scale_edge_fill_distiller scale_edge_fill_fermenter scale_edge_fill_gradient scale_edge_fill_gradient2 scale_edge_fill_gradientn scale_edge_fill_grey scale_edge_fill_hue scale_edge_fill_identity scale_edge_fill_manual scale_edge_fill_steps scale_edge_fill_steps2 scale_edge_fill_stepsn scale_edge_fill_viridis
Edge linetype scalesscale_edge_linetype scale_edge_linetype_binned scale_edge_linetype_continuous scale_edge_linetype_discrete scale_edge_linetype_identity scale_edge_linetype_manual
Edge shape scalesscale_edge_shape scale_edge_shape_binned scale_edge_shape_continuous scale_edge_shape_discrete scale_edge_shape_identity scale_edge_shape_manual
Edge size scalesscale_edge_radius scale_edge_size scale_edge_size_area scale_edge_size_binned scale_edge_size_binned_area scale_edge_size_continuous scale_edge_size_discrete scale_edge_size_identity scale_edge_size_manual
Edge width scalesscale_edge_width scale_edge_width_binned scale_edge_width_continuous scale_edge_width_discrete scale_edge_width_identity scale_edge_width_manual
Edge label size scalesscale_label_size scale_label_size_binned scale_label_size_continuous scale_label_size_discrete scale_label_size_identity scale_label_size_manual
A theme tuned for graph visualizationsset_graph_style theme_graph th_foreground th_no_axes unset_graph_style
Membership network of American Whigswhigs