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

0 votes

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

I tried below code but i want different colors and not in the same blue scale. What to do?

ggplot(mpg, aes(cty,hwy,col= km$cluster)) + geom_point()
Jul 16 in Data Analytics by anonymous
12 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Data Analytics

0 votes
0 answers

How to add labels on bars in bar chart in ggplot?

How to add labels on bars in ...READ MORE

2 days ago in Data Analytics by yashwanth
6 views
0 votes
1 answer

How to replace a value in a data frame based on a conditional 'If' statement?

It's easier to convert alpha to characters ...READ MORE

answered Jun 6, 2018 in Data Analytics by darklord
• 6,140 points
40 views
0 votes
1 answer
0 votes
1 answer

How to create dummy variables based on a categorical variable of lists in R?

You can use mtabulate in the following way: library(qdapTools) cbind(data[1], ...READ MORE

answered Apr 13, 2018 in Data Analytics by CodingByHeart77
• 3,680 points
450 views
0 votes
1 answer

How to change font size of text and axes on R plots ?

To change the font size of text, ...READ MORE

answered Apr 20, 2018 in Data Analytics by zombie
• 3,690 points
42 views
0 votes
1 answer
0 votes
0 answers

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

How to edit the labels and limit ...READ MORE

Jul 15 in Data Analytics by piyush
9 views
0 votes
0 answers

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

which to use fill or color to ...READ MORE

Jul 22 in Data Analytics by deepa
12 views
0 votes
0 answers

plot a line chart along with point labels in the plot

Can someone help me to plot a ...READ MORE

Jul 22 in Data Analytics by lokesh
10 views
0 votes
0 answers

Add custom lines/sentences within ggplot

Hi, i have added multiple ggplots in ...READ MORE

Jul 22 in Data Analytics by roopa
10 views