Package: gghinton 0.1.0

Robin Foster

gghinton: Hinton Diagrams for 'ggplot2'

Provides a 'ggplot2' extension for drawing Hinton diagrams, a visualisation technique for numerical matrices in which the area of each square is proportional to the magnitude of the corresponding entry. For signed data, white squares indicate positive values and black squares indicate negative values on a grey background. Hinton diagrams are especially useful for visualising PCA weight matrices, correlation matrices, and transition matrices.

Authors:Robin Foster [aut, cre, cph]

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

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

Bug tracker:https://github.com/robin-foster-rf/gghinton/issues

Datasets:
  • alice_bigrams - English character bigram counts from Alice's Adventures in Wonderland

On CRAN:

Conda:

5.08 score 3 stars 5 scripts 180 downloads 8 exports 17 dependencies

Last updated from:3a2a4c45d4. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK131
source / vignettesOK183
linux-release-x86_64OK134
macos-release-arm64OK161
macos-oldrel-arm64OK138
windows-develOK97
windows-releaseOK83
windows-oldrelOK78
wasm-releaseOK110

Exports:as_hinton_dfgeom_hintonGeomHintonmatrix_to_hintonscale_fill_hintonstat_hintonStatHintontheme_hinton

Dependencies:clicpp11farverggplot2gluegtableisobandlabelinglifecycleR6RColorBrewerrlangS7scalesvctrsviridisLitewithr

MacKay's ITILA Examples
The MacKay colour scheme | Figure 2.1: discrete unigram probabilities | Figure 2.2: English letter bigrams | Figure 2.3: Conditional probability distributions | Figure 2.5: Bill and Fred's urn problem

Last update: 2026-03-29
Started: 2026-03-29

Why Hinton Diagrams?
The problem with heatmaps for signed data | Why area beats colour for magnitude | The signed data advantage | When other visualisations are better

Last update: 2026-03-29
Started: 2026-03-29

Getting Started with gghinton
What is a Hinton diagram? | When to use a Hinton diagram | Quick start | Unsigned data | Converting different data structures | The scale_by parameter | Customization | Custom colours | Axis labels from matrix names | Removing the background | Correlation matrix example

Last update: 2026-03-29
Started: 2026-03-29

Hinton Diagrams in Practice: A Gallery
1. Correlation matrix | 2. PCA loadings | 3. Confusion matrix | 4. Social mobility: occupational status transitions | 5. Credit rating transitions | 6. Nucleotide substitution rates | 7. Regression coefficient matrix | 8. Cross-tabulation: hair and eye colour

Last update: 2026-03-29
Started: 2026-03-29