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
0
votes
1 answer

How do I add text in the legend section of a waffle plot in R?

I am trying to create a waffle plot. My data and waffle plot looked like this- library(waffle) parts=c("Extraction"=397, "Operculectomy"=11, "Medication"=3) waffle(parts, row=12, colors=c("#CC0000", "#006600", "#669999")) I want to add some text…
0
votes
1 answer

Make waffle charts with ggplots

I am trying to reproduce a simple waffle graph like this from Tableau with R: I'm not sure if is doable in waffle package, however I would really appreciate any help on two cases: Is there any way to color fill the waffle chart row-wise…
DanG
  • 689
  • 1
  • 16
  • 39
0
votes
0 answers

Legend color does not match with plot color

I can't get the chart legend colors to match with the actual plot colors. They are all off, some are close. I'll post the code below and the steps I took to get to the final plot. Here is what I ended up getting: import pandas as pd import numpy as…
Christian Torres
  • 143
  • 1
  • 1
  • 7
0
votes
1 answer

Can you remove white space when pasting a ggplot2 plot into Word?

I'm trying to remove the margins around a plot from ggplot2. I'm working in a waffle context, so the reproducible example below is in this form. I have followed the answers provided in Remove Plot Margins in ggplot2, but am still getting a strange…
Bjørn Kallerud
  • 979
  • 8
  • 23
0
votes
0 answers

d3 tooltip unable to show changed data

I am drawing a d3 waffle chart with a csv file. I have two buttons on my html page for the users to change the dataset used to render the chart. I used .on(mouseover) and .on(mouseout) to show tooltip whenever the users hover over the chart. Once…
longhui
  • 13
  • 5
0
votes
0 answers

D3.js + waffle chart + partially fill circle/ rectangle in waffle chart based on the data

I am trying to fill circles in waffle partially based on the data. It should show circles partially coloured. With my following code, I am getting black circles instead of partially coloured circles. The clip-path I am trying to draw is incorrect…
Manali Gaikwad
  • 61
  • 1
  • 1
  • 8
0
votes
2 answers

Creating a named vector from a dataset in R

I have a dataset simplified as follows: print(data) Team Colour A Red B Red C Blue D Green I want to produce a waffle chart (square pie chart) of this data. I can do this very easily through: waffle(c(Red = sum(data$Colour ==…
0
votes
2 answers

How to make multiple plots with a for loop?

I was experimenting with the waffle package in r, and was trying to use a for loop to make multiple plots at once but was not able to get my code to work. I have a dataset with values for each year of renewables,and since it is over 40 years of…
Maria
  • 1
  • 4
0
votes
0 answers

Unable to download waffle package

I am trying to plot a waffle chart in R studio.However,I am unable to download waffle package.I get the following error: Error: package or namespace load failed for ‘waffle’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck =…
0
votes
1 answer

R - waffle package error "panel.spacing" is not a valid theme element name

Im trying to use the package waffle in R and it seems to be giving me the following error. I've copied this code from the GitHub repository of the package. library(waffle) parts <- c(80, 30, 20, 10) waffle(parts, rows=8) Error in (function (el,…
jmich738
  • 1,565
  • 3
  • 24
  • 41
0
votes
1 answer

how to attach a waffle plot below a stacked barplot

I have some data and from it I am creating a stacked barplot using ggplot2. For each sample on the x axis, additionally I have three factors per sample too. I would like to plot, between the barplot and the names of the samples, a different coloured…
user3324491
  • 539
  • 1
  • 4
  • 14
0
votes
1 answer

Compile RMarkdown PDF with Waffle Chart and Glyphs FAILURE. MWE included

I am unable to compile PDF using RMarkdown, the waffle package, and glyphs It doesn't matter if I use the TIKZ device or PDF rendering. The document compiles without a problem to HTML. The only work around I can think of right now is to create SVG…
RTS
  • 882
  • 1
  • 8
  • 13
1 2 3 4
5