Questions tagged [geom-point]
215 questions
                    
                    4
                    
            votes
                
                2 answers
            
        How to change the inside color (fill) of a subset of points with the same shape based on a second variable in ggplot2?
I had a hard time to find how to change inside color of geom_point in combined regression plot but I couldn't do it using scale_color_manual()
For site F and F1 I want to have same shape and same outside color but the inside of "F" blanck and inside…
         
    
    
        fahimeh rashidabadi
        
- 43
- 5
                    4
                    
            votes
                
                3 answers
            
        How to insure proper alignment for two layer geom_point?
I am struggling to plot circles in a ggplot exactly on top of each other.
Here is the plot code:
xx = ggplot(dfm2, aes(x = variable, y = tax)) + 
      geom_point(aes(size = sqrt(value),color = phyla), shape = 21) + 
     …
         
    
    
        Mathilde
        
- 191
- 1
- 11
                    3
                    
            votes
                
                1 answer
            
        Can ggplot space out overlapping points without introducing random noise?
I have data that is categorical on the x axis and continuous on the y axis.
I'm trying to produce a plot similar to this one:
I cannot figure out how to get the points to avoid overlapping - neither jitter not dodge seem to be quite what I'm…
         
    
    
        Jo-Maree Courtney
        
- 53
- 3
                    3
                    
            votes
                
                2 answers
            
        ggplot2 set geom_point shape with scale_size_binned
I have the following code and would like to know if it is possible to use different shapes in the scale_size_binned command. In my actual data, it is a bit difficult to distinguish between the points so I would like to use different shapes for them.…
         
    
    
        Abby 
        
- 59
- 6
                    3
                    
            votes
                
                2 answers
            
        Adding filtered row names as labels in geom_point using geom_text (error on length of the dataset)
I have a dataset and I want to add specific labels (row names in this case) to my ggplot graph. However, when I use filter, an error regarding length of the data frame shows on the console.
I would appreciate if anyone could help me to resolve the…
         
    
    
        rez
        
- 290
- 2
- 12
                    3
                    
            votes
                
                2 answers
            
        How can I dodge / combine both geom_point and geom_boxplot with two factors
I'm looking to add point data so that is sits adjacent to a box in a boxplot. When I run the below example, the point data does not separate for each fill factor. Is there a way to add point data that corresponds to the box when plotting 2 factors…
         
    
    
        Kelly James
        
- 83
- 3
                    3
                    
            votes
                
                1 answer
            
        How can I show legend of multiple layers (geom_point and geom_bar)?
I have two data sets that I want to combine into one plot, one as a barplot (2 groups) and one as a point-line plot (1 group). I've managed to combine the plots and show the legend for the barplot, but whenever I try to show the legend for the…
         
    
    
        Keni
        
- 63
- 5
                    3
                    
            votes
                
                1 answer
            
        Error when combining unicode shape with legal ggplot2 shapes
I have a problem with combining unicode shapes with legal ggplot2 shapes in geom_point. I have a variable including three event types and I want to plot a dagger for the level Death. Unfortunately, when I define level death as dagger in unicode and…
         
    
    
        fbeese
        
- 118
- 8
                    3
                    
            votes
                
                2 answers
            
        Make geom_point points color slightly lighter with alpha?
I want my lines and points to be slightly lighter for the last 7 data points. I tried to use alpha, but no matter how small the increment I use, the points are way too light.  Can I use alpha (and if yes, how), or do I have to mess with the colors…
         
    
    
        dfrankow
        
- 20,191
- 41
- 152
- 214
                    2
                    
            votes
                
                1 answer
            
        Geom_point : when using color and alpha : how to delete the alpha legend in ggplot?
I have this df that is visualized as followed:
df = data.frame(x = -10:11,
                y = seq(-5,5.5,by=0.5),
                z = rep(c(1,2),11) )
df
ggplot(df)+aes(x=x,y=y,color=factor(z),alpha=z)+
  geom_point()+
 …
         
    
    
        Anas116
        
- 797
- 2
- 9
                    2
                    
            votes
                
                1 answer
            
        Is there a way to change the 'divisions' of size in a ggplot scatterplot?
Basically I am using a variable on my dataset to alter the size of the data points of my plot. When I use this variable R automatically uses 3 division: 100,000 200,000 300,000. Nevertheless the majority of my data has a variable less than 100,000…
         
    
    
        Rafael Jimenez
        
- 35
- 1
- 6
                    2
                    
            votes
                
                1 answer
            
        Adding a shaded triangle to a ggplot2 plot
I am actually trying to build a graph showing the fiscal space of a country, so that it looks like  But for now it looks like
I don't know how to add the transparent triangle like in the model. I tried with several functions but I didn't manage to…
         
    
    
        Romain_Dsgz
        
- 23
- 2
                    2
                    
            votes
                
                1 answer
            
        ggplot2: Combing 2 point graphs together
I want to create a plot that has point data (with error bars) from one data frame, and point data (coloured by gradient) from another. I can't seem to combine these plots and wondered if anyone had any suggestions. Plots are as…
         
    
    
        Kelly James
        
- 83
- 3
                    2
                    
            votes
                
                2 answers
            
        Change colour of geom_point for maximum y value
I have a data frame that looks like this:
Salary        Year
15             1990
16             1991
15             1992
20             1993
17             1994
19             1995
Which I plot using the ggplot.
Dataframe %>%
   ggplot(aes(Year,…
         
    
    
        Sara Dwindler
        
- 75
- 6
                    2
                    
            votes
                
                1 answer
            
        How to have 2 color schemes in ggplot geom_point
I would like to plot 2 different columns and color each one base on groups in another column. I would also like that the color will be different for each series.
I looked here but I cant get it to work.
What am I doing:
tbl <- data.frame(x = seq(1,…
         
    
    
        user19622737
        
- 23
- 4