Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scatterplot matrixes with boxplots for categorical data

Tags:

r

statistics

I'm a big fan of SPLOMs

Does anyone know of SPLOM packages that can support boxplots for categorical data? It looks really weird when you have scatterplots for columns like "gender"

like image 443
Zeke Nierenberg Avatar asked Aug 14 '12 19:08

Zeke Nierenberg


People also ask

Can you use Scatterplots for categorical data?

Categorical Scatter PlotsBoth strip plots and swarm plots are essentially scatter plots where one variable is categorical. I like to use them as additions to other kinds of plots, which we'll discuss below as they are useful for quickly visualizing the number of data points in a group.

Which plot is best for categorical variables?

Mosaic plots are good for comaparing two categorical variables, particularly if you have a natural sorting or want to sort by size.

Which graphs are used to plot categorical data?

Frequency tables, pie charts, and bar charts are the most appropriate graphical displays for categorical variables.

Is scatterplot categorical or quantitative?

Most two-dimensional graphs consist of one quantitative scale and one categorical scale, although a familiar exception is the scatterplot, which has quantitative scales along both axes (see Figure 2). In a line graph, the categorical scale always appears on the horizontal axis.


1 Answers

You can use the GGally package, it support a lot of feature.

require(GGally)
data(tips)
tips.sample <- tips[ ,c("total_bill", "tip", "day")]

ggpairs(tips.sample, upper = list(continuous = "points", combo = "box"), 
                     lower = list(continuous = "points", combo = "box"))

enter image description here

like image 151
dickoa Avatar answered Sep 19 '22 12:09

dickoa