Package: ggnext 0.1.0

ggnext: A Next-Generation Grammar of Graphics

An implementation of the Grammar of Graphics described by Wilkinson (2005, ISBN:978-0-387-24544-7), built on 'S7' classes. The familiar grammar vocabulary of aesthetics, geometries, statistics, scales, coordinates, facets and themes composed with '+' is preserved; every constructor that takes an argument also accepts a plot as the first argument of a native pipe ('|>') stage, so the two styles are interchangeable. The package is extended with built-in interactivity, animation, an exact-data export, a plot linter that flags common statistical-graphics mistakes before a figure ships, and a catalogue covering layout diagrams (Sankey, treemap, network, radar), machine-learning diagnostics (SHAP, receiver operating characteristic, calibration, partial dependence) and clinical reporting (Kaplan-Meier, forest, swimmer, CONSORT). Static output is written to Scalable Vector Graphics; interactive output is a self-contained 'HTML' document using a canvas element and vanilla 'JavaScript'. Both render targets consume the same computed-geometry buffer, giving a single source of truth for layer geometry. Layout and estimation algorithms follow their published descriptions, including Bruls, Huizing and van Wijk (2000) <doi:10.1007/978-3-7091-6783-0_4> for squarified treemaps, Fruchterman and Reingold (1991) <doi:10.1002/spe.4380211102> for force-directed graphs, and Kaplan and Meier (1958) <doi:10.1080/01621459.1958.10501452> for survival curves.

Authors:Mahesh Divakaran [aut, cre, cph], Dr. Rasin R S [ctb], Rakesh Poduval [ctb]

ggnext_0.1.0.tar.gz
ggnext_0.1.0.zip(r-4.7-any)ggnext_0.1.0.zip(r-4.6-any)ggnext_0.1.0.zip(r-4.5-any)
ggnext_0.1.0.tgz(r-4.6-any)ggnext_0.1.0.tgz(r-4.5-any)
ggnext_0.1.0.tar.gz(r-4.7-any)ggnext_0.1.0.tar.gz(r-4.6-any)
ggnext_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
ggnext/json (API)

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

Bug tracker:https://github.com/itsmdivakaran/ggnext/issues

Pkgdown/docs site:https://itsmdivakaran.github.io

On CRAN:

Conda:

datadata-analysisdata-analyticsdata-engineeringdata-sciencedata-visualizationdatasciencedatasetimageimage-analysisimage-generationimage-manipulationstatisticsvisualization

4.26 score 12 stars 392 downloads 169 exports 1 dependencies

Last updated from:a3688932ac. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK188
source / vignettesOK290
linux-releaseOK156
macos-releaseOK133
macos-oldrelOK124
windows-develOK112
windows-releaseOK140
windows-oldrelOK124
wasm-releaseOK127

Exports:aesanimateAnimationbuild_marksbuild_siteColorScalecompute_statCoordcoord_cartesiancoord_flipcoord_polarcoord_transformCoordCartesianCoordPolarFacetfacet_gridfacet_wrapGeomgeom_ablinegeom_ae_heatmapgeom_alluvialgeom_areageom_bargeom_bland_altmangeom_blankgeom_boxplotgeom_bumpgeom_calibrationgeom_chordgeom_colgeom_concordancegeom_confusion_matrixgeom_consortgeom_corgeom_countgeom_crossbargeom_cumincgeom_curvegeom_decision_boundarygeom_dendrogramgeom_densitygeom_dose_responsegeom_dotplotgeom_dumbbellgeom_embeddinggeom_errorbargeom_errorbarhgeom_forecast_bandgeom_forestgeom_freqpolygeom_functiongeom_funnelgeom_histogramgeom_hlinegeom_hrgeom_importancegeom_jittergeom_kmgeom_km_risktablegeom_labelgeom_learning_curvegeom_leveragegeom_lift_gaingeom_linegeom_linerangegeom_missing_patterngeom_nelson_aalengeom_networkgeom_parallelgeom_partial_dependencegeom_pathgeom_pointgeom_pointrangegeom_polygongeom_prgeom_qqgeom_qq_linegeom_quantilegeom_radargeom_rastergeom_rectgeom_residualgeom_ribbongeom_ridgelinegeom_rocgeom_ruggeom_sankeygeom_segmentgeom_shapgeom_shiftgeom_silhouettegeom_smdgeom_smoothgeom_spaghettigeom_spider_responsegeom_spokegeom_stepgeom_streamgeom_swimmergeom_textgeom_tilegeom_treemapgeom_upsetgeom_violingeom_vlinegeom_waterfallgeom_waterfall_responseggnextggnext_logoGgnextPlotggtitleinteractInteractLabelslabsLayerlimsplot_checkplot_dataplot_sizerenderScalescale_breaksscale_color_gradientscale_color_manualscale_mapscale_trainscale_x_continuousscale_x_discretescale_x_log10scale_x_reversescale_x_sqrtscale_y_continuousscale_y_discretescale_y_log10scale_y_reversescale_y_sqrtScaleContinuousScaleDiscreteStatstat_binstat_boxplotstat_countstat_coxphstat_densitystat_identitystat_jitterstat_kmstat_km_risktablestat_nelson_aalenstat_prstat_rocstat_smoothstat_waterfallstat_ydensitythemeThemetheme_classictheme_darktheme_ggnexttheme_minimaltheme_moderntheme_voidvalidate_plotwrite_plot_dataxlabxlimylabylim

