Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
f_generarGrafica <- function( p_mltd )
{
( ggplot()
+ geom_histogram( data = p_mltd$mltd_data
, aes( x = Value
, fill = Atributo
)
, bins = 40
, color = "black"
, alpha = 0.5
)
+ geom_vline( data = p_mltd$mltd_summ
, aes( xintercept = Value
, color = Metrica
, linetype = Metrica
)
, size = 1
)
+ facet_wrap( facets = ~Atributo
, scales = "fixed"
)
+ labs( x = "Value"
, y = "Frequency"
)
+ scale_color_manual( values = c("goldenrod","deeppink3","dodgerblue") )
+ scale_fill_brewer( palette = "Greens", guide = F )
+ theme_bw()
+ theme( panel.grid = element_blank()
, strip.background = element_rect( fill = "dodgerblue4" )
, strip.text = element_text( color = 'white' )
, axis.text = element_text( size = 10.5 )
, plot.title = element_text( size = 11 )
, legend.title = element_text( size = 11 )
)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment