Skip to content

Instantly share code, notes, and snippets.

@juanitobanca
Created March 3, 2017 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanitobanca/e71350c15b93ebed03cb3d76484024d4 to your computer and use it in GitHub Desktop.
Save juanitobanca/e71350c15b93ebed03cb3d76484024d4 to your computer and use it in GitHub Desktop.
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