search for: geom_segments

Displaying 20 results from an estimated 47 matches for "geom_segments".

Did you mean: geom_segment
2009 Aug 10
2
ggplot: colours to geom_segments
Just as an exercise I am tying to add colours to a geom_segment command. I can get one colour but not a sequence of colours. Can anyone suggest how I can get the green lines in the plot below to be different colours? I thought I could use a palatte of colours but that did not seem to work. Thanks ========================================================================= library(ggplot2) xx
2009 Jul 23
1
ggplot2 : commands on one line vs two lines.
I have just started using ggplot2 and I seem to be doing something stupid in writing ggplot2 commands on more than one line. In the example below the commands on one line are working fine, but as soon as I put them on two lines I get an error. Can any one point out what I am doing wrong? It must be something blindingly simple. Thanks Example
2013 Mar 15
0
ggplot2, arrows and polar coordinates
Dear R users, The following issue has been already documented, but, if I am not mistaken, not yet solved. This issue appears while trying to plot arrows with "geom_segment" (package ggplot2), with polar coordinates ("coord_polar"). The direction of some arrows is wrong (red rectangle). Please find herewith an example. Does someone know how to deal with that issue? Best
2012 Dec 12
1
ggplot: geom_line with only pairs of points connected
Dear list, I've been using plotmeans {gplots} a lot before, and found the "connect" argument to be quite useful. I've moved to ggplot for several reasons, but would still like to connect lines conditionally, somehow. Is it possible to do? Small example: df <- data.frame(cat=LETTERS[1:4],num=rnorm(4)) ggplot(df, aes(x=cat, y=num)) + geom_point() +
2009 Nov 17
2
Lattice plot
Hi, I was trying to get a graph in lattice with the following data frame (7 rows, 5 cols): chr start1 end1 meth positive 1 1 10 20 1.5 y 2 2 12 18 -0.7 n 3 3 22 34 2.0 y 4 1 35 70 3.0 y 5 1 120 140 -1.3 n 6 1 180 190 0.2 y 7 2 220 300 0.4 y I wanted the panels to be organized by 'chr' -
2017 Dec 04
1
ggtern and bquote...
D'oh! Thanks for pointing this out. I blame caffeine depletion at the time... -pd > On 4 Dec 2017, at 15:48 , Eik Vettorazzi <E.Vettorazzi at uke.de> wrote: > > reading ?plotmath you might notice that "_" isn't the propper syntax for > subscripts. This will work: > > ggtern(data=x11,aes(A,B,C,xend = c(0.7,.00,0.7),yend = > c(.30,.50,.0),zend
2017 Dec 04
1
YNT: ggtern and bquote...
Hi, My example code is this; x11<-data.frame(A=c(.6,.6,.6),B=c(.20,.20,.20),C=c(0.20,.20,.20)) ggtern(data=x11,aes(A,B,C,xend = c(0.7,.00,0.7),yend = c(.30,.50,.0),zend =c(.0,.50,0.3)))+ geom_point()+ theme_showarrows()+geom_segment(size=.5)+ geom_text_viewport(x=c(.45,.27,.37),y=c(.32,.29,.22),label=as.expression("P_a","P_b","P_c"))
2017 Dec 04
0
YNT: ggtern and bquote...
reading ?plotmath you might notice that "_" isn't the propper syntax for subscripts. This will work: ggtern(data=x11,aes(A,B,C,xend = c(0.7,.00,0.7),yend = c(.30,.50,.0),zend =c(.0,.50,0.3)))+ geom_point()+ theme_showarrows()+geom_segment(size=.5)+ geom_text_viewport(x=c(.45,.27,.37),y=c(.32,.29,.22),label=c("P[a]","P[b]","P[c]"), parse=TRUE)
2007 Sep 27
3
Plotting from different data sources on the same plot (with ggplot2)
Hello everyone (and Hadley in particular), I often need to plot data from multiple datasets on the same graph. A common example is when mapping some values: I want to plot the underlying map and then add the points. I currently do it with base graphics, by recording the maximum region in which my map+point will fit, plotting both with these xlim and ylim parameters, adding par (new=T)
2011 Feb 23
1
ggplot2 directional line type?
I'm doing a path plot with ggplot2, the result is looking very nice, but I want to give some indication of which direction the lines are going. I thought of using colour gradients, but it doesn't look right. What would be ideal is a line type that indicated direction, something like ">>>>>>>". Is there any way to achieve this? Or can anyone suggest another
2016 Apr 18
0
Add a vertical arrow to a time series graph using ggplot and xts
Hi, I am trying to add a vertical arrow (from top to bottom or from bottom to up) to a time series plot using ggplot2 and xts. It seems that the vertical line command "geom_vline" does not work for this purpose (Correct me if I am wrong). I try the command "geom_segment" as follows, but I got an error message at the last line "Error: Invalid input: date_trans works
2024 Jan 11
4
arrow on contour line
Hello, I am drawing contour lines for a function of 2 variables at one level of the value of the function and want to include a small arrow in any direction of increase of the function. Is there some way to do that? Below is an example that creates the contour lines. How do I add one small arrow on each line in the direction of increase of the function (at some central point of the contour
2019 Jul 18
4
Gráfico tiempos de supervivencia
Hola, Sí, lo puedes hacer de esta forma... #----------------- set.seed(20) DATOS <- data.frame ( ID = c (1:10) , TIEMPO = sample(1:40, 10, replace=F) , DEF = as.factor(sample(c(0,1), 10, replace=T)) ) library(ggplot2) ggplot( data = DATOS ) + geom_point( aes(x = TIEMPO, y = ID , shape = DEF, color = DEF), size = 5 ) + geom_segment( aes( x = 0, y = ID, xend =
2012 Feb 29
1
ggplot2 dot chart-start at zero
I am trying to create a simple dot-plot in ggplot2 with a solid line from the y-axis to the dot, something I first saw in Cleveland's 1984 book What I would like is to have the graph start at zero on the x-axis but leave some space on the right side of the plot area. I assumed that I should be able to do this with expand() in scale_x_continuous() but either I'm wrong or just don't
2017 Dec 04
2
ggtern and bquote...
>>>>> peter dalgaard <pdalgd at gmail.com> >>>>> on Mon, 4 Dec 2017 14:55:19 +0100 writes: >> On 4 Dec 2017, at 11:58 , Levent TERLEMEZ via R-help >> <r-help at r-project.org> wrote: >> >> Dear Users, >> >> What is the proper way to write symbol, superscript, >> subscript in
2011 May 20
2
Variability plot in R
Is there a package in R that can do a variability plot? A variability plot is a kind of categorized dot plot. (If there is a lot of data in each category, box plots are used rather than dot plots.) Usually, the categories are factor level combinations. All the dot plots appear in the same window; below the x-axis a hierarchy of factors shows which dot plot corresponds to which factor-level
2008 Nov 21
0
ggplot2 - version 0.8
ggplot2 ------------------------------------------------------------ ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle (like drawing legends) as well as providing a powerful model of graphics that makes it easy to produce
2008 Nov 21
0
ggplot2 - version 0.8
ggplot2 ------------------------------------------------------------ ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle (like drawing legends) as well as providing a powerful model of graphics that makes it easy to produce
2011 Aug 16
5
ggplot2
Cordial saludo. Estoy tratando de hacer un gráfico con qplot de la libreria ggplot2, en ella tengo dos vectores un "x" y un "y" de tal forma que el gráfico seria qlot(x,y...), ahora quiero añadir un nuevo gráfico con un vector "y1" pero en el mismo cuadro algo parecido a lo que hace la funcion "lines", es decir, que en en mismo cuadro me queden las dos
2012 Jul 13
2
alternate tick labels and tick marks with lattice xyplot
Hi, I would like to use xyplot to create a figure. Unfortunately, I cannot find documentation in xyplot to specify alternating the x-axis tick labels with the x-axis tick marks. I can do this with the regular R plot function as follows. #A small version of my data looks like this data<-data.frame(matrix(ncol=3,nrow=12)) data[,1]<-rep(c(1,2,3),c(4,4,4)) data[,2]<-rep(c(1,2,3,4),3)