Questions tagged [stripchart]

R stripchart produces one dimensional scatter plots (or dot plots) of the given data.

stripchart produces one dimensional scatter plots (or dot plots) of the given data. These plots are a good alternative to boxplots when sample sizes are small.

46 questions
1
vote
2 answers

How to create a presentation in R with several plots obtained by a function?

I have created one function that gives you the number of plots that you want, depending on a list. This is the example that I have created. list_genes <- c("GEN1", "GEN2", "GEN3") myfunction <- function(x,y){ for(gene in list_genes){ #…
emr2
  • 1,436
  • 7
  • 23
1
vote
1 answer

Changing marker's size in stripplot according to data value

I'm trying to create a categorical plot in which the size of each marker reflects some magnitude of the corresponding sample, as in the following example using the preloaded tips data(upper plot https://i.stack.imgur.com/pRn0x.png): import seaborn…
1
vote
2 answers

How can I create a stripchart with mean represented as a short line instead of dot in R?

I would like to create a stripchart that looks like this: But I was only able to create something similar using stat_summary crossbar: ggplot(data, aes(x=variable, y=value)) + stat_summary(fun.data="mean_sdl", fun.args = list(mult=1),…
joker33
  • 33
  • 5
1
vote
1 answer

Print segments for factor levels into stripchart in base R

I have a dataframe with a numerical variable and a factor variable, like this: set.seed(123) df <- data.frame( numbers = c(rnorm(50, 3), runif(50)), levels = sample(LETTERS[1:5], 100, replace = T) ) What I'd like to do is a stripchart that…
Chris Ruehlemann
  • 20,321
  • 4
  • 12
  • 34
1
vote
1 answer

Centrally aligned “Point-wise” colors in beeswarm

Is it possible to draw a beeswarm plot such that point-wise colors are aligned in the horizontal center? (I believe this would improve the readability a lot especially if the data is not as clear-cut as in the example.) To achieve this plot with…
Felix Dietrich
  • 127
  • 1
  • 11
1
vote
1 answer

Dotchart / Stripchart / Dotplot GGplot stacks dots on top of each other. How can I fix this?

I want to make a dotplot (stripchart) with ggplot, but the code seems to stack the dots on top of each other. There is no more variation :(. Anyone know how I can fix this? df <- data.frame(City = c("AMS", "AMS", "AMS", "AMS", "BEL", "BEL", "BEL",…
SHW
  • 461
  • 7
  • 26
1
vote
1 answer

Reduce spacing between two plots on a single graph

Very new to R, have tried multiple different things and can't seem to get it. Need to reduce space between the two plots. Any idea how to reduce that huge space between two plots?
1
vote
1 answer

Order groups in a stacked stripchart by sum in R

I have a grouped and stacked stripchart() in R. stripchart(gear ~ cyl, data=mtcars, method="stack") cyl are the groups here. I want to groups ordered by its sum. From bottom to top the ordering should be 6, 4 and 8. How can I do this automaticly…
buhtz
  • 10,774
  • 18
  • 76
  • 149
1
vote
1 answer

Stacked stripchart in R getting cut off?

I am trying to create a dotplot for some sampling distributions. I have created one for the medians of random samples of a uniform distribution. However the chart is getting truncated erroneously at the top. I have tried to reset with a ylim vector…
1
vote
2 answers

Can data points be labeled in stripcharts?

I can't find a way to label datapoints in stripchart. Using the text function, as suggested in this question, breaks down when points are stacked or jittered. I have numerical data in 4 categories (columns 2-5) and would like to label each datapoint…
SeanJ
  • 115
  • 6
1
vote
1 answer

Coordinates for formula based plotting of factors in boxplot, stripchart

I am plotting continuous data (y-variable) based on several categorical variables (factors, x-variables) using boxplot and stripchart. For this purpose the default plotting functions provide a handy formula-based interface, where I can input data…
Teemu Daniel Laajala
  • 2,316
  • 1
  • 26
  • 37
1
vote
1 answer

Different labels for the x-axis

i have this data and plot mydata <- data.frame(a=c(1:5),b=c(6:10),c=c(11:15),e=c(16:20)) plot <- stripchart(mydata, method="jitter", vertical=T,main='plot',pch=19) I would like to subset the x axis into two labels named 'a+b' and 'c+d'…
Sergio.pv
  • 1,380
  • 4
  • 14
  • 23
1
vote
1 answer

Shorten x-axis in a R stripchart

I would like to shorten the x-axis in a stripchart so it isn't going way past my data. How can I do this? I used at = seq(1, length.out = length(unique(Avagno0 $NugentScore)), by = 0.5) to bring the spacing between colmuns closer together. This is…
1
vote
2 answers

new R user has regression trouble

I am new to R and am trying to run a regression analysis. I have constructed arbitrary vectors with the c() function to learn the plot, lm, fit, abline, and summary functions. That has worked properly, but when trying to regress imported data, I…
Chris S.
  • 11
  • 1
0
votes
0 answers

Issues Displaying Correct Values in ggstripchart (False values displayed)

I am having issues getting a stripchart to display correct values. I have a sample of a table below that includes two columns (Date, Resistance). The resistance column contains many observations that all have the same value (0.5). This dataset is…
Rob S
  • 1
  • 2