How to edit the labels and limit if a plot using ggplot? - R

0 votes
How to edit the labels and limit if a plot using ggplot? I want to edit the marks and axis titles in the plot (ggplot). is it possible and how to do it?
Jul 15 in Data Analytics by piyush
26 views

1 answer to this question.

0 votes
Add a limit to axis ticks using xlim, ylim or scale_x/y_continuous/discrete function.

Let plot be a bar chart using ggplot.

Add limit uisng any of the following syntax.

> plot + xlim(5, 20) + ylim(0, 50)

> plot + scale_x_continuous(limits = c(5, 20)) + scale_y_continuous(limits = c(0, 50))
answered Nov 3 by anonymous
• 32,260 points

Related Questions In Data Analytics

0 votes
1 answer

How to create a box-plot using “plotly” in R?

You can use this command to create ...READ MORE

answered Jul 4, 2018 in Data Analytics by CodingByHeart77
• 3,690 points
1,351 views
0 votes
1 answer
+1 vote
1 answer

How to convert a list of dataframes in to a single dataframe using R?

You can use the plyr function: data <- ...READ MORE

answered Apr 13, 2018 in Data Analytics by darklord
• 6,190 points
222 views
0 votes
1 answer

Save a plot as image on the disk using R

Consider for both the situations: 1. Image will ...READ MORE

answered Apr 13, 2018 in Data Analytics by darklord
• 6,190 points
171 views
0 votes
1 answer

How to provide color to ggplot scatter chart depending on field value?

cyl is a continuous value field, so ...READ MORE

answered Nov 2 in Data Analytics by anonymous
• 32,260 points
25 views
0 votes
1 answer

which to use fill or color to show colors in R plots?

The color attribute is only used for ...READ MORE

answered Nov 4 in Data Analytics by komal
26 views
0 votes
1 answer

plot a line chart along with point labels in the plot

Follow the below steps: 1. Create a ggplot ...READ MORE

answered Nov 2 in Data Analytics by anonymous
• 32,260 points
29 views
0 votes
1 answer

Add custom lines/sentences within ggplot

Use geom_text along with position and text ...READ MORE

answered Nov 2 in Data Analytics by Cherukuri
• 32,260 points
23 views
0 votes
2 answers
0 votes
1 answer

How to rename a file using R?

I just found there are 2 functions file.rename() ...READ MORE

answered Oct 28 in Data Analytics by Cherukuri
• 32,260 points
33 views