Questions tagged [waffle-chart]

A waffle chart (also known as a "square pie chart") is a type of data visualization that presents quantities as proportions of a rectangular grid.

Description

A waffle chart (also known as a "square pie chart") is a type of data visualization that presents quantities as proportions of a rectangular grid. This method of presentation can be better at presenting proportional data than a standard pie chart, as the grid structure helps viewers compare the proportion of each category more precisely.

Tools for producing waffle charts exist for programming languages/packages such as , , and . This tag should be used for any questions involving the formatting and/or implementation of these plots.

Implementations

PyWaffle, for Python

The waffle package for R

Additional Resources

  • An RBlogger post introducing the waffle package
  • Examples of waffle charts made using D3
72 questions
27
votes
4 answers

How to do waffle charts in python? (square piechart)

Something like this: There is a very good package to do it in R. In python, the best that I could figure out is this, using the squarify package (inspired by a post on how to do treemaps): import numpy as np import pandas as pd import matplotlib as…
lincolnfrias
  • 1,983
  • 4
  • 19
  • 29
9
votes
4 answers

Font Awesome in R, loaded but not found by waffle

I downloaded the otf files from this website. My IT dept installed "Font Awesome 5 Free Regular" and I used library(extrafont) font_import() loadfonts(device = "win") I can see Font Awesome as "Font Awesome 5 Free Regular" is registered. When I…
Lauren
  • 110
  • 1
  • 10
7
votes
3 answers

Creating a waffle plot together with facets in ggplot2

Is there any easy way to create waffle plots in combination with facets in ggplot2, or combing with the waffle package? For example, replacing every bar in the below with 100 squares to represent 1 percent. ggplot(mtcars, aes(x = factor(vs), y =…
MLEN
  • 2,162
  • 2
  • 20
  • 36
7
votes
4 answers

Wanted: repeated-pictogram visualization of population split

I am looking for a way to do a (actually quite common) visualization, whereby the split of a population of, say, N units into several categories is shown via a set of N pictograms - I'd prefer filled squares; in a newspaper, etc., one might see…
Dimitri Shvorob
  • 495
  • 1
  • 6
  • 24
6
votes
1 answer

How do I reduce the gaps between plots using ggarrange in R?

I am trying to create a waffle plot with a total of 9 plots in one. However, no matter what I try, I am not able to reduce the spacing between the 3 columns in the plot. This is the plot I have now. Wafle plot football The code I used so far goes…
Harsh Krishna
  • 83
  • 1
  • 4
5
votes
1 answer

Using gganimate with waffle charts

I've been playing with the waffle package, and am trying to get it to work with gganimate. Using mpg as an example, I've created waffle charts to show number of models by each class. I would then like to use gganimate to display, in turn, a chart of…
jllls
  • 83
  • 4
4
votes
1 answer

How to change color of "tile grout" in R waffle plot to match background

I'm trying to make a waffle plot to use dark mode. This involves changing both the background color and the color of the tile grout. I can't figure out how to do the tile grout. I'm unable to do any of the normal operations to change the…
brienna
  • 1,415
  • 1
  • 18
  • 45
4
votes
2 answers

Remove blank squares from waffle chart

I'm trying to make a waffle chart in R using the waffle package. I don't have an even number of entries (49) and I get blank filler squares in my otherwise perfect chart (see purple/blue squares). Here is an example of the…
J Stewart
  • 43
  • 2
4
votes
1 answer

Waffle package: Colors mixed up with a Zero/0 in data

An example from my data: 1 99 85 15 8 92 1 99 10 90 0 100 The problem is the last set of numbers: When there is a 0 included, waffle behaves like it's a 100. The zero seems to be ignored. Is there a way to prevent this? Working: Green = 10, orange…
kabr
  • 1,249
  • 1
  • 12
  • 22
3
votes
2 answers

Waffle Chart in R: 99 icons instead of 100 icons

Here is the data: df <- structure(list(country = c("Australia", "Australia", "Australia", "South Korea", "South Korea", "South Korea"), parts = c("case_1", "case_2", "non_case", "case_1", "case_2", "non_case"), values = c(1, 19, 80, 1, 29, 70)),…
Zhiqiang Wang
  • 6,206
  • 2
  • 13
  • 27
3
votes
1 answer

geom_waffle not showing one cell

I've been working with the package waffle and I can't solve how to fix this waffle plot so that it shows 100 squares/cells This is the data and my code: # devtools::install_github("hrbrmstr/waffle") library(ggplot) library(waffle) data <-…
3
votes
2 answers

Manual colour scale in faceted ggplot waffle chart

I am trying to get the same customized colour scale for a faceted waffle chart in R, using package waffle from https://github.com/hrbrmstr/waffle and ggplot2::facet_wrap. Below a reproducible example: foo <- data.frame(Genus =…
Luca
  • 65
  • 5
3
votes
2 answers

How to create a waffle chart with a dictionary?

I'm learning Python via Jupyter lab and I'm facing a problem with Waffle chart. I have the following dictionary, which I want to display as a Waffle chart: import pandas as pd import matplotlib.pyplot as plt from pywaffle import Waffle dic =…
3
votes
1 answer

How to make a pictogram / icon chart?

Is there a method to produce a pictogram-chart with python (be it with matplotlib, seaborn, ggplot, etc.)? — I am not sure, which term is the most standard-term for this type of graphs, maybe also: square pie chart, pictograph, icon chart, picture…
dia
  • 329
  • 2
  • 12
2
votes
1 answer

Waffle chart with time on x axis

I would like to plot a waffle chart with time on the x-axis in R, similar to this one below. Can anyone help, please? Thanks. The dataset is here: df <- data.frame(spec = c("Rehab", "Cardiology", "Endocrine", "Respiratory", "General Surgery"), …
Tse Lert
  • 192
  • 5
1
2 3 4 5