geom-text Questions
4
Solved
I can add text to a ggplot using geom_text just fine (example using the cars database):
ggplot(cars, aes(speed, dist), color='blue') +
geom_point(size=0.8) +
geom_text(y=25, x=5, aes(label=paste...
2
Solved
I'm struggling with an additional label that I would like to add to my ggplot graph.
Here is my data set:
Group Gaze direction Counts Duration
Expert Performers game table 148 1262.122
Expert Per...
2
Solved
My line plot is suitable except my labels overlap too much. I realize their respective datapoints are close, but is there a way to pretty up the label spacing?
My data and code:
library(ggplot2)
li...
2
Solved
I'm trying to produce a stacked column chart with data labels.
I'm able to produce the chart, but was unable to find a way to input data labels. I have tried geom_text() but it keeps asking me to i...
3
Solved
Consider a plot with a segment/line and a text/label. I'd like the text to overlay the segment such that the text does not overlap the segment.
I tried using geom_label but I still want the backgro...
2
Solved
I have the following ggplot density plot
ggplot(mpg, aes(cty)) + geom_density(aes(fill=factor(cyl)))
How do I remove the legend , and add labels above each distribution to denoted the group it ...
2
Solved
I would like to adjust the text on the piechart.
I want to put the values in the middle of each side of the piechart.
I've tried using hjust,vjust, and tried to use other function etc. But it hasn'...
4
Solved
When plotting a bar chart, I often add labels to bars to signify the y-value for each bar. However, I run into trouble when the bar becomes too low, making the label unreadable or simply ugly.
Exam...
3
Solved
I am annotating faceted plots to include a superscript, yet am having trouble making the text bold. I realise that this has something to do with creating an expression outside the plot call and the...
1
Solved
I want to use geom_text_repel to have my labels lie as close to the edge of a pie graph as possible unless the percent is under a certain value, in which case the label should be nudged further awa...
2
Solved
This is a follow-up my original question for how to pass an expression with subscript to a geom_text label in ggplot.
Duck provided a great solution using parse = T within the geom_text() command. ...
Indecorous asked 9/9, 2020 at 16:23
1
Solved
I am attempting to pass an expression with subscript to a single geom_text() label in ggplot. Here is my code right now:
my_exp <- expression('my_exp'[s][u][b])
my_data <-
data.frame(
var...
Tiemroth asked 9/9, 2020 at 14:15
5
Solved
I wish to position text in a ggplot without specifying x and y positions, but instead using keywords, like e.g. in graphics::legend ("The location may also be specified by setting x to a singl...
3
Solved
I am trying to get a table side by side with my forest plot but I am having a lot of trouble doing so.
I am able to make a forest plot with the following code:
###dataframe
###dataframe
library(g...
Nunhood asked 7/6, 2020 at 14:8
2
Solved
Please consider the following minimal example:
library(ggplot2)
library(ggrepel)
ggplot(mtcars) +
aes(x = mpg, y = qsec) +
geom_line() +
geom_text(x = 20, y = 20, label = "(20,20)")
I guess...
1
Solved
Recently I made a plot using ggplot in R. When I add my code for ggplot_label_repel, suddenly the symbols in the legend change from circles into the letter "a".
Does this have something to ...
1
Solved
I want to have a stacked barplot with percentages in it based on counts.
I have almost reached what I want but every value in the text is 100% instead of the real percentage ...
I think there is on...
2
Solved
I need to change the number format in geom_text() to include a comma.
I have seen the related questions and I can't get those solutions to work. I've tried the "sep =" one, the count/sum(count) k...
2
Solved
While adding annotation text to a plot I noticed that geom_text() produced unsightly, jagged text, while annotate() produced smooth, nice-looking text. Does anyone know why this happens and if ther...
3
I've created a side-by-side boxplot using ggplot2.
p <- ggplot(mtcars, aes(x=factor(cyl), y=mpg))
p + geom_boxplot(aes(fill=factor(cyl)))
I want to annotate with min, max, 1st quartile, media...
1
Solved
I have timeseries data plotted and separated by timepoints that I'd like to label with subscripts. Below is the code I'm using to generate the figure and timepoint labels. I'd like for the -1, 3 an...
2
Solved
I'm trying to create a bar plot with the depicted values written inside the bars using ggplot2. I still want to label the group with value "0" but in a different colour (black) and just above the x...
3
Solved
I have read many postings on this topic using expression(), paste(), and bquote(), or some combination. I think I am close to solving my problem, but I just can't get there. The following script ge...
Ulphiah asked 4/12, 2018 at 20:4
2
Solved
In the figure, is it possible to jitter the state abbreviation labels a bit so they don't overlap? If I use check_overlap = TRUE, then it removes some observations that overlap, and I don't want ...
2
Solved
Similarly to this question, I want to change the default "a" in the legend, but rather than removing it completely, I want to replace it with the labels themselves. That is, the first lin...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.