{"id":10630,"date":"2019-11-20T00:27:18","date_gmt":"2019-11-19T22:27:18","guid":{"rendered":"https:\/\/www.datanovia.com\/en\/?p=10630"},"modified":"2019-11-20T00:27:18","modified_gmt":"2019-11-19T22:27:18","slug":"ggplot-galerie-de-themes","status":"publish","type":"post","link":"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/","title":{"rendered":"GGPlot Galerie de Th\u00e8mes"},"content":{"rendered":"<div id=\"rdoc\">\n<p>Dans ce tutoriel graphique R, nous pr\u00e9sentons une <strong>galerie<\/strong> de <strong>th\u00e8mes ggplot<\/strong>.<\/p>\n<p>Vous apprendrez \u00e0:<\/p>\n<ul>\n<li><strong>Changer le th\u00e8me ggplot par d\u00e9faut<\/strong> en utilisant la liste des th\u00e8mes standards disponibles dans le package R ggplot2. Notre s\u00e9lection des meilleurs th\u00e8mes ggplot pour les publications ou pr\u00e9sentations professionnelles, comprend : <em>theme_classic<\/em>(), <em>theme_minimal<\/em>() et <em>theme_bw<\/em>(). Un autre th\u00e8me c\u00e9l\u00e8bre est le <em>th\u00e8me sombre<\/em> : <em>theme_dark<\/em>().<\/li>\n<li><strong>Utilisez d\u2019autres exemples utiles de th\u00e8mes ggplot2<\/strong> disponibles dans le package R <strong>ggthemes<\/strong>. Ceux-ci incluent <em>theme_tufte<\/em>(), <em>theme_economist<\/em>() et <em>theme_hc<\/em>(). Vous verrez aussi comment cr\u00e9er un boxplot tufte minimaliste.<\/li>\n<li><strong>Modifier, en une seule fois, tous les \u00e9l\u00e9ments de texte du th\u00e8me<\/strong> en sp\u00e9cifiant l\u2019argument ggplot <code>base_size<\/code> dans les fonctions de th\u00e8me. Exemple: <code>p + theme_minimal(base_size = 18)<\/code>.<\/li>\n<li><strong>Changer le th\u00e8me pour toute la session<\/strong> en utilisant <em>theme_set<\/em>(). Par exemple, si vous tapez <code>theme_set(theme_classic(base_size = 16))<\/code> dans la console R, alors le th\u00e8me classique sera automatiquement appliqu\u00e9 \u00e0 chaque graphe que vous cr\u00e9ez. La fonction theme_set() remplace compl\u00e8tement le th\u00e8me actif actuel.<\/li>\n<li><strong>Cr\u00e9ez votre propre th\u00e8me personnalis\u00e9<\/strong>.<\/li>\n<\/ul>\n<p>Sommaire:<\/p>\n<div id=\"TOC\">\n<ul>\n<li><a href=\"#ggplot-basique\">GGPlot basique<\/a><\/li>\n<li><a href=\"#changer-de-theme\">Changer de th\u00e8me<\/a>\n<ul>\n<li><a href=\"#utiliser-les-themes-disponibles-dans-ggplot2\">Utiliser les th\u00e8mes disponibles dans ggplot2<\/a><\/li>\n<li><a href=\"#utiliser-les-ggthemes\">Utiliser les ggthemes<\/a><\/li>\n<li><a href=\"#theme_tufte\">theme_tufte<\/a><\/li>\n<li><a href=\"#theme_economist\">theme_economist<\/a><\/li>\n<li><a href=\"#theme_stata\">theme_stata<\/a><\/li>\n<li><a href=\"#theme_hc\">theme_hc<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#remplacer-le-theme-actuel-theme_set\">Remplacer le th\u00e8me actuel : theme_set<\/a><\/li>\n<li><a href=\"#modifier-base_size-et-base_family-dans-le-theme-ggplot\">Modifier base_size et base_family dans le th\u00e8me ggplot<\/a><\/li>\n<li><a href=\"#creer-un-theme-personnalise\">Cr\u00e9er un th\u00e8me personnalis\u00e9<\/a><\/li>\n<li><a href=\"#conclusion\">Conclusion<\/a><\/li>\n<\/ul>\n<\/div>\n<div class='dt-sc-hr-invisible-medium  '><\/div>\n<div class='dt-sc-ico-content type1'><div class='custom-icon' ><a href='https:\/\/www.datanovia.com\/en\/fr\/produit\/ggplot2-lessentiel-pour-une-visualisation-magnifique-des-donnees-dans-r\/' target='_blank'><span class='fa fa-book'><\/span><\/a><\/div><h4><a href='https:\/\/www.datanovia.com\/en\/fr\/produit\/ggplot2-lessentiel-pour-une-visualisation-magnifique-des-donnees-dans-r\/' target='_blank'> Livre Apparent\u00e9 <\/a><\/h4>GGPLOT2 - L\u2019Essentiel pour une Visualisation Magnifique des Donn\u00e9es dans R<\/div>\n<div class='dt-sc-hr-invisible-medium  '><\/div>\n<div id=\"ggplot-basique\" class=\"section level2\">\n<h2>GGPlot basique<\/h2>\n<p>Data: <code>ToothGrowth<\/code><\/p>\n<pre class=\"r\"><code># Convertir la colonne `dose` en variable factorielle\r\ndata(\"ToothGrowth\")\r\nToothGrowth$dose &lt;- as.factor(ToothGrowth$dose)\r\n\r\n# Cr\u00e9er un boxplot simple\r\nlibrary(ggplot2)\r\np &lt;- ggplot(ToothGrowth, aes(x = dose, y = len)) + \r\n  geom_boxplot()<\/code><\/pre>\n<\/div>\n<div id=\"changer-de-theme\" class=\"section level2\">\n<h2>Changer de th\u00e8me<\/h2>\n<div id=\"utiliser-les-themes-disponibles-dans-ggplot2\" class=\"section level3\">\n<h3>Utiliser les th\u00e8mes disponibles dans ggplot2<\/h3>\n<p>Plusieurs fonctions simples sont disponibles dans le package ggplot2 pour d\u00e9finir facilement un th\u00e8me ggplot. Il s\u2019agit notamment:<\/p>\n<ul>\n<li><code>theme_gray()<\/code>: Couleur de fond gris et lignes de grille blanches. Mettre en avant les donn\u00e9es pour faciliter les comparaisons.<\/li>\n<li><code>theme_bw()<\/code>: Fond blanc et lignes de grille grises. Peut fonctionner mieux pour les pr\u00e9sentations affich\u00e9es avec un projecteur.<\/li>\n<li><code>theme_linedraw()<\/code>: Un th\u00e8me aux traits noirs avec diff\u00e9rentes largeurs sur fond blanc, rappelant un dessin au trait.<\/li>\n<li><code>theme_light()<\/code>: Un th\u00e8me similaire \u00e0 <code>theme_linedraw()<\/code> mais avec des lignes et des axes gris clair, pour diriger plus d\u2019attention vers les donn\u00e9es.<\/li>\n<\/ul>\n<pre class=\"r\"><code>p + theme_gray(base_size = 14) \r\n\r\np + theme_bw()\r\n\r\np + theme_linedraw()\r\n\r\np + theme_light()<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-theme-gray-bw-linedraw-light-1.png\" width=\"153.6\" \/><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-theme-gray-bw-linedraw-light-2.png\" width=\"153.6\" \/><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-theme-gray-bw-linedraw-light-3.png\" width=\"153.6\" \/><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-theme-gray-bw-linedraw-light-4.png\" width=\"153.6\" \/><\/p>\n<ul>\n<li><code>theme_dark()<\/code>: Identique \u00e0 theme_light mais avec un fond sombre. Utile pour faire ressortir les lignes fines et color\u00e9es.<\/li>\n<li><code>theme_minimal()<\/code>: Un th\u00e8me minimal sans annotations d\u2019arri\u00e8re-plan<\/li>\n<li><code>theme_classic()<\/code>: Un th\u00e8me classique, avec des lignes sur les axes x et y et pas de lignes de grille.<\/li>\n<li><code>theme_void()<\/code>: un th\u00e8me compl\u00e8tement vide, utile pour les graphes avec des coordonn\u00e9es non standard ou pour les dessins.<\/li>\n<\/ul>\n<pre class=\"r\"><code>p + theme_dark() \r\n\r\np + theme_minimal()\r\n\r\np + theme_classic()\r\n\r\np + theme_void()<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-theme-minimal-dark-classic-void-1.png\" width=\"153.6\" \/><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-theme-minimal-dark-classic-void-2.png\" width=\"153.6\" \/><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-theme-minimal-dark-classic-void-3.png\" width=\"153.6\" \/><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-theme-minimal-dark-classic-void-4.png\" width=\"153.6\" \/><\/p>\n<\/div>\n<div id=\"utiliser-les-ggthemes\" class=\"section level3\">\n<h3>Utiliser les ggthemes<\/h3>\n<p>Le package R <code>ggthemes<\/code> fournit une autre galerie de th\u00e8mes ggplot personnalis\u00e9s, qui incluent:<\/p>\n<ul>\n<li><code>theme_tufte()<\/code>: un th\u00e8me minimaliste<\/li>\n<li><code>theme_economist()<\/code>: Th\u00e8me bas\u00e9 sur les graphiques de la revue \u00e9conomique<\/li>\n<li><code>theme_stata()<\/code>: th\u00e8me bas\u00e9 sur des sch\u00e9mas graphiques de stata.<\/li>\n<li><code>theme_hc()<\/code>: Th\u00e8me bas\u00e9 sur Highcharts JS<\/li>\n<\/ul>\n<p>Pour utiliser ces th\u00e8mes, installez et chargez d\u2019abord le package ggthemes comme suit :<\/p>\n<pre class=\"r\"><code>install.packages(\"ggthemes\") # Installer \r\n\r\nlibrary(ggthemes) # Charger<\/code><\/pre>\n<p>Ensuite, cr\u00e9ez deux ggplots de base : diagramme de dispersion et boxplot.<\/p>\n<pre class=\"r\"><code># Diagramme de dispersion\r\nsp &lt;- ggplot(mtcars, aes(wt, mpg)) +\r\n  geom_point() \r\nsp\r\n\r\n# Boxblot\r\nToothGrowth$dose &lt;- as.factor(ToothGrowth$dose)\r\nbxp &lt;- ggplot(ToothGrowth, aes(x = dose, y = len)) +\r\n  geom_boxplot(aes(fill = dose))\r\nbxp<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-ggplot-example-1.png\" width=\"288\" \/><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-ggplot-example-2.png\" width=\"288\" \/><\/p>\n<\/div>\n<div id=\"theme_tufte\" class=\"section level3\">\n<h3>theme_tufte<\/h3>\n<p>Fonctions R cl\u00e9s:<\/p>\n<ul>\n<li>theme_tufte() : met en place le theme tufte<\/li>\n<li>geom_tufteboxplot() : Cr\u00e9er un boxplot tufte<\/li>\n<li>geom_rangeframe() : \u00c9tendre les lignes des axes au maximum et au minimum des donn\u00e9es<\/li>\n<\/ul>\n<p>Cr\u00e9er un nuage de points avec le th\u00e8me tufte:<\/p>\n<pre class=\"r\"><code>library(ggthemes)\r\nsp + geom_rangeframe() +  theme_tufte()<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-theme_tufte-1.png\" width=\"288\" \/><\/p>\n<p>Cr\u00e9er un boxplot tufte. La fonction <code>geom_tufteboxplot()<\/code> cr\u00e9e plusieurs variantes des boxplots minimalist de Tufte. Le code R suivant, va cr\u00e9er deux types de boxplots.<\/p>\n<ol style=\"list-style-type: decimal;\">\n<li>Boxplot 1:\n<ul>\n<li>un point indique la m\u00e9diane,<\/li>\n<li>un gap (vide) indique l\u2019\u00e9cart interquartile,<\/li>\n<li>et tapisse les moustaches<\/li>\n<\/ul>\n<\/li>\n<li>Boxplot 2:\n<ul>\n<li>une ligne large indique l\u2019\u00e9cart interquartile,<\/li>\n<li>un gap (vide) indique la m\u00e9diane,<\/li>\n<li>et les lignes indiquent le minimum et le maximum<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<pre class=\"r\"><code>p &lt;- ggplot(ToothGrowth, aes(factor(dose), len)) +\r\n  theme_tufte(ticks = FALSE)\r\n\r\n# Box plot 1\r\np + geom_tufteboxplot()\r\n\r\n# Box plot 2\r\np + geom_tufteboxplot(median.type = \"line\", \r\n                      whisker.type = 'line',\r\n                      hoffset = 0, width = 3)<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-tufte-boxplot-1.png\" width=\"288\" \/><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-tufte-boxplot-2.png\" width=\"288\" \/><\/p>\n<\/div>\n<div id=\"theme_economist\" class=\"section level3\">\n<h3>theme_economist<\/h3>\n<p>Fonctions R cl\u00e9s:<\/p>\n<ul>\n<li>theme_economist()<\/li>\n<li>scale_fill_economist()<\/li>\n<li>scale_color_economist()<\/li>\n<\/ul>\n<p>Cr\u00e9er un boxplot avec le th\u00e8me <code>economist<\/code>:<\/p>\n<pre class=\"r\"><code>bxp + theme_economist() + scale_fill_economist()<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-theme-economist-1.png\" width=\"288\" \/><\/p>\n<\/div>\n<div id=\"theme_stata\" class=\"section level3\">\n<h3>theme_stata<\/h3>\n<p>Fonctions R cl\u00e9s:<\/p>\n<ul>\n<li>theme_stata()<\/li>\n<li>scale_fill_stata()<\/li>\n<li>scale_color_stata()<\/li>\n<\/ul>\n<pre class=\"r\"><code>bxp + theme_stata() + scale_fill_stata()<\/code><\/pre>\n<\/div>\n<div id=\"theme_hc\" class=\"section level3\">\n<h3>theme_hc<\/h3>\n<pre class=\"r\"><code>bxp + theme_hc()+ scale_colour_hc()<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-theme_hc-1.png\" width=\"288\" \/><\/p>\n<\/div>\n<\/div>\n<div id=\"remplacer-le-theme-actuel-theme_set\" class=\"section level2\">\n<h2>Remplacer le th\u00e8me actuel : theme_set<\/h2>\n<p>La fonction <code>theme_set()<\/code> peut \u00eatre utilis\u00e9e pour changer le th\u00e8me de la session enti\u00e8re. Il retourne l\u2019ancien th\u00e8me, pour que nous puissions le restaurer plus tard.<\/p>\n<pre class=\"r\"><code>p &lt;- ggplot(ToothGrowth, aes(x = dose, y = len)) + \r\n  geom_boxplot()\r\n# Utiliser theme_bw()\r\nold.theme &lt;- theme_set(theme_bw())\r\np\r\n\r\n# Restaurer l'ancien th\u00e8me\r\ntheme_set(old.theme)\r\np<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-set-theme-theme_set-1.png\" width=\"288\" \/><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-set-theme-theme_set-2.png\" width=\"288\" \/><\/p>\n<\/div>\n<div id=\"modifier-base_size-et-base_family-dans-le-theme-ggplot\" class=\"section level2\">\n<h2>Modifier base_size et base_family dans le th\u00e8me ggplot<\/h2>\n<p>Notez que les fonctions th\u00e9matiques peuvent prendre les deux arguments suivants :<\/p>\n<ul>\n<li>base_size : taille de la police de base (pour changer la taille de tous les \u00e9l\u00e9ments de texte du graphe)<\/li>\n<li>base_family : police de base<\/li>\n<\/ul>\n<p>Par exemple, la taille de tous les \u00e9l\u00e9ments de texte du graphique peut \u00eatre facilement modifi\u00e9e en m\u00eame temps, \u00e0 l\u2019aide de la commande:<\/p>\n<pre class=\"r\"><code>p + theme_gray(base_size = 18, base_family = \"Times\")<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-theme-font-size-1.png\" width=\"288\" \/><\/p>\n<\/div>\n<div id=\"creer-un-theme-personnalise\" class=\"section level2\">\n<h2>Cr\u00e9er un th\u00e8me personnalis\u00e9<\/h2>\n<p>La fonction <code>theme()<\/code> est utilis\u00e9e pour contr\u00f4ler l\u2019apparence d\u2019un graphique ggplot2, y compris<\/p>\n<ul>\n<li>\u00c9l\u00e9ments de ligne : lignes des axes, lignes des grilles mineures et principales, bordure du panneau graphique, graduations des axes couleur de fond, etc.<\/li>\n<li>El\u00e9ments de texte : titre du graphique, titres des axes, titre et texte de la l\u00e9gende, textes des graduations des axes, etc.<\/li>\n<li>El\u00e9ments rectangulaires : arri\u00e8re-plan du graphique, background du panneau graphique, fond de la l\u00e9gende, etc.<\/li>\n<\/ul>\n<p>Il existe une fonction sp\u00e9cifique pour modifier chacun de ces trois \u00e9l\u00e9ments :<\/p>\n<ul>\n<li><code>element_line(color, size, linetype)<\/code> pour modifier les \u00e9l\u00e9ments de ligne du th\u00e8me<\/li>\n<li><code>element_text(face, color, size, hjust, vjust, angle)<\/code> pour modifier les \u00e9l\u00e9ments de texte<\/li>\n<li><code>element_rect(fill, color, size, linetype)<\/code> pour modifier les \u00e9l\u00e9ments du rectangle<\/li>\n<\/ul>\n<div class=\"warning\">\n<p>Notez que, chacun des \u00e9l\u00e9ments du th\u00e8me peut \u00eatre supprim\u00e9 en utilisant la fonction element_blank().<\/p>\n<\/div>\n<p>La fa\u00e7on la plus simple de cr\u00e9er un th\u00e8me personnalis\u00e9 est, par exemple, d\u2019extraire et de modifier le code R de la fonction theme_gray() ou toute autre fonction de th\u00e8mes [theme_bw(), theme_classic(), etc].<\/p>\n<ul>\n<li>Construisez votre th\u00e8me \u00e0 partir de rien en commen\u00e7ant par le code source de la fonction <code>theme_gray()<\/code>:<\/li>\n<\/ul>\n<pre class=\"r\"><code>theme_gray\r\n\r\nfunction (base_size = 11, base_family = \"\") {\r\n  \r\n half_line &lt;- base_size\/2\r\n \r\ntheme(\r\n  ...\r\n  axis.text = element_text(size = rel(0.8), colour = \"grey30\"),\r\n  ...\r\n  )\r\n\r\n}<\/code><\/pre>\n<ul>\n<li>Cr\u00e9ez un nouveau th\u00e8me appel\u00e9 <code>theme_bluewhite()<\/code> by starting with the source code of the function <code>theme_bw()<\/code>. Nous ne remplacerons que quelques \u00e9l\u00e9ments de th\u00e8me.<\/li>\n<\/ul>\n<pre class=\"r\"><code># Cr\u00e9er un nouveau th\u00e8me\r\ntheme_bluewhite &lt;- function (base_size = 11, base_family = \"\") {\r\n    theme_bw() %+replace% \r\n    theme(\r\n      panel.grid.major  = element_line(color = \"white\"),\r\n      panel.background = element_rect(fill = \"lightblue\"),\r\n      panel.border = element_rect(color = \"lightblue\", fill = NA),\r\n      axis.line = element_line(color = \"lightblue\"),\r\n      axis.ticks = element_line(color = \"lightblue\"),\r\n      axis.text = element_text(color = \"steelblue\")\r\n      )\r\n}\r\n\r\n# Utiliser notre nouveau th\u00e8me\r\nggplot(ToothGrowth, aes(dose, len)) +\r\n  geom_boxplot() +\r\n  theme_bluewhite()<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/027-ggplot-themes-gallery-custom-ggplot2-theme-1.png\" width=\"288\" \/><\/p>\n<\/div>\n<div id=\"conclusion\" class=\"section level2\">\n<h2>Conclusion<\/h2>\n<p>Nous pr\u00e9sentons une liste de th\u00e8mes ggplot pour personnaliser facilement vos graphiques. Nous d\u00e9crivons \u00e9galement comment cr\u00e9er un th\u00e8me ggplot personnalis\u00e9.<\/p>\n<p>Les points principaux sont les suivants.<\/p>\n<ul>\n<li>Cr\u00e9er un exemple de ggplot:<\/li>\n<\/ul>\n<pre class=\"r\"><code>library(ggplot2)\r\np &lt;- ggplot(ToothGrowth, aes(x = dose, y = len)) + \r\n  geom_boxplot()<\/code><\/pre>\n<ul>\n<li>Modifiez le theme ggplot en utilisant l\u2019un des th\u00e8mes professionnels suivants:\n<ul>\n<li>theme_bw(), theme_minimal(), theme_classic() et theme_dark()[dans le package ggplot2]<\/li>\n<li>theme_tufte() et theme_economist() [dans ggthemes]<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre class=\"r\"><code>p + theme_minimal()<\/code><\/pre>\n<\/div>\n<\/div>\n<p><!--end rdoc--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dans ce tutoriel graphique R, nous pr\u00e9sentons une galerie de th\u00e8mes ggplot. Vous apprendrez \u00e0: Changer le th\u00e8me ggplot par d\u00e9faut en utilisant la liste des th\u00e8mes standards disponibles dans [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":10631,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rating_form_position":"","rating_results_position":"","mr_structured_data_type":"","footnotes":""},"categories":[279],"tags":[316],"class_list":["post-10630","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ggplot2-fr","tag-parametres-graphiques-ggplot2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Les Meilleurs Th\u00e8mes GGPLOT \u00e0 Connaitre Absolument - Datanovia<\/title>\n<meta name=\"description\" content=\"Nous pr\u00e9sentons une liste de th\u00e8mes ggplot pour personnaliser facilement vos graphiques. Vous apprendrez \u00e9galement comment cr\u00e9er un th\u00e8me ggplot personnalis\u00e9.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Les Meilleurs Th\u00e8mes GGPLOT \u00e0 Connaitre Absolument - Datanovia\" \/>\n<meta property=\"og:description\" content=\"Nous pr\u00e9sentons une liste de th\u00e8mes ggplot pour personnaliser facilement vos graphiques. Vous apprendrez \u00e9galement comment cr\u00e9er un th\u00e8me ggplot personnalis\u00e9.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/\" \/>\n<meta property=\"og:site_name\" content=\"Datanovia\" \/>\n<meta property=\"article:published_time\" content=\"2019-11-19T22:27:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/11\/IMG_7059.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Alboukadel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alboukadel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/\"},\"author\":{\"name\":\"Alboukadel\",\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/#\/schema\/person\/7767cf2bd5c91a1610c6eb53a0ff069e\"},\"headline\":\"GGPlot Galerie de Th\u00e8mes\",\"datePublished\":\"2019-11-19T22:27:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/\"},\"wordCount\":1115,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/11\/IMG_7059.jpg\",\"keywords\":[\"Param\u00e8tres Graphiques GGPLOT2\"],\"articleSection\":[\"ggplot2\"],\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/\",\"url\":\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/\",\"name\":\"Les Meilleurs Th\u00e8mes GGPLOT \u00e0 Connaitre Absolument - Datanovia\",\"isPartOf\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/11\/IMG_7059.jpg\",\"datePublished\":\"2019-11-19T22:27:18+00:00\",\"description\":\"Nous pr\u00e9sentons une liste de th\u00e8mes ggplot pour personnaliser facilement vos graphiques. Vous apprendrez \u00e9galement comment cr\u00e9er un th\u00e8me ggplot personnalis\u00e9.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#primaryimage\",\"url\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/11\/IMG_7059.jpg\",\"contentUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/11\/IMG_7059.jpg\",\"width\":1024,\"height\":512},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.datanovia.com\/en\/fr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GGPlot Galerie de Th\u00e8mes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/#website\",\"url\":\"https:\/\/www.datanovia.com\/en\/fr\/\",\"name\":\"Datanovia\",\"description\":\"Exploration de Donn\u00e9es et Statistiques pour l'Aide \u00e0 la D\u00e9cision\",\"publisher\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.datanovia.com\/en\/fr\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/#organization\",\"name\":\"Datanovia\",\"url\":\"https:\/\/www.datanovia.com\/en\/fr\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png\",\"contentUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png\",\"width\":98,\"height\":99,\"caption\":\"Datanovia\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/#\/schema\/person\/7767cf2bd5c91a1610c6eb53a0ff069e\",\"name\":\"Alboukadel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/www.datanovia.com\/en\/fr\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ed3108646c5c7c3d188324ab972f96ad7d9975b41b94014d7f68257791be395a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ed3108646c5c7c3d188324ab972f96ad7d9975b41b94014d7f68257791be395a?s=96&d=mm&r=g\",\"caption\":\"Alboukadel\"},\"url\":\"https:\/\/www.datanovia.com\/en\/fr\/blog\/author\/kassambara\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Les Meilleurs Th\u00e8mes GGPLOT \u00e0 Connaitre Absolument - Datanovia","description":"Nous pr\u00e9sentons une liste de th\u00e8mes ggplot pour personnaliser facilement vos graphiques. Vous apprendrez \u00e9galement comment cr\u00e9er un th\u00e8me ggplot personnalis\u00e9.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/","og_locale":"fr_FR","og_type":"article","og_title":"Les Meilleurs Th\u00e8mes GGPLOT \u00e0 Connaitre Absolument - Datanovia","og_description":"Nous pr\u00e9sentons une liste de th\u00e8mes ggplot pour personnaliser facilement vos graphiques. Vous apprendrez \u00e9galement comment cr\u00e9er un th\u00e8me ggplot personnalis\u00e9.","og_url":"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/","og_site_name":"Datanovia","article_published_time":"2019-11-19T22:27:18+00:00","og_image":[{"width":1024,"height":512,"url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/11\/IMG_7059.jpg","type":"image\/jpeg"}],"author":"Alboukadel","twitter_card":"summary_large_image","twitter_misc":{"\u00c9crit par":"Alboukadel","Dur\u00e9e de lecture estim\u00e9e":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#article","isPartOf":{"@id":"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/"},"author":{"name":"Alboukadel","@id":"https:\/\/www.datanovia.com\/en\/fr\/#\/schema\/person\/7767cf2bd5c91a1610c6eb53a0ff069e"},"headline":"GGPlot Galerie de Th\u00e8mes","datePublished":"2019-11-19T22:27:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/"},"wordCount":1115,"commentCount":0,"publisher":{"@id":"https:\/\/www.datanovia.com\/en\/fr\/#organization"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#primaryimage"},"thumbnailUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/11\/IMG_7059.jpg","keywords":["Param\u00e8tres Graphiques GGPLOT2"],"articleSection":["ggplot2"],"inLanguage":"fr-FR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/","url":"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/","name":"Les Meilleurs Th\u00e8mes GGPLOT \u00e0 Connaitre Absolument - Datanovia","isPartOf":{"@id":"https:\/\/www.datanovia.com\/en\/fr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#primaryimage"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#primaryimage"},"thumbnailUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/11\/IMG_7059.jpg","datePublished":"2019-11-19T22:27:18+00:00","description":"Nous pr\u00e9sentons une liste de th\u00e8mes ggplot pour personnaliser facilement vos graphiques. Vous apprendrez \u00e9galement comment cr\u00e9er un th\u00e8me ggplot personnalis\u00e9.","breadcrumb":{"@id":"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#primaryimage","url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/11\/IMG_7059.jpg","contentUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/11\/IMG_7059.jpg","width":1024,"height":512},{"@type":"BreadcrumbList","@id":"https:\/\/www.datanovia.com\/en\/fr\/blog\/ggplot-galerie-de-themes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.datanovia.com\/en\/fr\/"},{"@type":"ListItem","position":2,"name":"GGPlot Galerie de Th\u00e8mes"}]},{"@type":"WebSite","@id":"https:\/\/www.datanovia.com\/en\/fr\/#website","url":"https:\/\/www.datanovia.com\/en\/fr\/","name":"Datanovia","description":"Exploration de Donn\u00e9es et Statistiques pour l'Aide \u00e0 la D\u00e9cision","publisher":{"@id":"https:\/\/www.datanovia.com\/en\/fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.datanovia.com\/en\/fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/www.datanovia.com\/en\/fr\/#organization","name":"Datanovia","url":"https:\/\/www.datanovia.com\/en\/fr\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.datanovia.com\/en\/fr\/#\/schema\/logo\/image\/","url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png","contentUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png","width":98,"height":99,"caption":"Datanovia"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/fr\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.datanovia.com\/en\/fr\/#\/schema\/person\/7767cf2bd5c91a1610c6eb53a0ff069e","name":"Alboukadel","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.datanovia.com\/en\/fr\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ed3108646c5c7c3d188324ab972f96ad7d9975b41b94014d7f68257791be395a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed3108646c5c7c3d188324ab972f96ad7d9975b41b94014d7f68257791be395a?s=96&d=mm&r=g","caption":"Alboukadel"},"url":"https:\/\/www.datanovia.com\/en\/fr\/blog\/author\/kassambara\/"}]}},"multi-rating":{"mr_rating_results":[]},"_links":{"self":[{"href":"https:\/\/www.datanovia.com\/en\/fr\/wp-json\/wp\/v2\/posts\/10630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.datanovia.com\/en\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.datanovia.com\/en\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/fr\/wp-json\/wp\/v2\/comments?post=10630"}],"version-history":[{"count":1,"href":"https:\/\/www.datanovia.com\/en\/fr\/wp-json\/wp\/v2\/posts\/10630\/revisions"}],"predecessor-version":[{"id":10632,"href":"https:\/\/www.datanovia.com\/en\/fr\/wp-json\/wp\/v2\/posts\/10630\/revisions\/10632"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/fr\/wp-json\/wp\/v2\/media\/10631"}],"wp:attachment":[{"href":"https:\/\/www.datanovia.com\/en\/fr\/wp-json\/wp\/v2\/media?parent=10630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/fr\/wp-json\/wp\/v2\/categories?post=10630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/fr\/wp-json\/wp\/v2\/tags?post=10630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}