कस्टम ggplot2 थीम्स

Tidyverse में डेटा के साथ संवाद

Timo Grossenbacher

Data Journalist

कस्टम लुक के फायदे

Tidyverse में डेटा के साथ संवाद

theme() फंक्शन

ggplot(plot_data) +
  geom_histogram(aes(
    x = working_hours)) +
  labs(x = "Working hours per week",
       y = "Number of countries") +
  theme(
    text = element_text(
      family = "Bookman",
      color = "gray25")
  )

Tidyverse में डेटा के साथ संवाद

डिफॉल्ट ggplot2 थीम्स

ggplot(plot_data) +
  geom_histogram(aes(
    x = working_hours)) +
  labs(x = "Working hours per week",
       y = "Number of countries") +

  theme_classic()

Tidyverse में डेटा के साथ संवाद

theme() कॉल्स को चेन करना

ggplot(plot_data) +
  geom_histogram(aes(
    x = working_hours)) +
  labs(x = "Working hours per week",
       y = "Number of countries") +

  theme_classic() +
  theme(
    text = element_text(
      family = "Bookman",
      color = "gray25")
  )

Tidyverse में डेटा के साथ संवाद

थीम कॉन्फ़िगरेशन विकल्प

?theme

axis.title
धुरों के लेबल (element_text; text से इनहेरिट)

axis.title.x
x धुरी का लेबल (element_text; axis.title से इनहेरिट)

axis.title.x.top
ऊपरी x धुरी का लेबल (element_text; axis.title.x से इनहेरिट)

axis.title.x.bottom
निचली x धुरी का लेबल (element_text; axis.title.x से इनहेरिट)

Tidyverse में डेटा के साथ संवाद

element_* फंक्शन परिवार

element_text()
element_rect()
element_line()
element_blank()
ggplot(plot_data) +
  geom_histogram(aes(
    x = working_hours)) +
  labs(x = "Working hours per week",
       y = "Number of countries") +
  theme(
    text = element_blank()
  )

Tidyverse में डेटा के साथ संवाद

थीम्स आज़माते हैं!

Tidyverse में डेटा के साथ संवाद

Preparing Video For Download...