Connect with us

Hi, what are you looking for?

Latest

8 Gplot themes to make your plots look great.

8 Gplot themes to make your plots look great.

ggplot2 is great. This makes it possible to easily create high-quality visualization schemes. However, people who have spent a lot of time with ggplot2 have a love-hate relationship with the standard ggplot2 theme, where the plot is on a grey background. By default ggplot2 is called theme_grey() or theme_gray(). Besides the standard theme, ggplot2 has 7 other themes that can improve your graphics. Here we look at the 8 topics that are easily accessible from ggplot. One of my favorite functions is theme_bw() or theme_classic(). Explore these 8 ggplot2 themes and find out which one is your favorite.

Let’s use these gap-fillers to trace the spread and save the ggplot object. We will use the ggplot object in our examples with ggplot themes.

1

2

3

4

5

6

7

Head (Hapometer)

p_obj <- Gap less %>%

Example_n(200) %>%

ggplot(aes(x=lifeExp, y=gdpPercap)) +

geom_point(alpha=0.5)+

enlarged_y_log10()

p_obj

1. topic_grey()

The standard theme of ggplot is grey. We can also specify a gray theme with the gray_theme() function and add it as a layer.

1

2

grey <- p_obj +theme_grey() +labs(subtitle = theme_grey())

gray

8 Gplot themes to make your plots look great.

example grey ggplot subject

2. issue_bw()

1

2

bw <- p_obj +theme_bw()+labs(subtitle = theme_bw()).

website

8 Gplot themes to make your plots look great.

ggplot topic_bw()

3. theme_classic()

1

2

classic <- p_obj + theme_classic() +labs(subtitle = theme_classic())

classic

8 Gplot themes to make your plots look great.

ggplot theme_classic()

4. theme_dark()

1

2

dark <- p_obj + theme_dark() +labs(subtitle = theme_dark())

obscure

8 Gplot themes to make your plots look great.

dark example

5. topic_light()

1

2

light <- p_obj + topic_light() + labs(subtitle = topic_light())

faded

8 Gplot themes to make your plots look great.

ggplot topic_light()

6. theme_linedraw()

1

2

lininedraw <- p_obj + theme_linedraw() +labs(subtitle = theme_linedraw())

Line drawing

8 Gplot themes to make your plots look great.

ggplot theme_linedraw()

7. subject_minimal()

1

2

Minimum <- p_obj + theme_minimal() +labs (subtitle = theme_minimal()).

Minimum location

8 Gplot themes to make your plots look great.

ggplot topic_minimal()

8. theme_void()

1

2

void <- p_obj + theme_void()+labs(subtitle = theme_void()).

unoccupied

8 Gplot themes to make your plots look great.

ggplot theme_void()

1

2

GridExtra

grid.organisation( grey, bw, light, dark, classic, linear, minimal, empty, ncol=2)

 

 

 ggplot color themes,ggplot2 empty theme,custom ggplot themes,ggthemr,r themes for plots,ggplot theme for presentation,ggthemes examples,ggplot legend

You May Also Like