Questions tagged [mosaic-plot]

Mosaic plots and image-plots use color and area in a 2-d discrete matrix to display "three way" categorical relationships.

76 questions
0
votes
1 answer

Mosaic Plot Error in R

I am new to R, and I'm trying to generate a mosaic plot using the VCD package in R but my code generates the following error: Setting row names on a tibble is deprecated. Error in loglin(x, expected, fit = TRUE, print = FALSE) : (list) object…
0
votes
1 answer

Elegant way to save mosaic plots?

Most of my plots are made with ggplot2 and the ggsave command saves them where they should be with one line. However, mosaic plots using the vcd package are best for my data. Problem: I don't get an error message with the following code. R says…
sparkyjump
  • 97
  • 1
  • 9
0
votes
1 answer

ggmosaic error message: default method not implemented for type 'list'

Trying to create a heatmap using ggmosaic, I keep getting the error Error in is.finite(x) : default method not implemented for type 'list' Searching for that error message, one answer was that "This error is because the is.infinite() and the…
lawyeR
  • 7,488
  • 5
  • 33
  • 63
0
votes
1 answer

R, package vcd, mosaic(): How to substitute mosaic plot shading colours for patterns

Normally the mosaic() function results in a mosaic plot where the shading of the cells represents the Pearson residual for independence. Red for negative values, blue for positive values, stronger shade for higher absolute residual values. I need to…
Edu
  • 121
  • 5
0
votes
1 answer

ggmosaic: how to remove the thin line when the count of a factor levels is 0

I've been trying to make a Mosaic / Marimekko plot using ggmosaic, but would wish to remove the thin line marking a hspine with the count of 0 (second column) . Can this be done in ggmosaic? I couldn't find how in the vignette / help files. A…
jajoko
  • 1
  • 3
0
votes
1 answer

R - Error in using the package ggmosaic

I'm using the new package ggmosaic to draw mosaic plots with ggplot2. I have an error "Computation failed in stat_mosaic()" for just one of the variable from the dataset that I use. The problem seems located around the content of the variable, and…
Kumpelka
  • 869
  • 3
  • 11
  • 33
0
votes
1 answer

Calculate mean of new variable for cells of contingency table

I'm trying to summarize Likert scale ratings data with colored bubbles in a plot. I currently have a violin plot overlaid over a jittered, faceted scatterplot, which provides a near miss to what I am trying to communicate. Ideally, I would just…
sautedman
  • 112
  • 10
0
votes
1 answer

statsmodels' mosaic plot with empty values

I would like to create a mosaic plot with statsmodels.graphics.mosaicplot.mosaic() with data that casts empty cells. They look ugly in the resulting plot, because a cell is created irrespective of its size. Example: import matplotlib.pyplot as…
MERose
  • 4,048
  • 7
  • 53
  • 79
0
votes
2 answers

Mosaic plot and text values

I created structable from Titanic dataset and used mosaic function for it. Everything worked great, hovewer I also wanted to label each box from mosaic plot with quantity of titanic passangers given their Class, Survival and Sex. As it turns out, I…
user3558203
  • 359
  • 1
  • 4
  • 12
0
votes
0 answers

Mosaic plot not showing labels

probably this will interest you. I'm running a mosaic plot in R, but I am not able to get de rows label names (just the columns). This is the code: xy=table(data$X, data$Y) mosaicplot (xy, color=2:3, las=2) Could you tell how to fix it?
Andres H
  • 15
  • 6
0
votes
0 answers

Displaying/ editing labels for Mosaic plot in R with 4 variables?

I am working with the Arrests data in "effects", I am currently trying to create a mosaicplot to show the relationship between released,colour, employed, and citizen. When I create the plot I only have labels for released and color. I would like to…
0
votes
1 answer

How to have sigma of something while plotting?

I am using plotFun function of mosaic package in R. I am trying to plot a 3D plot. Following is my code…
Karup
  • 2,024
  • 3
  • 22
  • 48
0
votes
0 answers

Remove names of categories from a mosaic plot and add a legend

I have this contingency table: > ftable(mytable) # print table Sex female male Pclass Survived 1 No 0 5 118 Si 0 139 61 2 No 0 12 146 …
CreamStat
  • 2,155
  • 6
  • 27
  • 43
0
votes
1 answer

Legend instead of label in mosaic( )

I am trying to make a plot that shows three categorical variables. In the experiment, a sound was played (t1-t6), listeners responded (preposition or number), and rated their confidence (1-5). I want to show these three things all together. The best…
Lisa
  • 909
  • 2
  • 13
  • 31
0
votes
1 answer

Construct new variable from >3 categorical variables (+maintain column names) for mosaic plot in Stata

My question is an extension of that found here: Construct new variable from given 5 categorical variables in Stata I am an R user and I have been struggling to adjust to the Stata syntax. Also, I'm use to being able to Google for R…
user2205916
  • 3,196
  • 11
  • 54
  • 82