Questions tagged [ggthemes]
17 questions
                    
                    4
                    
            votes
                
                2 answers
            
        ggplot2::geom_text font as the rest of graph
I got the following graphs using the code given below:
library(ggplot2)
library(ggthemes)
p <- ggplot(data = mtcars, mapping = aes(x = wt, y = mpg)) + 
     geom_point() +
     theme_igray()
p
p + geom_text(mapping = aes(label =…
        
        MYaseen208
        
- 22,666
 - 37
 - 165
 - 309
 
                    2
                    
            votes
                
                2 answers
            
        Changing colour of strip.text using facet_wrap of 2 variables
Please see picture below and focus on the strip text in blue (left upper side of each graph).
As I used facet_wrap on 2 variables, I would like that the bottom strip text is coloured black while the top strip text maintains its royalblue3 colour.
I…
        
        Andrei_we
        
- 45
 - 3
 
                    1
                    
            vote
                
                1 answer
            
        Setting midpoint for ggthemese continuous scales
In ggplot2, we can use the midpoint argument in scale_fill_gradient2() to set the midpoint of divergence, however this does not exist when I try to use color themes from ggthemes such as scale_fill_gradient2_tableau()
# A tibble: 6 x 2
  Year    …
        
        zhao
        
- 91
 - 6
 
                    1
                    
            vote
                
                1 answer
            
        R: Change number of ticks in ggplot2 with ggthemes::extended_range_breaks()
assume the following MWE:
library(ggplot2)
library(ggthemes)
set.seed(100)
df <- data.frame(x = rnorm(50), y = rnorm(50))
ggplot(df, aes(x,y)) +
  geom_point() +
  theme_tufte() +
  geom_rangeframe() +
  scale_x_continuous(breaks =…
        
        Felix Phl
        
- 383
 - 1
 - 13
 
                    1
                    
            vote
                
                1 answer
            
        How can I make y-axis lines that match the x-axis lines from theme_clean()?
I'm going to be producing a lot of visuals for a report. My boss really likes the theme_clean() horizontal lines but wants me to add the same lines to the x-axis. Is there an easy way to do this? 
Here is my code…
        
        RL_Pug
        
- 697
 - 7
 - 30
 
                    1
                    
            vote
                
                1 answer
            
        ggthemes::geom_tufteboxplot - prevent whiskers from extending to extremes
Does someone know how to prevent the "whiskers" in ggthemes::geom_tufteboxplot to be drawn up to the extreme values? 
I tried changing the outlier and whisker arguments to no avail. 
library(ggplot2)
library(ggthemes)
ggplot(iris, aes(Species,…
        
        tjebo
        
- 21,977
 - 7
 - 58
 - 94
 
                    1
                    
            vote
                
                2 answers
            
        chose colors for scale_colour_colorblind() in ggthemes
I would like to chose specific colors of the colorblind_pal() from ggthemes
This works:
library(ggplot2)
library(ggthemes)
p <- ggplot(mtcars) + geom_point(aes(x = wt, y = mpg,
                                     colour = factor(gear))) +…
        
        captcoma
        
- 1,768
 - 13
 - 29
 
                    0
                    
            votes
                
                1 answer
            
        Using theme() from ggplot2 with the factoextra package to change aesthics of biplot made
I made a successful biplot using the factoextra package (fviz_pca_biplot()), but I want to change the size of the axis labels and titles as well as changing the color of the axis lines using ggtheme theme(). I used this code and nothing changes…
        
        Kayla
        
- 3
 - 1
 
                    0
                    
            votes
                
                2 answers
            
        Adding visual embellishment in a custom ggplot theme
I'm currently prototyping custom ggplot themes for use within my organisation. Currently, the theme looks like this (using mtcars data):
I would like to add a solid-colored bar (in the org's primary color) underlining the chart title region to act…
        
        Chris
        
- 25
 - 6
 
                    0
                    
            votes
                
                1 answer
            
        Showing colour legend in a theme containing "legend.title = element_blank()"
I'm using the ggthemes "theme_exel_new" theme for a plot, which hides the title of the colour legend through the code legend.title = element_blank() in the function. I've attempted to get the title back by adding theme_excel_new(legend.title =…
        
        Eric Nilsen
        
- 91
 - 1
 - 9
 
                    0
                    
            votes
                
                1 answer
            
        GGPlot2 Preset - Creating a function with certain ggplot2 aesthetics options
I'm creating quite a few plots at the moment. Since they're all geared towards the same presentation, they have a lot in common in terms of the options I chose to give them their appearance.
df1 <- data.frame(name =…
        
        James
        
- 463
 - 4
 - 13
 
                    0
                    
            votes
                
                2 answers
            
        remove space on sides of ggplot, even when margin is 0
I'm having a ggplot spacing problem.. probably just not knowing the exact theme element I'm looking for. when I make a ggplot and remove all axis markings, then make all margins 0, there is still a little bit of space between the panel and the…
        
        Jake L
        
- 987
 - 9
 - 21
 
                    0
                    
            votes
                
                1 answer
            
        How to remove black border around plots/graphics in ggplot2? R
I'm creating some plots but every one I make has a black square border? How can I make this border white or remove it completelty? 
Here is my code
library(ggplot2)
library(ggthemes)
ggplot(mtcars, aes(x = mpg)) + 
  geom_point(aes(y = hp)) + 
 …
        
        RL_Pug
        
- 697
 - 7
 - 30
 
                    0
                    
            votes
                
                1 answer
            
        Running timeseries graphing function in Rmd producing cluttered x-axis labels (not present in test code)
I have a folder of xx .csv timeseries that I want to graph and knit into a clean HTML document. I have a ggplot code that produces the plot that I want using a single timeseries.csv. However, when I try to put the bones of that ggplot code in a…
        
        Skiea
        
- 117
 - 7
 
                    0
                    
            votes
                
                1 answer
            
        Why is there no right border when printing a ggplot with a ggtheme into word?
I am creating plots in R markdown to be printed to MS word. When I create a plot using the base R plot() function, there are no borders around the printed plot. Same if I use a basic ggplot. However, if I add a theme using ggthemes, it adds borders…
        
        Umbraxon
        
- 23
 - 3