57,705 questions
2
votes
0
answers
46
views
Removing outside border line in R map
I am working on highlighting groups of counties within Ohio and while I am happy with where I have ended up overall, I have one aesthetic issue I cannot seem to solve (and it may not be solvable).
...
0
votes
0
answers
53
views
Alphabetical ordering of y-axis in complex ggplot2
I'm trying to make a line chart of the density of different species along a vegetation transect.
There are two transects (Transect A and Transect B), which I would like to plot separately.
"Cover&...
0
votes
1
answer
119
views
Creating a bar graph with categories derived from multiple columns
I have generated the following summary of means and SDs for two parameters, SAR and ER, for several multi-column categories:
structure(list(category = c("DIT GROUP\nCR 16.0005\nADB", "...
0
votes
1
answer
35
views
Adding geom_text in patchwork with shared y-axis and both positive and negative values
I have a patchwork plot consisting of a total of four plots. The procedure I’m asking about is mainly relevant for two of them, though I believe it can be applied to both. These two plots share a ...
0
votes
1
answer
79
views
Build forest plot for estimate comparison of multiple models using ggplot2. How to add text of CI?
I am trying to create a forest plot to compare estimates of different models.
Tho goal is to plot all the estimates of the same predictor for the different models so they are comparable.
For this I ...
0
votes
2
answers
78
views
Positioning of geom_text with negative stacked geom_bar
I have a ggplot2 plot with both positive and negative geom_bar values. For the geom_bar that shows the negative values, I’m having an issue where the position of geom_text is not displayed correctly. ...
2
votes
1
answer
95
views
Area with color gradient
I created this simple ggplot2 plot and would like to generate a vertical color gradient for the area between y = 0 and the respective values, possibly using geom_ribbon (?). However, I haven’t found ...
1
vote
1
answer
39
views
R geom_contour_filled date scale
I have 3D data that are all dates. I want to plot them with a contour. I have almost what I want with geom_contour_filled of package ggplot2 but I struggle to obtain a decent legend as dates (I'd like ...
3
votes
1
answer
67
views
How to use Times New Roman and italicization in equation in ggplot2?
I need all text in my graphs to be in Times New Roman. I also need the variables (R, P) generated in stat_poly_eq to be italicized. However, it seems that setting the font to Times New Roman ...
3
votes
1
answer
105
views
How to plot data like an animated ECG in R?
I have a 2 min data set sampled at 10 Hz that I want to plot like an ECG in R: I want to create a plot with a 30 s window, plot the first 30 s from left to right in real time, then after 30 s, the ...
1
vote
1
answer
110
views
stat_ellipse() in MCA plot does not cover jittered points / extends far beyond the data
I am creating a Multiple Correspondence Analysis (MCA) plot in R using FactoMineR, factoextra, and ggplot2. The goal is to add confidence ellipses around the archetype categories in the MCA space.
The ...
Advice
0
votes
5
replies
184
views
Drawing geometric diagrams in R, ggplot
To illustrate the ideas behind discriminant analysis, I created the image below containing a scatterplot with two groups and a plot of the densities of the scores, LD1 on the discriminant function.
...
2
votes
2
answers
103
views
Reorder stacked bar graph by value [duplicate]
What is the easiest-to-replicate way of reordering these bar graphs (
group1, group2) so that it is arranged in ascending order of col3 from bottom to top? I am looking for a solution that can be used ...
0
votes
1
answer
96
views
Confidence interval not covering the entire x axis [closed]
The confidence interval on my scatter plot doesn't cover the entire x axis, while the regression line fits the entire data set. The data that isn't covered by the c. interval doesn't have any missing ...
1
vote
1
answer
67
views
Error with stat_pointinterval() associated with aesthetics [closed]
I have previously used the stat_pointinterval() function from the R package tidybayes to make plots of the median and credible intervals around model parameters.
While re-running code today, none of ...