Linked Questions
22 questions linked to/from Customize axis labels
54 votes
1 answer
229k views
Change or modify x axis tick labels in R using ggplot2 [duplicate]
How can I change the names of my x axis labels in ggplot2? See below: ggbox <- ggplot(buffer, aes(SampledLUL, SOC)) + geom_boxplot() ggbox <- ggbox + theme(axis.text.x=element_text(color = &...
11 votes
1 answer
84k views
How to change factor names on x axis with ggplot2 and R? [duplicate]
I am plotting the interaction between multiple variables with geom_boxplot, and the resulting factor names are very long. I want to rename these factor names on the plot without changing the factors ...
0 votes
0 answers
5k views
geom_bar rename x-axis label [duplicate]
I have searched for quite some while but could not find a conclusive answer, although this is quite a basic problem. I use geom_bar (ggplot2) to visualize my data. The names of the x-axis groups are ...
1 vote
0 answers
448 views
how to change x axis labels in ggplot [duplicate]
trying to change the x axis labels but when I run the part of the code that's #'d out, it gets rid of all the values on the axis, rather than replacing them with the labels I indicated. median_income ...
0 votes
0 answers
204 views
Add greek letters on the ggpplot axis, and add main Y axis elements [duplicate]
Hello everyone and happy new year !!! I would need help in order to improve a ggplot figure. I have a dfataframe (df1) that looks like so: x y z 1 a 1 -0.13031299 2 b 1 0.71407346 3 c ...
1 vote
1 answer
110 views
How to change labels in ggplot? [duplicate]
I have a graph: p <- ggplot(iris, aes(x=Species, y=Petal.Length)) + geom_boxplot(outlier.shape=NA) p How to change x labels as, for example, "set", "ver" and "virg"? I don't want to change ...
0 votes
0 answers
58 views
ggplot: x-axis labels different than the data used for aesthetic [duplicate]
We run several experiments in a month and I would like to plot them using ggplot. Each have a different experiment id and I can easily plot them using the experiment id. However, I would like to ...
6 votes
1 answer
16k views
Show a specific value of x-axis on ggplot
Im creating a ggplot with geom_vline at a specific location on the x axis. i would like the x axis to show that specific value Following is my data + code: dput(agg_data) structure(list(latency = ...
2 votes
1 answer
5k views
geom_text works for histogram in R?
Wondering if geom_text works for hist? Tried following code and it seems no effect. I just want to show label (the number of elements belonging to a specific histogram bucket), when plotting each bar ...
3 votes
1 answer
4k views
Dynamically parse discrete x-axis labels
Adapted from this answered question: Customize axis labels this this line in the MWE below can parse x-axis labels/values manually specified: scale_x_discrete(labels=parse(text=c("The~First~Value","A~...
1 vote
4 answers
2k views
How can I change the bar names in ggplot geom_bar and the legend title?
I have a data frame : id = c("A","B","C","D","E") C1 = c(T,F,T,F,T) DAT = tibble(id,C1);DAT ggplot(DAT,aes(C1,color="lightblue"))+ geom_bar(...
-1 votes
2 answers
2k views
ggplot2 - Display specific values on x-axis
I'm trying to display specific values on x-axis while plotting a line plot on with ggplot2. In my table, I have the num values which are quite distant from each other, that's why I want to plot them ...
1 vote
2 answers
2k views
How can I label the groups of bars on the x-axis?
How can I add labels to the groups of bars on the x- axis (which is the left side of the graph)? It is easy to label the entire axis, or to allow the labels to be generated based on the data, but I am ...
1 vote
2 answers
2k views
R programming - ggplot2 boxplot labeling by group issue
Currently I have a data frame where I want to plot three variables into one boxplot: livingsetting factor outcome 1 1 CKD 2 2 ...
2 votes
0 answers
2k views
How to change tick mark labels in ggplot2?
This is a relatively straightforward question, however, I was unable to find an answer. Likewise, I am not used to posting at Stackoverflow so I apologise for any kind of errors. I currently have a ...