Comments (5)
@linshhhhh you can set geom_waffle(na.rm = TRUE)
or geom_waffle(na.rm = FALSE)
explicitly and it should work.
from waffle.
fixed in latest GH and now CRAN release. #ty
from waffle.
Hi! I just encountered the same problem. It gives an error in remove_missing()
: because "na.rm
must be TRUE
or FALSE
, not NA
". Have you figured out the solution to this error? Thank you in advance!
from waffle.
Thank you so much for your help. It works finally!
from waffle.
To recreate the exact sample plot, this is the complete code. If someone would like to update the documentation with these.
library(dplyr)
library(waffle)
storms_df <- storms %>%
filter(
status %in% c("tropical storm", "tropical depression", "hurricane"),
between(year, 2010, 2015)
) %>%
count(year, status)
storms_df %>%
ggplot(aes(fill = status, values = n)) +
geom_waffle(
color = "white",
size = .25,
n_rows = 10,
flip = TRUE,
na.rm = TRUE
) +
facet_wrap(~year, nrow = 1, strip.position = "bottom") +
scale_x_discrete() +
scale_y_continuous(labels = function(x) x * 10, # make this multiplyer the same as n_rows
expand = c(0,0)) +
ggthemes::scale_fill_tableau(name=NULL) +
coord_equal() +
labs(
title = "Faceted Waffle Bar Chart",
subtitle = "{dplyr} storms data",
x = "Year",
y = "Count"
) +
theme_minimal(base_family = "Roboto Condensed") +
theme(panel.grid = element_blank(), axis.ticks.y = element_line()) +
guides(fill = guide_legend(reverse = TRUE))
from waffle.
Related Issues (20)
- removing legend from the waffle chart HOT 1
- Phantom factor level being added to color aesthetic
- geom_waffle() not found HOT 17
- Waffle chart with 2 categories and raw counts fills out final column with a mysterious 3rd category of made up data HOT 1
- Issue with ggplotly HOT 1
- `theme_enhance_waffle()` does not remove ticks
- Missing dependency {plyr}
- geom_text doesn't work right when scale_label_pictogram is called HOT 1
- Error: geom_waffle requires the following missing aesthetics: x and y
- Waffle generates an error when more than 8 categories are supplied
- Add waffle to the ggplot2 gallary
- how to adjust the cell according to the value
- Cannot export chart with glyphs as svg or pdf HOT 1
- Changing the orientation of geom_waffle
- About Waffle Bar Charts with scales
- Allow n_rows to be used inside aes()
- Odd phantom level appears when I plot two levels
- Crop plot when using fewer rows
- Can this library be used to make pictographs?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from waffle.