Commit 1e7371da authored by Bakaniko's avatar Bakaniko

refonte des images (taille images, polices)

parent 067259d9
......@@ -76,19 +76,25 @@ diag_bars <- function(df,variable,poids,repertoire, labels){
theme(plot.title = element_text(family = 'Helvetica',
color = '#666666',
face = 'bold',
size = 14),
legend.position="bottom") +
size = 12),
legend.position="right", # position de la légende
legend.text=element_text(size=5), # taille de police des éléments de légende
legend.title = element_text(size= 6), # taille de police du titre de légende
plot.subtitle = element_text(size = 9), # taille de police du sous-titre
axis.text=element_text(size=8), # taille de police des étiquettes des axes
axis.title = element_text(size= 10) # taille de police des titres des axes
) +
scale_fill_manual(values=alpha(rainbow(length(labels[[variable]][['etiquettes']])),.75),
name=labels[[variable]][['libelle']],
labels= labels[[variable]][['etiquettes']])+
labels= labels[[variable]][['etiquettes']]
)+
geom_text(stat = 'count'
, aes(label=..count..),
position = position_dodge(width = 0.9),
vjust = 0)
#figure
#figure
ggsave(filename = paste(repertoire,variable,".png", sep = ""), plot = figure, width = 400, height = 200, units = "m")
vjust = 0,
size = 2)
# sauvegarde dans un fichier, avec la taille de la figure
ggsave(filename = paste(repertoire,variable,".png", sep = ""), plot = figure, width = 180, height = 120, units = "mm")
}
diag_histo <- function(df,variable,poids,repertoire, labels){
......@@ -108,21 +114,21 @@ diag_histo <- function(df,variable,poids,repertoire, labels){
theme(plot.title = element_text(family = 'Helvetica',
color = '#666666',
face = 'bold',
size = 14),
legend.position="bottom") +
scale_fill_manual(values=alpha(rainbow(10),.75),
name=labels[[variable]][['libelle']],
labels= labels[[variable]][['etiquettes']])
#figure
#figure
ggsave(filename = paste(repertoire,variable,".png", sep = ""), plot = figure, width = 400, height = 200, units = "m")
size = 12),
legend.position="bottom",
plot.subtitle = element_text(size = 9)
)
ggsave(filename = paste(repertoire,variable,".png", sep = ""), plot = figure, width = 180, height = 100, units = "mm")
}
# Pré-remplissage de la variable avec les éléments récurrents
pre_remp_diag_bars <- partial(diag_bars, repertoire = "../images/distri_variables/", labels=libelles_vars)
# Pré-remplissage de la variable avec les éléments récurrents
pre_remp_diag_histo <- partial(diag_histo, repertoire = "../images/distri_variables/", labels=libelles_vars)
```
```{r}
......@@ -205,10 +211,6 @@ pre_remp_diag_bars(data,"TIPOHOG","FACTOR_VIV")
# variable_quantitatives
# Pré-remplissage de la variable avec les éléments récurrents
pre_remp_diag_histo <- partial(diag_histo, repertoire = "../images/distri_variables/", labels=libelles_vars)
## TOTCUART
pre_remp_diag_histo(data,"TOTCUART","FACTOR_VIV")
......@@ -218,7 +220,7 @@ pre_remp_diag_histo(data,"CUADORM","FACTOR_VIV")
## NUMPERS
pre_remp_diag_histo(data,"NUMPERS","FACTOR_VIV")
# Varaibles PERSONA
# Variables PERSONA
## PERTE_INDIGENA
pre_remp_diag_bars(data,"PERTE_INDIGENA","FACTOR_PERS")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment