Relative Content

Tag Archive for rggplot2boxplot

Adjusting the scale on ggplot

I’m creating some box plots with geom_boxplot and geom_jitter in ggplot2. For the most part, my data points are clustered around the boxes, but there are a few that aren’t. I’m not removing them as outliers. When the plot is rendered, it squashes the boxes so that the y axis is scaled evenly and it shows the points at the top. What I’d like to do, is still show the points, but have the y axis distance between 1 and 3 the same as between 0 and 1 (approximately anyway). If the results were larger, I would log or square root transform, but they’re small numbers. Is there a way I can make this plot?

Adjusting the scale on ggplot

I’m creating some box plots with geom_boxplot and geom_jitter in ggplot2. For the most part, my data points are clustered around the boxes, but there are a few that aren’t. I’m not removing them as outliers. When the plot is rendered, it squashes the boxes so that the y axis is scaled evenly and it shows the points at the top. What I’d like to do, is still show the points, but have the y axis distance between 1 and 3 the same as between 0 and 1 (approximately anyway). If the results were larger, I would log or square root transform, but they’re small numbers. Is there a way I can make this plot?

Adding outliers to a boxplot from precomputed summary statistics

I am working with a large (50 x 800 000) sparse matrix (dgCMatrix) and want to plot a boxplot for the initial inspection of the data. This is a matrix of numeric items, with named rows (genes) and named columns (cells). The best solution I have found is to compute the relevant stats via sparseMatrixStats::rowQuantiles() and feed them directly to a boxplot geom.