I have a dataset with two groups - Experimental and Control. Each participant contributes two responses per group, which represent different learning styles. Th
Example data are here I am struggling to create an ordered and grouped bar plot. Any assistance appreciated. I have found two similar questions that essentially
I would like to arrange multiple plots into one figure, without any gaps between the plot area, and all plots being exactly the same size (see image below for a
With untidy data, running a scatterplot comparing two variables is trivial in either base R or ggplot2. For example, here is a sample scatterplot from R for Dat
i want to create a combination of violin- and dot-plot with ggplot. The idea is to shift the dots to the left and right if necessary, to avoid overlap. I know t
The image shows the database, it starts with day 0 and ends with day 14. In between these, there are empty values for what I am plotting. I am unable to correc
I have a ggplot which looks like this. p2=ggplot(data=data1, aes(x=ID, y = value)) + geom_line(group=1,color='steelblue', size=2) + facet_wrap(~variable)+t
I would like to create a ggplot2 bar chart with round corners at the top of the bars. Consider the following example data: data <- data.frame(x = letters[1:
I am wondering about the "behind-the-scenes functionality of ggplot2 and cut_number. I have some pretty complex data that has many subsets of data with a relati
library(tidyverse) library(ggplot2) library(plotly) data(mpg) ggplotly( mpg %>% ggplot(aes(x=hwy)) + geom_histogram(), tooltip = ("all")) When you
I'm trying to get 300 dpi images with ggsave, and am only getting the default 72 dpi. Here's an example of the code I'm using: library(tidyverse) x <- rnorm(
Since a few months, ggplot2 started to save png files with a transparent background. The code output in Rstudio and when saved as pdf looks great. It happens ma
I wish to use ggrepel to add labels to the ends of the lines of a ggplot. To do that, I need to make space for the labels. To do that, I use scale_x_continuous
It seems that the code I wrote and tested last week has now suddenly decided to change the output even though nothing in the code or the version of R or Rstudio
I have a faceted plot with very diverse data. So some facets have only 1 x value, but some others have 13 x values. I know there is the parameter space='free' w
I would like to plot geom_text() in a facet_wrap with scale = free. I tried to use geom_blank() or, set each height on each graph, but it was not successful. Wo
I've the following dataset: https://app.box.com/s/au58xaw60r1hyeek5cua6q20byumgvmj I want to create a density plot based on the time of the day. Here is what
I have a similar problem to Q: Connecting across missing values with geom_line, but found the answers provided only connect the lines when there is one missing
Within a Shiny application, I would like to provide users the option to select a regression method and then show the fit on their data on an existing ggplot2 gr
I am making a boxplot conditioned by a factor similar to this example: p <- ggplot(mtcars, aes(factor(cyl), mpg)) p + geom_boxplot(aes(fill = factor(am)))