Skip to content

Instantly share code, notes, and snippets.

@andresAlvarado
Last active April 3, 2016 18:40
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 andresAlvarado/202162e81e5ff61c9f5b to your computer and use it in GitHub Desktop.
Save andresAlvarado/202162e81e5ff61c9f5b to your computer and use it in GitHub Desktop.
# Cargar librerias
library( package = 'ggplot2' )
# Leer dataset
d_historico <- read.table( file = 'datafile'
, header = T
, sep = ','
, colClasses = c('character','character','numeric')
)
# Crear grafica con ggplot
g_historico <- ( ggplot( data = d_historico
, aes( x = dia
, y = peticiones
, group = semana
, col = semana
)
)
+ geom_line()
+ geom_point()
+ theme_bw()
+ theme( legend.title = element_blank()
, axis.ticks = element_blank()
, legend.position = 'none'
)
+ labs( x = 'Dia'
, y = 'Peticiones'
)
)
# Mostrar grafica
plot( x = g_historico )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment