search for: linetypes

Displaying 20 results from an estimated 106 matches for "linetypes".

Did you mean: linetype
2017 Oct 12
1
dual y-axis for ggplot
Hi John, You can try the following: override.linetype=c("twodash","solid") p <- ggplot(obs, aes(x = Timestamp)) p <- p + geom_line(aes(y = air_temp, colour = "Temperature", linetype ="Temperature")) p <- p + geom_line(aes(y = rel_hum/5, colour = "Humidity", linetype="Humidity")) p <- p +
2017 Oct 12
2
dual y-axis for ggplot
Hi, To my knowledge, an excellent of ggplot with a second y-axis is https://rpubs.com/MarkusLoew/226759 In this example, the author uses two colors for the two lines, but the line shapes are the same -- both are solid. Could each line have its own color as well as its own shape? For example, can I make the red line with the linetype "twodash", while the blue line with the
2017 Oct 12
0
dual y-axis for ggplot
Sorry let me clarify. If I modify the line p <- p + geom_line(aes(y = air_temp, colour = "Temperature")) by p <- p + geom_line(aes(y = air_temp, colour = "Temperature", linetype ="Temperature")) and p <- p + geom_line(aes(y = rel_hum/5, colour = "Humidity")) by p <- p + geom_line(aes(y = rel_hum/5, colour = "Humidity",
2018 Jul 18
2
Legendas en una gráfica de ggplot2
Buenas tardes, estoy haciendo una gráfica de múltiples lineas pero no he podido generar las legendas. Alguno de ustedes me podría colaborar. library(ggplot2) #### Con b=-2 t=seq (-4, 4, by=0.01) l=exp(t+2)/(1+(exp(t+2))) ##con b igual a -1 t=seq (-4, 4, by=0.01) o=exp(t+1)/(1+(exp(t+1))) ### Con b igual a 0.7 t=seq (-4, 4, by=0.01) i=exp(t-0.7)/(1+(exp(t-0.7))) ### Con b igual a 2 t=seq
2009 Sep 09
2
ggplot2: mixing colour and linetype in geom_line
Hi all, I try to represent a multiple curve graphic where the x-axis is the temperature and the different y-axes are the different X (X22,X43,X44...) some X corresponds to the same molecule (22 and 44 are for CO2 for instance) so I use the same colour for them. I wanna mix the linetype with the colour to be able to visually see the difference between X43 and X45 The best I have done up to now
2018 Jul 18
2
Legendas en una gráfica de ggplot2
¡Gracias! Espectacular. Me ha servido mucho. El mié., 18 de jul. de 2018 1:15 PM, Víctor Granda García < victorgrandagarcia en gmail.com> escribió: > Hola Sebastián. > > Entiendo que tratas de que aparezca una leyenda con el tipo de curva > (l,o,u,i). Si quieres aprovechar las ventajas de ggplot (como las leyendas > automáticas) normalmente tienes que asignar linetype a una
2018 May 22
3
legend order in ggplot2
Hi, I'd like to graph three lines on ggplot2 and I intend the lines to be "solid", "dashed", and "dotted". The legend names are "name_b", "name_a", "name_c". I'd like to legend to present in the order: the "name_b" at the top, and "name_c" at the bottom. As a consequence, the legend is indeed in the order:
2023 Aug 12
1
geom_smooth
?s 05:17 de 12/08/2023, Thomas Subia via R-help escreveu: > Colleagues, > > Here is my reproducible code for a graph using geom_smooth > set.seed(55) > scatter_data <- tibble(x_var = runif(100, min = 0, max = 25) > ?????????????????????? ,y_var = log2(x_var) + rnorm(100)) > > library(ggplot2) > library(cowplot) > > ggplot(scatter_data,aes(x=x_var,y=y_var))+
2013 Feb 01
2
Change default order of colors & line types
Dear R users, I'd like to change the default order of colors & line types. Especially I am using ggplot2 and using color Set1. In Set1, the default color order is red, blue, green, violet,.. ect. However, I want to put red in fourth (not first). Likewise, I want to change the order of default linetype. I want to put "solid" line in fourth. How can I do thses? R code to draw the
2013 Mar 06
6
Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?
Hi, # For publications, I am not allowed to repeat the axes. I have tried to remove the axes using: # yaxt="n", but it did not work. I have not understood how to do this in ggplot2. Can you help me? # I also do not want loads of space between the graphs (see below script with Dummy Data). # If I could make it look like the examples on the (nice) examples page: #
2009 Jan 22
5
Combining Custom and Preset Linetypes
...I have the problem of trying to get the new line into the legend. Does anyone have any ideas about how to combine custom and preset line types? Regards, James http://www.nabble.com/file/p21593760/CRA.gif -- View this message in context: http://www.nabble.com/Combining-Custom-and-Preset-Linetypes-tp21593760p21593760.html Sent from the R help mailing list archive at Nabble.com.
2023 Aug 12
2
geom_smooth
Colleagues, Here is my reproducible code for a graph using geom_smooth set.seed(55) scatter_data <- tibble(x_var = runif(100, min = 0, max = 25) ?????????????????????? ,y_var = log2(x_var) + rnorm(100)) library(ggplot2) library(cowplot) ggplot(scatter_data,aes(x=x_var,y=y_var))+ ? geom_point()+ ? geom_smooth(se=TRUE,fill="blue",color="black",linetype="dashed")+
2009 Feb 18
1
lineplot in ggplot2 with different colour and linetype
Hi list, I would like to use ggplot2 in creating a line plot with 4 lines (groups), 2 of which I want in colour and the remaining two as dotted lines. ### R code ### library(ggplot2) ### create data #### vals <- rnorm(400) div<- c(rep("A",100),rep("B",100),rep("C",100),rep("D",100)) n<- rep(1:100,4) df<- data.frame(div=
2012 Jan 19
1
Legend problem in line charts
Hi all, Small problem in generating the line charts. Question: Legend for the first graph is coming wrong., for second graph correctly. Please fix the legend postion at the down of graph. Plesae give me the solution. Thank you Devarayalu Orange1 <- structure(list(REFID = c(7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9), ARM = c(1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2,
2006 Oct 16
2
set linetype with plotCI
Dear R-list, I'm iterating several calls to plotCI [gplots], like so: plotCI( x = xvals.f[sorted], y = yvals.f[sorted], xlim = c(xmin, xmax), ylim = c(ymin, ymax), pch = plot_symbols[graph_idx], type = "b", lty = plot_linetypes[1], col = plot_colors[graph_idx], barcol = plot_colors[graph_idx], uiw = NA, xlab = "", ylab = "", add = (plot_cnt > 0) ) This works fine, the result is four graphs exactly like I want them. Except for one thing, the lty is not used. I understand this is because...
2018 May 23
3
Change the legend order by order function
Hi, I'd like to graph three lines on ggplot2 and I intend the lines to be "solid", "dashed", and "dotted". The legend names are "name_b", "name_c", "name_a". I'd like to legend to present in the order: the "name_b" at the top, and "name_a" at the bottom. Could it be done by order function or its inverse?
2020 Oct 23
2
How to shade area between lines in ggplot2
Thank you, but this split the area into two and distorts the shape of the plot. (compared to ``` p + geom_abline(slope = slope_1, intercept = intercept_1 - 1/w[2], linetype = "dashed", col = "royalblue") + geom_abline(slope = slope_1, intercept = intercept_1 + 1/w[2], linetype = "dashed", col = "royalblue") ``` Why there
2009 Dec 11
2
incorrect linetype with pdf device (PR#14128)
Full_Name: baptiste augui? Version: 2.10.1 RC (2009-12-06 r50690) OS: Mac OSX 10.5 Submission from: (NULL) (90.25.215.172) The following code, run with a vanilla R session, produces different visual output for the two devices, library(grid) pdf("test-pdf.pdf") grid.newpage() grid.lines(gp=gpar(lty="13", lineend = "butt")) dev.off() png("test-png.png")
2013 May 14
1
Tamaño plots y calidad en grafico ggplot
Hola a tod en s, bueno, un poco al hilo de un mensaje anterior, reformulo la pregunta y pongo código completamente reproducible, a ver si hay más suerte. Estoy con un informe y hay que hacer algunos gráficos con datos diferentes con ggplot2, y hay que poner el mismo tamaño para todos ellos. El problema es que R cambia automáticamente el tamaño del área de trazado y el margen en función de
2020 Oct 23
5
How to shade area between lines in ggplot2
Hello, I am running SVM and showing the results with ggplot2. The results include the decision boundaries, which are two dashed lines parallel to a solid line. I would like to remove the dashed lines and use a shaded area instead. How can I do that? Here is the code I wrote.. ``` library(e1071) library(ggplot2) set.seed(100) x1 = rnorm(100, mean = 0.2, sd = 0.1) y1 = rnorm(100, mean = 0.7, sd =