similar to: ggplot2 theme for custom point colors?

Displaying 20 results from an estimated 4000 matches similar to: "ggplot2 theme for custom point colors?"

2009 Jul 28
2
Density plot in ggplot2
Hi all, I was trying to draw a stacked density plot like that : library(ggplot2); library(plyr) dat <- cbind(rnorm(300), rep(c(1,2), each=150)) ggplot() + geom_density(aes(x=dat[,1], fill=factor(dat[,2]), position="stack")) + xlab("") + ylab("") + scale_colour_manual(name = "Pallet", labels = c("X", "Y")) Here
2017 Sep 26
2
Adding non-data line to legend ggplot2 Maximum Contaminant Level
Hello everyone, I have a plot showing chloride concentrations for various point over time. I also have a dotted line that show the Secondary Maximum Contaminant Level (my screening limit) on the graphs at 250 mg/L. But I can not figure out how to include the dotted line / Secondary Maximum Contaminant Level in the legend. Any thoughts? My code is as following and is linked to my data on the
2010 Nov 23
1
specifying colours in a ggplot2 piechart
Someone was asking how to do a 16 category piechart in OpenOffice Calc and it appears that it can not be done (which we, probably, should be happy about) but I thought that I'd try it in ggplot2. It works but I then thought I'd like to make the colours more distinctive but fro some reason I don't seem to be able to use manually assigned colours. Can anyone suggest where I'm
2010 Mar 24
1
GGPLOT2: Reverse order of legend to match order of x-axis
How do I reverse the order of the legend in a bar plot to match order of the x-axis? In other words, I want the stacked colors of the legend to match the stacked colors of the bar plot. I tried this, but it didn't work. colors <- c("5" = "red","4" = "blue","3" = "darkgreen") p <- qplot(factor(cyl), data=mtcars,
2008 Jun 10
1
Sweave, ggplot2 and two-page figures
I am using Sweave to generate a document in which ggplot2 figures are embedded. I am using the following code in a particular plot within a subfloat environment: <<qplotARbosreg, echo = FALSE, fig = TRUE>>= print(qplot(bosday2, Arday2, data= arbostimearonlyNArm, colour=factor(bos2), shape=factor(bos2), size=factor(cumARscore), position="jitter", main="Days to BOS by
2024 Mar 05
1
How to invert axis within defined range with ggplot2 scale_y_reverse?
Hello, I am drawing some data with ggplot2 and would like to reverse the order of the y axis and set a custom range for it. I can do the former but when I add the key `limits` to `scale_y_reverse` I get an error as shows below and, worse, no data shown in the plot. How can I properly set a reverse y scale with a defined range in ggplot2? Thank you ``` A <- rep(c(0, 3, 6, 12, 24), 3) B <-
2024 Mar 05
1
How to invert axis within defined range with ggplot2 scale_y_reverse?
On 05/03/2024 7:16 a.m., Luigi Marongiu wrote: > A <- rep(c(0, 3, 6, 12, 24), 3) > B <- c(rep(0,5), rep(1,5), rep(2,5)) > V <- c(27.5, 27.01, 27.75, 27.98, 27.4, 25.69, > 26.17, 27.78, 26.08, > 24.97, 23.18, 21.78, 22.49, 21.85, 22.2) > df <- data.frame(Conc = A, Time = B, Value = V) > df$Conc = as.factor(df$Conc) >
2007 Nov 13
4
Public folder simple question
Hi to all, I''ve a simple question: does it possible to change the public folder address based on database value into application controller ? This because I must handle a multidomain rails application and I must separate the public folders for each different domain... Thanks in advance... -- Gianluca Tessarolo TreNetMediaMaster S.r.l. The Internet Technology Company Telefono
2011 Oct 04
1
ggplot2: changing default colors of boxplot
Hi, I wanted to change the default colors appearing in boxplot. For example, the following code (from the package/documentation): =========== library(ggplot2) p <- ggplot(mtcars, aes(factor(cyl), mpg)) p + geom_boxplot(aes(fill = factor(am))) =========== Gives the default colors. What do I need to do to modify this so that: 1. Change the colors from green and red to blue and black 2. Only
2010 Sep 20
1
ggplot2 - bar colour
Hi All, I have trying to do what I thought was a reasonably simple graph but I think I'm now going in circles with the colour. Attached is a picture of where I'm up to. The line creating this is: qplot(ageincgraph$age, ageincgraph$rate, position="dodge", stat="identity", geom="bar" ) + aes( colour=ageincgraph$era) +
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 +
2011 Sep 07
2
ggplot2-Issue placing error bars behind data points
Hi all, This seems like a basic problem, but no amount of playing with the code has solved it. I have a time-series data set like that shown below (only longer) and am seeking to plot the data with filled, circular points and error bars. I would like the error bars to be behind the points otherwise they tend to obscure the points (especially when I have a lot of points in the actual data set).
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 Nov 29
3
Removing a data subset
Say I have a dataset that looks like Location Year GW_Elv MW01 1999 546.63 MW02 1999 474.21 MW03 1999 471.94 MW04 1999 466.80 MW01 2000 545.90 MW02 2000 546.10 The whole dataset is at http://doylesdartden.com/ExampleData.csv and I use the code below to do the graph but I want to do it without MW01. How can I
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",
2010 Oct 20
1
Adding Legend about two quantile lines at ggplot
Hi, all. I'd like to add legend on my graph but I can't. My code is follows. library(ggplot2) score1<-rnorm(100,0,5) score2<-rnorm(400,10,15) mydata<-data.frame(score1,score2) ggplot(mydata,aes(y=score2,x=score1))+geom_point()+stat_quantile(quantiles=c(0.50),col="red")+stat_quantile(quantiles=c(0.90),col="blue",size=2) I like to add legend indicating the
2012 Nov 07
1
change colour of geom_step by scale_colour_manual
Hi, Color of my step plot is now by default. Now I'd like to change the color as the grey scale I specified. I don't know why I got three black plot. Here I attach two version of codes. The first one produces a step plot with color by default. The second one, modified from the first one, is not producing the grey scale I want. Any help would be highly appreciated. [version 1- working]
2023 Jul 02
0
How to plot both lines and points by group on ggplot2
Thank you that is exactly it! The problem was to connect each point of the series 'Conc' with a line. Best regards Luigi On Sat, Jul 1, 2023 at 8:33?PM Chris Evans <chrishold at psyctc.org> wrote: > > > On 01/07/2023 19:20, Luigi Marongiu wrote: > > Hello, > > I have a dataframe with measurements stratified by the concentration > > of a certain substance.
2011 May 18
1
Change pattern in histograms in ggplot2
Hi, I am wondering if there is a way to change the pattern of the fill in histogram in ggplot2? By default the fill is solid and I'd like to add some sort of pattern to make it more visible that these are different levels of a factor. Thanks! Chris [[alternative HTML version deleted]]
2011 Jun 10
1
ggplot2 avoid automatic color selection
Hey all, I'm trying to replicate some plots with ggplot2. The problem is that I need to specify the color for every attribute (drug). If I use the code below the colors get automatically assigned but I need to plot drug1 in black drug2 in blue etc. How do I do that? q = qplot(days,vol,data = cellLine7064, color = drug, geom = c("line", "point")) best regards, Immanuel