Dependencies:S7

Readme and manuals

Help Manual

Help pageTopics
Construct aesthetic mappingsaes
Animate a plot over a transition variableanimate
Animation: a transition spec bound to a data variableAnimation
Build drawing primitives ("marks") from scaled aesthetic valuesbuild_marks
Build the ggnext documentation sitebuild_site
ColorScale: palette override for the color aestheticColorScale
Apply a stat's transformation to evaluated aesthetic valuescompute_stat
Coord: position transformation for normalized coordinatesCoord
Cartesian coordinate systemcoord_cartesian
Flipped Cartesian coordinatescoord_flip
Polar coordinatescoord_polar
Transform normalized positions through a coordinate systemcoord_transform
CoordCartesian: the identity coordinate systemCoordCartesian
CoordPolar: polar coordinate systemCoordPolar
Facet: split a plot into panels by data valuesFacet
Lay panels out in a rows-by-columns gridfacet_grid
Wrap panels into a gridfacet_wrap
Geom: geometric representation of computed valuesGeom
Sloped reference linegeom_abline
Adverse-event incidence heatmapgeom_ae_heatmap
Alluvial diagram (ordered, repeated-measures categorical flow)geom_alluvial
Area layer (filled to the zero baseline)geom_area
Bar chart layer (counts per category)geom_bar
Bland-Altman agreement plotgeom_bland_altman
Blank layergeom_blank
Boxplot layergeom_boxplot
Bump chart (rank over time)geom_bump
Calibration curvegeom_calibration
Chord diagramgeom_chord
Column chart layer (bar heights from the data)geom_col
Concordance / agreement plotgeom_concordance
Confusion matrixgeom_confusion_matrix
CONSORT participant flow diagramgeom_consort
Correlation matrix heatmapgeom_cor
Counted scattergeom_count
Crossbar: an interval box with the estimate markedgeom_crossbar
Cumulative incidence (competing risks)geom_cuminc
Curved connectorgeom_curve
Decision-boundary region plotgeom_decision_boundary
Hierarchical clustering dendrogramgeom_dendrogram
Density curve layergeom_density
Dose-response curvegeom_dose_response
Dot plotgeom_dotplot
Dumbbell layer (before/after per category)geom_dumbbell
Embedding scatter (t-SNE / UMAP / PCA)geom_embedding
Error bar layer ('ymin' to 'ymax' with caps)geom_errorbar
Horizontal error barsgeom_errorbarh
Time-series forecast with confidence bandsgeom_forecast_band
Forest plotgeom_forest
Frequency polygongeom_freqpoly
Curve of a functiongeom_function
Conversion funnelgeom_funnel
Histogram layergeom_histogram
Horizontal reference linegeom_hline
Hazard ratio forest plot (Cox proportional hazards)geom_hr
Feature importance plotgeom_importance
Jittered point layer (strip charts)geom_jitter
Kaplan-Meier survival curve layergeom_km
Number-at-risk table for a Kaplan-Meier curvegeom_km_risktable
Text on a background plategeom_label
Learning curvegeom_learning_curve
Leverage / Cook's distance plotgeom_leverage
Lift and cumulative gain curvesgeom_lift_gain
Line layer (points connected in x order)geom_line
Vertical interval without a markergeom_linerange
Missing-data pattern plotgeom_missing_pattern
Nelson-Aalen cumulative hazard curve layergeom_nelson_aalen
Network (node-link) diagramgeom_network
Parallel coordinates plotgeom_parallel
Partial dependence and ICE curvesgeom_partial_dependence
Path layer (points connected in data order)geom_path
Scatter-plot layer: one point per observationgeom_point
Point-range layer (interval plus midpoint; forest-plot building block)geom_pointrange
Polygonsgeom_polygon
Precision-recall curvegeom_pr
Quantile-quantile plotgeom_qq geom_qq_line
Quantile regression linesgeom_quantile
Radar (spider / star) chartgeom_radar
Rastergeom_raster
Rectanglesgeom_rect
Residual diagnostic plotgeom_residual
Ribbon layer (band between 'ymin' and 'ymax')geom_ribbon
Ridgeline plot (joyplot)geom_ridgeline
ROC curve layergeom_roc
Marginal ruggeom_rug
Sankey / alluvial flow diagramgeom_sankey
Segment layer ('x','y') to ('xend','yend')geom_segment
SHAP value beeswarmgeom_shap
Categorical shift plotgeom_shift
Clustering silhouette plotgeom_silhouette
Baseline covariate balance (standardized mean difference) plotgeom_smd
Smoothed trend layergeom_smooth
Individual longitudinal trajectories (spaghetti plot)geom_spaghetti
Oncology spider plotgeom_spider_response
Spokes (vector field)geom_spoke
Step layer (staircase line)geom_step
Streamgraphgeom_stream
Swimmer plotgeom_swimmer
Text label layergeom_text
Tile layer (heatmap cells)geom_tile
Treemapgeom_treemap
UpSet plot (set intersections)geom_upset
Violin layergeom_violin
Vertical reference linegeom_vline
Waterfall chart layer (running total of signed changes)geom_waterfall
RECIST best-response waterfallgeom_waterfall_response
Create a new ggnext plotggnext
Draw the ggnext hex stickerggnext_logo
GgnextPlot: the complete plot specificationGgnextPlot
Set the plot title (and optionally the subtitle)ggtitle
Add interactivity to a plotInteract interact
Labels: plot title block and axis/legend titlesLabels
Set plot and axis labelslabs
Layer: one geom + stat + data/mapping overridesLayer
Set both axis limits at oncelims
Print a plot's validation findings and return the plot, unchangedplot_check
Extract the exact data a plot drawsplot_data
Set the output sizeplot_size
Render a ggnext plotrender
Scale: map data values onto a normalized visual rangeScale
Compute tick breaks for a trained scalescale_breaks
Set the continuous color gradientscale_color_gradient
Set the discrete color palettescale_color_manual
Map data values through a trained scale onto [0, 1]scale_map
Train a scale on data valuesscale_train
Continuous scale for the x axisscale_x_continuous scale_y_continuous
Discrete positional scale for the x axisscale_x_discrete
Log10 and square-root scalesscale_x_log10 scale_x_reverse scale_x_sqrt scale_y_log10 scale_y_reverse scale_y_sqrt
Discrete positional scale for the y axisscale_y_discrete
ScaleContinuous: linear continuous positional scaleScaleContinuous
ScaleDiscrete: positional scale for categorical dataScaleDiscrete
Stat: statistical transformation applied to layer dataStat
Bin observations (histogram counts)stat_bin
Five-number summary for boxplotsstat_boxplot
Count observations at each xstat_count
Hazard ratios from a Cox proportional-hazards modelstat_coxph
Kernel density estimatestat_density
Identity statistical transformationstat_identity
Jitter positions for strip chartsstat_jitter
Kaplan-Meier survival estimatestat_km
Number-at-risk table for a Kaplan-Meier curvestat_km_risktable
Nelson-Aalen cumulative hazard estimatestat_nelson_aalen
Empirical precision-recall curvestat_pr
Empirical ROC curvestat_roc
Fitted trend line with confidence bandstat_smooth
Running totals for waterfall chartsstat_waterfall
Mirrored y-density for violinsstat_ydensity
Customize theme settingsTheme theme
Classic theme: white panel, black axes, no gridlinestheme_classic
Dark themetheme_dark
The default ggnext themetheme_ggnext
Minimal theme: no panel fill, light grey gridlinestheme_minimal
Modern theme: airy, high-contrast, horizontal rules onlytheme_modern
Void theme: data only, no chrome at alltheme_void
Check a plot for common statistical-graphics mistakesvalidate_plot
Write the exact plot data to CSVwrite_plot_data
Set the x axis titlexlab
Set continuous axis limitsxlim ylim
Set the y axis titleylab