search for: geom_vlin

Displaying 20 results from an estimated 40 matches for "geom_vlin".

Did you mean: geom_vline
2011 Jun 11
0
problems with geom_vline, histograms, scale=free and facets in ggplot
...add to each facet mean.data=tapply(mtcars$wt,INDEX=list(mtcars$vs,mtcars$am),mean) mean.data=melt(mean.data) colnames(mean.data)=c("vs","am","wt.mean") # Now do the plot p <- qplot(wt, data=mtcars) p <- p + facet_grid(vs ~ am,scale="free") p <- p + geom_vline(aes(xintercept = wt.mean), mean.data,col="red") p ########################################################### ########################################################### # This one does not work # Create a test data set set.seed(100) my.data=data.frame(code1=rep(c("A","B&...
2008 Jan 17
2
Converting plots to ggplot2
...axis(1, at=seq(0,6,1), labels=round(seq(0,6,1)*180/pi),1) abline(v=c(45*pi/180, 225*pi/180)) I can get the basic plot: p <- qplot(a, ac, geom=c('point', 'line')) ; p but cannot seem to add the vertical reference lines: # representing NE and SW compass points p + geom_vline(intercept=45*pi/180) p + geom_vline(intercept=225*pi/180) nor find a reference to manipulating the axes labels (still searching the news archives though). Also, I would like to add additional curves to the same plot with the sequence 'asc' generated by: s <- seq(5, 45, 10)*pi/1...
2013 May 14
1
Tamaño plots y calidad en grafico ggplot
...es(x=factor(Jurisdiction), y=Mean, ymin=245, ymax=305)) h + scale_fill_manual(values = c("#A0551E", "#FA964B","#E1EBFF", "#B4CDFF", "#055014","#A0551E"))+ geom_hline(yintercept = seq(245, 305, 10), linetype=2, colour="#E1EBFF")+ geom_vline(xintercept = seq(1, 33, 2.5), linetype=1, colour="#E1EBFF")+ geom_vline(xintercept = -2, linetype=1, colour="white")+ geom_vline(xintercept = k, colour="#0000FF20", lwd=5)+ geom_rect(xmin=-2,xmax=-1, mapping=aes(NULL, NULL, ymin=inicio[3:4],ymax=fin[3:4], fill=Nivele...
2009 Aug 10
2
ggplot: colours to geom_segments
...quot;Food", "Expense"), row.names = c(NA, -4L), class = "data.frame") p <- ggplot(xx, aes(x = 0, xend = Expense, y = Food, yend = Food)) pa <- p + geom_point(aes(Expense, Food)) + geom_segment(colour="darkgreen") + xlab("Food") + geom_vline(xintercept=40, colour='red') pa
2008 Jul 03
1
ggplot2 legend for vertical lines
...r than add information in this case). > library(ggplot2) > dfr <- data.frame(values = sin(1:50/10), > fact = rep(c("short", "long"), each=25, length=50), > fact2 = rep(1:10, length=50)) > > p <- qplot(fact2, values, data=dfr, colour=fact) > p + geom_vline(intercept=c(5), colour = 1) + > scale_shape_manual(name="fact", values=1) # tried this, but useless > here Any tips on changing these settings would be welcome! Sincerely, baptiste _____________________________ Baptiste Augui? Physics Department University of Exeter Stocke...
2010 Nov 09
1
ggplot2: facet_grid with different vertical lines on each facet
...together using facet_grid in ggplot2. However, I want to then add a vertical line to each histogram, or facet, each of which vertical lines are at different x-values. The following example adds all vertical lines to each facet: ggplot(data,aes(values)) + geom_histogram() + facet_grid(.~variable) + geom_vline(xintercept=c(5,10,15)) How can I add a vertical line at different x positions on each facet? Thanks very much, Scott Chamberlain [[alternative HTML version deleted]]
2013 May 13
0
Tamaño plots y retoques de ticks en grafico ggplot
...abla, aes(x=factor(Orden), y=Mean, ymin=245, ymax=305)) h + scale_fill_manual(values = c("#A0551E", "#FA964B","#E1EBFF", "#B4CDFF", "#055014","#A0551E"))+ geom_hline(yintercept = seq(245, 305, 10), linetype=2, colour="#E1EBFF")+ geom_vline(xintercept = seq(1, 26, 2.5), linetype=1, colour="#E1EBFF")+ geom_vline(xintercept = -2, linetype=1, colour="white")+ geom_vline(xintercept = k, colour="#0000FF20", lwd=5)+ geom_rect(xmin=-2,xmax=-1, mapping=aes(NULL, NULL, ymin=inicio[3:4],ymax=fin[3:4], fill=Nivele...
2020 Apr 01
2
añadir líneas verticales con ggplot
Buenos días, hago un mapa con ggplot: world<-map_data('world') windows();ggplot(legend=FALSE) + ... geom_point(data=Data,aes(x=lon,y=lat,color=Clst),size=1.25) + scale_color_manual(values=c("grey45","navy","skyblue","gold","green3","darkgreen")) + geom_path( data=world, aes(x=long, y=lat,group=group)) + labs(title =
2008 Mar 04
1
ggplot2 - Problem with grid plot
...cut in a single, ungridded plot. p <- ggplot(data=diamonds, aes(x=price)) + geom_density(aes(color=cut)) p I can add vertical lines at the medians of each density as follows. medians <- data.frame(cut=levels(diamonds$cut), intercept=tapply(diamonds$price, list(diamonds$cut), median)) p + geom_vline(data=medians, aes(color=factor(cut))) I can create a gridded plot of price density by factors cut and color (where color is the grid reference) as follows. p + facet_grid(color~.) However I've had no luck trying to now add vertical grid lines on each density plot within each grid. Can an...
2008 Apr 04
0
ggplot2 - version 0.6
...ation * the legend code is now considerably more sophisticated and will attempt to merge together legends for the same variable * also, legends are drawn based on the geoms used (instead of the scales used, as previously) so should match the plot much better (e.g. for geom_smooth, geom_boxplot, geom_vline, geom_abline, geom_pointrange). These features are new, so there are likely to be a few bugs that I haven't discovered. Please me know if you do find any. Other additions and corrections * coord_equal: should now work correctly in all situations * coord_polar: add start and direction p...
2008 Apr 04
0
ggplot2 - version 0.6
...ation * the legend code is now considerably more sophisticated and will attempt to merge together legends for the same variable * also, legends are drawn based on the geoms used (instead of the scales used, as previously) so should match the plot much better (e.g. for geom_smooth, geom_boxplot, geom_vline, geom_abline, geom_pointrange). These features are new, so there are likely to be a few bugs that I haven't discovered. Please me know if you do find any. Other additions and corrections * coord_equal: should now work correctly in all situations * coord_polar: add start and direction p...
2020 Jun 05
3
líneas sobre un mapa
...testdata$prd<-prd Preds<-rbind(Preds,testdata) } El vie., 5 jun. 2020 a las 16:18, Emilio L. Cano (<emilopezcano en gmail.com>) escribió: > Hola Manuel, > Al ser ggplot supongo que será como en cualquier gráfico en ejes > coordenados, añade una capa: > > ggplot(?..) + geom_vline(xintercept = vector_de_valores_x) > > Un saludo, > > Emilio L. Cano > http://emilio.lcano.com > > > > > El 5 jun 2020, a las 13:48, Manuel Mendoza <mmendoza en fulbrightmail.org> > escribió: > > > > Buenos días ¿sabéis si hay alguna forma de añadi...
2009 May 27
1
ggplot2 adding vertical line at a certain date
library(ggplot2) melt.updn <- (structure(list(date = structure(c(11808, 11869, 11961, 11992, 12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996, 13057, 13149, 11808, 11869, 11961, 11992, 12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996, 13057, 13149), class = "Date"), variable = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2009 Jun 01
1
Minor tick marks for date/time ggplot2 (this is better, but not exactly what I want)
...marks to this graph is possible with no label for the months in between the years qplot(date, value, data=melt.updn, shape=site, ylab="Distance" ,main="Euclidean Distances Time Series", xlim=c(as.Date("2002-1-1"), as.Date("2006-3-1")))+geom_line()+theme_bw()+geom_vline(x=as.numeric(as.Date("2002-11-01"))) + opts(panel.grid.major = theme_line(colour="grey", size=0.75), panel.grid.minor=theme_line(colour="grey", size=0.25)) thanks -- Stephen Sefick Let's not spend our time and resources thinking about things that are so little...
2008 Dec 14
0
New version of ggplot2, 0.8.1
...n alphabetical order * facet_wrap: now works when a layer doesn't contain every level of the faceting variables * geom_abline should now work in a wider variety of situations * geom_smooth now gives correct asymmetric standard errors with generalised linear models (thanks to Thierry Onkelinx) * geom_vline and geom_hline now correctly transform their intercepts if the scale is transformed * geom_vline and geom_hline: now use xintercept and yintercept instead of intercept * legend.position and legend.justification work again * position_dodge now works for any number of elements with smaller widths, n...
2008 Dec 14
0
New version of ggplot2, 0.8.1
...n alphabetical order * facet_wrap: now works when a layer doesn't contain every level of the faceting variables * geom_abline should now work in a wider variety of situations * geom_smooth now gives correct asymmetric standard errors with generalised linear models (thanks to Thierry Onkelinx) * geom_vline and geom_hline now correctly transform their intercepts if the scale is transformed * geom_vline and geom_hline: now use xintercept and yintercept instead of intercept * legend.position and legend.justification work again * position_dodge now works for any number of elements with smaller widths, n...
2010 Jul 07
0
ggplot2 version 0.8.8
...by the coordinate system) to figure out how many pieces each segment should be broken in to (thanks to prompting from Jean-Olivier Irisson) * fix ordering bug in facet_wrap (thanks to bug report by Frank Davenport) * geom_errorh correctly responds to height parameter outside of aes * geom_hline and geom_vline will not impact legend when used for fixed intercepts * geom_hline/geom_vline: intercept values not set quite correctly which caused a problem in conjunction with transformed scales (reported by Seth Finnegan) * geom_line: can now stack lines again with position = "stack" (fixes #74) * g...
2010 Jul 07
0
ggplot2 version 0.8.8
...by the coordinate system) to figure out how many pieces each segment should be broken in to (thanks to prompting from Jean-Olivier Irisson) * fix ordering bug in facet_wrap (thanks to bug report by Frank Davenport) * geom_errorh correctly responds to height parameter outside of aes * geom_hline and geom_vline will not impact legend when used for fixed intercepts * geom_hline/geom_vline: intercept values not set quite correctly which caused a problem in conjunction with transformed scales (reported by Seth Finnegan) * geom_line: can now stack lines again with position = "stack" (fixes #74) * g...
2008 Aug 07
2
lattice: add vertical lines in xyplot
...nes[subscripts])} > ) this gives me an error, but I don't understand the help for the panel function. Alternatively, I tried in ggplot but here again, I get an error: > p <- ggplot(my.df, aes(x, y)) + > geom_path(aes(colour = fact)) + > facet_grid(fact2 ~ fact) + > geom_vline(intercept = my.lines) # how do I select the relevant > one ? > p Many thanks, baptiste _____________________________ Baptiste Augui? School of Physics University of Exeter Stocker Road, Exeter, Devon, EX4 4QL, UK Phone: +44 1392 264187 http://newton.ex.ac.uk/research/emag
2020 Jun 05
2
líneas sobre un mapa
Buenos días ¿sabéis si hay alguna forma de añadir una recta vertical sobre un mapa hecho previamente con ggplot? Lo que hago ahora es cargar nuevamente el mapa con la línea añadida (una serie de líneas añadidas secuencialmente en un loop) pero me gustaría que añadiese las líneas sin cargar nuevamente el mapa. Gracias, Manuel [[alternative HTML version deleted]]