Using the following data frame I aim to stack all x values by group using geom_bar or geom_col and fill them by subgroup. But I also want to fill e ...
Using the following data frame I aim to stack all x values by group using geom_bar or geom_col and fill them by subgroup. But I also want to fill e ...
I have two geom_col graphs and I want to merge each of the bars side by side in one graph. I can superimpose these two plots by using: I want to ...
I am trying to overlay a line plot and column plot. I am using geom_col with position=fill, such that its y-axis goes from 0 to 1. However, the line p ...
I'm wondering if anyone has an easy way to have each category be a separate color scale. ie: "Forb" would be all shades of blue and green, "Conifer" ...
I am trying to create a clustered bar graph using ggplot to plot "accum_sum_per" and "mean_per". The table looks as follows: The code I used to cr ...
I'm really struggling to achieve what feels like an incredibly basic geom_bar plot. I would like the sum of y to be represented by one solid bar (with ...
I produced a geom_col() that has 13 separate columns on it. I would like to assign a specific color to the columns: for example, I have "Teams" on the ...
I am not sure why "na.rm=TRUE" in ggplot() and geom_col() don't remove the missing. Here is the input file (file name in the code is dat.csv ): Her ...
I came back to R to make some graph for publication figure. However, I'm quite rusty and still in the learning process and I'm struggling on bar/col-b ...
I have a data frame with three continuous variables (x,y,z). I want a column plot in which x defines the x-axis position of the columns, y defines the ...
I am trying to label columns with geom_text() on a geom_col() however, the labels (numbers) are not printing out correctly, nor positioning the way I ...
I'm trying to modify @DaveArmstrong 's answer to this question because I'm also trying to display the percent for the entire sample, aka for White, Bl ...
I have two questions, the first a (hopefully) straightforward mechanical one and the second more theoretical (though still with a technical element). ...
I am working with the following table: I've created the following visualization: I've managed to make the y-axis label with the dollar sign sy ...
datapasta::df_paste(head(df,45)[,c('A.','Object','Colour')]) #> Error in unclass(x)[...]: subscript out of bounds data.frame( stringsAsFactors ...
Here I provide an example of what I have tried: So basically what I want to obtain is two bars for each xtick, with a line for each bar set passing ...
This has been asked in various forms before, but I'm attempting it in a slightly different way and can't seem to get it exactly right. When I use this ...
With the following code I get this plot: image of plot Here the woman and man are put on top of each other for each marital status. However I woul ...
I'm interested in adding grouping labels above my ggplot bar charts. This feature exists for data visualizations such as phylogenetic trees (in ggtree ...
Aim: plot a column chart representing concentration values at discrete sites Problem: the 14 site labels are numeric, so I think ggplot2 is assuming ...