similar to: Patterned shading in ggplot

Displaying 20 results from an estimated 1000 matches similar to: "Patterned shading in ggplot"

2009 Feb 02
1
Broke ggplot...
It appears I broke ggplot in my script, but that maybe it is because the caffeine has worn off or maybe it is late in the day.   I thought I was beginning to understand ggplot, but I have encountered a silly little issue.   For some reason the following does not produce a histogram with fill due to the Person's characteristics: (Note that VADeaths_flat_df$Data works fine...)    
2009 Aug 19
2
ggplot2 legend problem
I'm trying to overlay two histograms using transparency to enable viewing of multiple distributions on a single scale. So far ggplot2 seems to do what I want. However I'm having a problem generating the legend coloring appropriate to each distribution in the plot. Here is a test case to show my best (failed) effort so far: library(ggplot2) x <- data.frame(X=rnorm(1000, mean=0)) y
2023 Jan 12
1
Reg: ggplot error
Hallo I am not familiar with any of packages you use (except of MASS and ggplot2) and the code is too complicated without any hint where the error could come from and what is the message you get. I wonder if anybody would like to go through your whole code. 1. data seems to be read correctly ICUData <- read.csv(file = "ICUData.csv", stringsAsFactors = TRUE) ICUData.neuro <-
2011 Dec 04
1
Polishing my geom_bar for publication
Dear list, I am new with ggplot2 and I have spend quiet some time putting together the following code to create the attached plot. However there's still a few things that I'm having trouble with! I would be grateful if someone can tell me how to fix (1) the colour of my bars into grey scales (2) removing the y-axis (species name) on the right figure to avoid duplication, and (3) fix the
2010 Jun 30
2
ggplot qplot bar removing bars when truncating scale
I'm having problems with this example, it is posted with reproduceable code below, both with the normal 0-6 scale and the desired 3-6 scale (with bars removed). How can I get the graph to have the desired 3-6 scale without removing the bars. Thanks! #Data
2011 Jul 25
4
ggplot question: changing the label for the Y axis on a histogram
Some help with how to re-label the vertical axis in a histogram would be appreciated. qplot(off.sc,weight=rel.freq,binwidth=.29,main="test Figure"+ylab("New from inside"))+ylab("New from outside")+ xlab("off.sc\nAggregated frequency plots for 17 equal intervals.") The code
2017 Nov 07
1
fill histogram in ggplot
Hi all, I have the following data and I have a histogram for mms like ggplot(hist,aes(x=hist$mms))+ geom_histogram(binwidth=1,fill="white",color="black")and then I want to fill the color of histogram by probable=1 and probable=0, could anyone help me in this? My data: structure(list(probable = c(1L, 0L, 1L, 1L, 0L, 1L, 0L, 1L, 1L, 0L, 1L, 0L, 1L, 0L, 1L, 0L, 1L, 1L,
2010 Nov 06
2
Removing NA in ggplot
An embedded and charset-unspecified text was scrubbed... Name: ikke tilgjengelig URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101106/516aa4f1/attachment.pl>
2009 Apr 30
3
Curved arrows
I'm trying to draw an arrow with a curved shaft on the graph as a straight one looks messy on a detailed graph. I've looked in arrows but it doesn't seem to give an option. larrows doesn't look much more promising. I had a look in the archive and couldn't find anything. Any thoughts? Thanks Paul -- View this message in context:
2010 Jan 25
3
Paste expression in graph title
This was my initial attempt at creating a title on a graph of the R squared value: x<-rnorm(10) y<-rnorm(10) plot(x,y, main=paste(expression(R^2)," = ",round(summary(lm(y~ x))$r.squared, digits=3), sep="")) I've read various other posts that say expression needs to be taken outside the paste, but I can't seem to get it work as the following fails plot(x,y,
2012 Feb 21
4
barplot with both color and shading
Hi list, I want to draw a bar plot with color indicating one grouping and different shading on top of the color indicating another grouping.? How should I proceed? Thanks! ...Tao
2010 Jun 09
2
Read in dataset without saving it
A simple question - I have a small dataset to read in and want to copy and paste part from Excel and paste it into an R script file without creating more files saving it as a .txt/.csv and then reading that in. I want to read in 3 columns e.g. 1 2.5 3.4 1 2.3 3.1 1 2.6 3.9 2 2.9 2.8 2 2.6 2.9 2 2.7 2.9 3 2.3 3.3 3 2.4 3.0 3 2.7 3.2 I thought I could use scan() but don't know how to extend it
2015 Jun 16
4
Ayuda boxplot ggplot2
Hola a todos Me gustaría saber si me pueden ayudar con lo siguiente. Realicé un Boxplot usando ggplot2 para visualizar el comportamiento de dos variables. Visualmente no se notan las diferencias porque la gráfica de la derecha (parásitos en el abdomen) llega hasta 20 en el eje y. ¿Cómo puedo hacer para que las dos gráficas muestren la misma escala en el eje Y, es decir, que las dos lleguen a 60?
2011 Jun 02
2
shading in overlap between two ranges
I have 2 datafiles 'target' and 'observed' as shown below (I will gladly email these 2 small files to whomever). X25. And X75. Indicate the value of 25th and 75th-percentile of the target ('what should be') and the observed ('what is'). The i.value is simply the month. > target X i.value X25. X75. 1 one.month 1 10.845225 17.87237 2
2010 Jul 29
2
ggplot2 histograms... a subtle error found
Hello all, I have a peculiar and particular bug that I stumbled across with ggplot2. I cannot seem to replicate it with anything other than my specific data set. Here is the problem: - when I try to plot a histogram, allowing for ggplot2 to decide the binwidths itself, I get the following error: - stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to
2007 Apr 06
1
Orphaned ncvar? (PR#9603)
> An orphaned package? anyone in Switzerland know if there's an alternative? Note the email. I guess CRAN-R should be notified. regards, Bob C > The original message was received at Fri, 6 Apr 2007 16:32:57 -0700 > from vayu.arc.nasa.gov [143.232.122.22] > > ----- The following addresses had permanent fatal errors ----- > <juerg.schmidli at env.ethz.ch> >
2010 Apr 09
3
NAs are not allowed in subscripted assignments
I'm trying to assign NAs to values that satisfy certain conditions (more complex than shown below) and it gives the right result, but breaks the loop having done the first one viz: new<-c(rep(5,4),6) for (i in 1:6) {new[new[i]>5.5][i]<-NA} gives the correct result, though an error message appears which causes a break if it's in a loop. If I can get rid of the error message and
2011 Jun 07
1
ggplot2 Histogram with density curve
I am learning ggplot2 commands and I have figured out how to create histograms and density curves but I am not sure how to add a density curve on top of a histogram. Here are the two graphs that I created. ## Histogram t<-rnorm(500) w<-qplot(t, main="Normal Random Sample", fill=I("blue"), colour=I("black"), geom="histogram") w ##Density Curve
2010 May 10
1
ggplot: Trouble with xlim() and discrete scales
I'm learning ggplot and am a little confused. Sometimes discrete scales work like I'd expect, and sometimes they don't. For example... This works exactly like one would expect: df<-data.frame(names=c("Bob","Mary","Joe","Bob","Bob")) ggplot(df,aes(names))+geom_histogram() But this yields an error:
2006 May 18
1
Function (x) as consecutive values
Hi - I'm trying to avoid using a 'for' loop due to inefficiency and instead use a function (and ultimately tapply as I'm working on a matrix) but I can't figure out how to get 'function' to take the variables as anything other than vectors for example aa<-0 x<-1:4 test.fun<-function(x) {aa<-(x*x +aa) return(aa)} test.fun(1:4) This code