Linked Questions

54 votes
1 answer
229k views

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 = &...
derelict's user avatar
  • 3,976
11 votes
1 answer
84k views

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 ...
James Wade's user avatar
0 votes
0 answers
5k views

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 ...
Arne's user avatar
  • 367
1 vote
0 answers
448 views

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 ...
Josephine Ankrah's user avatar
0 votes
0 answers
204 views

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 ...
Grendel's user avatar
  • 783
1 vote
1 answer
110 views

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 ...
neringab's user avatar
  • 655
0 votes
0 answers
58 views

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 ...
shashwat vajpeyi's user avatar
6 votes
1 answer
16k views

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 = ...
Yehoshaphat Schellekens's user avatar
2 votes
1 answer
5k views

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 ...
Lin Ma's user avatar
  • 10.2k
3 votes
1 answer
4k views

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~...
EngBIRD's user avatar
  • 2,055
1 vote
4 answers
2k views

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(...
Homer Jay Simpson's user avatar
-1 votes
2 answers
2k views

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 ...
mightaskalot's user avatar
1 vote
2 answers
2k views

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 ...
Meg's user avatar
  • 39
1 vote
2 answers
2k views

Currently I have a data frame where I want to plot three variables into one boxplot: livingsetting factor outcome 1 1 CKD 2 2 ...
Luiance's user avatar
  • 11
2 votes
0 answers
2k views

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 ...
Redskies421's user avatar

15 30 50 per page