All Questions
Tagged with visualization ggplot2
1,622
questions
0
votes
2
answers
41
views
Sorting calendar plot with geom_segment() without overlapping
I am trying to do this calendar ggplot2.
So far, it works fine, but I want to make one adjustment, and I am not finding the way:
Overlapping of geom_segment() in num_months 2:5 in year 2021. For some ...
0
votes
1
answer
29
views
Sorting calendar plot with geom_segment() + fix scale
I am trying to do this calendar ggplot2.
So far, it works fine, but I want to make two adjustments, and I am not finding the way:
I want to arrange every segment within each year and num_months, so ...
1
vote
1
answer
31
views
Calendar plot with geom_segment() [closed]
I have the following dataset in R. I aim to do a ggplot where the scale goes from 1 to 12 (January, February, ..., December) in the x-axis, and the y-axis goes from 1 to 6 ( num_months variable [in ...
1
vote
3
answers
42
views
ggplot , geom_line, stat_summary geom = "line" -- How use geom_line and match stat_summary -- annoying results
I'm a R frequent user but always try to understand why these two graphs are super different and what I can do to mimic geom_line to match the display produced by stat_summary (which is way better)
...
-1
votes
1
answer
28
views
Is there a way to make two scatter density plots share the same legend in R
I am using geom_pointdensity() to draw scatter density plot in R. Is there a way to draw them side by side as subplots and also share the same legend with the same range?
0
votes
1
answer
47
views
R: Boxplot whiskers going from minimum to maximum by a group
I would like to create a boxplot by groups where whiskers go from the maximum to minimum in each group, while the 500th highest value point should be highlighted.
This is the code that has worked ...
1
vote
0
answers
36
views
Dynamically change width and height of exported plot based on plot object
I'm working on exporting plots in R, and I need to dynamically set the dimensions (height and width) of the exported plot based on the plot's aspect ratio. The plots may have different scales on the x ...
1
vote
0
answers
16
views
How do I arrange a stacked bar chart in r ggplot2 based on one of the variables being stacked? [duplicate]
I am very new to coding and trying to learn the ways of ggplot2. I am stuck on trying to arrange my stacked bar chart by highest to lowest for one of the variables that is being stacked, so there is a ...
1
vote
1
answer
56
views
How to set non-uniform y-axis ticks in R ggplot2?
I am creating some plots using R ggplot2 and I have run into a challenge. I want to set non-uniform ticks on the y-axis, but I am not sure how to go about it.
eg:
df <- data.frame(x = c(1, 2, 3, 4, ...
1
vote
3
answers
117
views
Sunflower Plot Using ggplot2
I posted the following question on Posit Community three months ago but have not received an answer. I am reposting it here in the hope that someone can help me.
I am interested in creating a ...
1
vote
1
answer
37
views
How to create a multi-line graph in R transposed (i.e., the other way) using ggplot2? [duplicate]
In most multi-line graphs, it graphs multiple entities of one column, however in my case I want to graph multiple columns of a single entity.
In more simple terms a multi-line graph might show life ...
0
votes
2
answers
109
views
ggcoef_model change labels of levels
Consider the following dataframe and glmer model:
Dataframe
hunger <- sample(x = 0:1, size = 50, replace = TRUE)
treat <- sample(x = c("A1","A2"), prob = c(.75, .25), size = ...
1
vote
1
answer
31
views
How do you move labels to the edge of each slice in a stacked donut chart?
I am making a stacked donut chart in ggplot. Here is some sample data:
data <- data.frame(category = c("Group 1", "Group 1", "Group 2", "Group 2", "...
0
votes
1
answer
27
views
Data visualisation with 24hour format
I am trying to make a ggplot, geom point of emergence time of fish, which most likely only emerge between 6pm to 6am. In the x axis would be the date, and Y axis would be the time (hour) of emergence. ...
0
votes
2
answers
51
views
How to get mean/average line of multiple points (with different x-axis values) using R (or Excel)? [closed]
I have two dataframes (fire2022_12 and fire2021_12) with the same three columns (variable, x, y). I have pasted a snippet from the top of these dataframes below. I can plot these two dataframes in the ...