How can I add x and y axis labels in ggplot2 ?

0 votes
May 16, 2018 in Data Analytics by shams
• 3,580 points
53 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
# Load a dataset(to work with)
# We’ll also quickly plot the data to display the data visually, prior to formatting.

df.ch<- read.csv(url("something.txt"))
ggplot(data=df.ch, aes(x=year,y=co2_emission_per_cap_qt)) + geom_line()

# By default, ggplot() uses variable names as the axis titles.
answered May 16, 2018 by zombie
• 3,690 points

Related Questions In Data Analytics

0 votes
1 answer

How can I pause, sleep, wait, execution for X seconds in R?

You can try the following piece of ...READ MORE

answered May 25, 2018 in Data Analytics by zombie
• 3,690 points
54 views
0 votes
2 answers
0 votes
1 answer

How can I increase the number of axis ticks in R ?

You can try to override ggplots default ...READ MORE

answered May 30, 2018 in Data Analytics by zombie
• 3,690 points
111 views
0 votes
1 answer
0 votes
1 answer

How to change y axis max in time series using R?

The axis limits are being set using ...READ MORE

answered Apr 3, 2018 in Data Analytics by darklord
• 6,140 points
42 views
0 votes
1 answer

How can I drop columns by name in a data frame ?

We can Drop Columns by name in ...READ MORE

answered Apr 13, 2018 in Data Analytics by zombie
• 3,690 points
18 views
0 votes
1 answer

Which function can I use to clear the console in R and RStudio ?

Description                   Windows & Linux           Mac Clear console                      Ctrl+L ...READ MORE

answered Apr 17, 2018 in Data Analytics by anonymous
661 views
0 votes
1 answer

How can we trim leading and trailing whitespaces in R?

trimws {base} //Remove Leading/Trailing Whitespace Removes leading and/or ...READ MORE

answered Apr 18, 2018 in Data Analytics by zombie
• 3,690 points
248 views
0 votes
1 answer

How can I rotate axis labels in R ?

library(ggplot2) p <- data.frame(Day=c("2011-04-11", "2014-05-24","2004-01-12","2014-06-20","2010-08-07","2014-05-28"), Impressions=c(24010,15959,16107,21792,24933,21634),Clicks=c(211,106,248,196,160,241)) p       ...READ MORE

answered May 18, 2018 in Data Analytics by zombie
• 3,690 points
90 views
0 votes
1 answer

How can I change font size and direction of axes text in ggplot2 ?

You can try theme(): Library(ggplot2) a <- data.frame(x=gl(10, 1, ...READ MORE

answered May 30, 2018 in Data Analytics by zombie
• 3,690 points
91 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.