Given the following data, I compose a data frame with a factor and a numeric column. X2 <- c(4,4,3,5,4,4,2,3,4,3,5,5,4,3,3,4,2,3,3,4,3,5,3,3,4,4,3,3,5,4,5,4,
My data have 2 numerical columns (positive and negative values) and 2 categorical variables. Now I want to plot negative and positive bars on same line, instead
In am looking a solution to a different representation of the legend to the example given here: https://rpubs.com/ageek/ggplot-adv-part2 The code below gives th
I am using an online ONS dataset of inflation and trying to chart it, but when plotting it with ggplot the x-axis is not in chronological orde
To visualize the results of my linear mixed model (LMM) I would like to plot spagetti plots that track the change in volume1 over time for all participants. I w
I am working with phylogenetic trees. Import the phylogenetic tree file with ggtree::read.tree and get the information with readxl::read_xlsx. I want to visuali
I'm making a plot involving facets, and I am trying to fix the alignment of the facet/strip title. Right now it seems to left align to the panel, which places i
I have dataframe which represents sales by model within 2 different years. 'change' column stands for absolute change by models from 2020 to 2021 while 'chng.pe
I'm quite new in R and I'm struggling overlaying a filled histogram divided in 6 classes and a KDE based on the whole distribution (not the individual distribut
I'm relatively new to R and I'm struggling to figure out a way to get a set of plots with different y values. Below is a simplified version of the dataset I'm w
I am using the cat_plot function from the [interactions]https://interactions.jacob-long.com/reference/cat_plot.html package to plot a 2-way interaction between
I have two CSVs for experimental data measuring the effects of a two values of a single variable. Basically the code is the same except for the name of the data
The following code produces histograms that overlap. How can I modify this code to make the histograms stack on top of each other? library(tidyverse) library(gg
I am creating a line graph in R using ggplot2. So far the graph is looking fine (I am relatively new to all this), but I have run into an issue trying to adjust
example of the data: Date Inflation 2020 Q1 2 2020 Q2 2.1 2020 Q3 2 2020 Q4 2.1 I am using ggplot ggplot(CPI,aes(x=date,y=inflation,group=1))+geom_line() but
I want to change the tickmode of all xaxis/yaxis in all subplots to "auto" but the number of subplots changes. I tried the following code. It works for the firs
The following is df_sales df_sales <- structure(list(Year_of_Release = c(2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
I generate a list of ggplot objects inside a loop as follows: myPlots = list() for(i in 1:length(maturities)){ myPlots[[i]] <- ggplot(deltaIR.df, aes(samp
I am trying to make each column fill by the proportion of each type of medal (Bronze, Silver, Gold) in relation to the Medal_sum for each country. Olympic_overa
This is my code: p14 <- ggplot(plot14, aes(x = Harvest, y = Percentage, fill = factor(Plant, level = orderplants)))+ geom_col(show.legend = FALSE)+ geom_