similar to: ggplot2 / histogram / y-axis

Displaying 20 results from an estimated 400 matches similar to: "ggplot2 / histogram / y-axis"

2008 Jan 15
1
navigating ggplot viewports
list(...) I can not get at the grid viewports in a ggplot2 plot. I know there is supposed to be a viewport called "panel_1_1" but downViewport() can't find it. Has the viewport been popped? I had a quick look at the functions involved (eg ggplot_plot) but there is no obvious problem there. > library(ggplot2) > qplot(1:10, 1:10) > current.viewport() viewport[ROOT] >
2007 Feb 21
3
Different gridlines per panel in xyplot
In the example R script below, horizontal gray gridlines are drawn at y coordinates where the points are drawn with the code: panel.abline(h=y, v=xScale, col.line="gray") How do I change this so that the horizontal gray gridlines are drawn at y coordinates where the y labels are drawn? The challenge is that each panel has different y-ranges (in my real example the y-ranges and
2009 Nov 20
1
Hmisc and Lattice question on gridlines
I have been using lattice xyplot and am quite pleased, and I can use the type=c("b","g") to have it print gridlines into the page, yet if I want to have a line plot with points on it, how do I get the xYplot to print gridlines (I use Hmisc xYplot because of its bands method which allows plotting of confidence intervals). Any suggestions? I have looked at the panel functions but
2007 Jul 13
1
Choosing the number of colour breaks in ggplot2
A seemingly simple problem has me stumped. Is it possible to choose the number of colour breaks for a gradient scale in the current version of ggplot2? Here is a simple example: --------------------------------------------- x=-10:10 y=-10:10 dat=expand.grid(x=x,y=y) dat$z=dat$x^2+dat$y^2-100 ggplot(dat, mapping=aes(x=x, y=y, fill=z)) + geom_tile() + scale_fill_gradient2()
2007 May 12
2
Implicit vs explicit printing and the call stack
Hi everyone, I've run into a bit of strange problem with implicit vs explicit printing and the call stack. I've included an example at the bottom of this email. The basic problem is that I have an S3 object with a print method. When the object is implicitly printed (ie. typed directly into the console) the function arguments in the call stack are exploded out to their actual values,
2008 Sep 29
2
ggplot 2 - editing in the "panel_1_1" viewport
Hi All, I am trying to find out how to access the components of a ggplot plot, and I found this reply from Paul Murrel http://www.nabble.com/navigating-ggplot-viewports-tt14826352.html#a15056223. I tried it, and it works. However, I am trying to develop some functions that will do the drawing "automatically", and usually I will not know the full name of the grob that has the layout vp,
2009 May 16
2
Question about barplot: gridlines & value labels
Hello! I promise I looked into help files before asking. Still cannot figure it out. I think it's because I am totally confused what packages use lettice, which use trellis, etc. Sections 1 and 2 below produce the data and the data to plot. My question is about barplot in Section 3. I am trying to: 1. add only horizontal gridlines and manipulate the type and color of that line. tck = 1 is not
2007 Jul 13
1
ggplot usage question
Could someone show me how to get a blue line in this plot? > ggplot(movies, aes(x=rating)) + stat_qq(geom="line", quantiles=seq(0,1,0.005), distribution=qunif) I've tried many permutations but cannot seem to find the right combination. I've tried these flavors: > ggplot(movies, aes(x=rating)) + stat_qq(geom="line", colour="blue",
2010 Apr 22
2
How to insert gridlines in lattice density plot
Greetings. How can I insert gridlines in the following density plot call? Must one compose a panel function? 'data.frame': 46 obs. of 2 variables: $ fallrates: num 5.2 7.1 7.1 9.8 3.7 7.5 5 6.2 1.5 2.9 ... $ prepost : Factor w/ 2 levels "post","pre": 2 2 2 2 2 2 2 2 2 2 ... library(lattice) densityplot(~fallrates, groups = prepost,
2004 Mar 11
1
tics and grids
Hi, Whats the easiest way to set a desired interval for tics on axes in R ? And will the 'grid' command put gridlines on all tics automatically ? I tend to get stuck with graphs with ranges 0-1 with only 2 tics and 2 gridlines in the 0-1 range, while I would like 10 tics (or every 0.1) tnx, Piet please reply to pvremortNOSPAM at vub.ac.be
2009 Aug 25
1
Lattice graph tweaking
To: silwood-r Subject: Removing lattice graph gridlines and editing label box colour Hi, Is it possible to remove the background gridlines from a lattice graph (ie graph made up of multiple individual graphs with annoying blue grid in the backgroun)? Also, Is it possible to change the colour of the individual graph label boxes? - ie the default pink boxes above the individual graphs Thanks
2008 May 07
2
figure margins too large for a barplot in png, pdf ok
I've used to have a script with a barplot command it in, preceded by a png: png(graph.file,height=H,width=W) barplot(t,names.arg=breaks[2:(length(t)+1)],tck=gridlines) -- worked before R 2.6.2. When I tried it in R 2.6.2, which I have for a while but didn't run with that script, it complained, the margins too large, and I've googled the messages from our list where neither
2011 May 03
2
Controlling the extent of ablines on plot
Hi all, I'm attempting to make a quite-specific plot where the axes cross at the origin and with gridlines for guidance. I've been using ablines to create the reference lines because I want a lot of control as to where they are placed on the axis. This command works very well for such control. However... These ablines don't seem to work when I specify the origin as 0,0. They go
2009 Feb 18
1
interaction.plot - gridlines and formatting legend title...
Thank you for providing advice on this graphics question. I am building an interaction.plot. d=data.frame(xx=c(3,3,2,2,1,1),yy=c(4,3,4,3,4,3),zz=c(5.1,4.2,4.4,3.5,3.3,-1.1,-1.3) d[[1]]<-as.factor(d[[1]]) d[[2]]<-as.factor(d[[2]]) print(d) interaction.plot(d$xx, d$yy, d$zz, type="b", col=c("red","blue"), legend=F, lty=c(1,2), lwd=2, pch=c(18,24),
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]
2007 Jul 12
1
ggplot2 / reshape / Question on manipulating data
I'm an R newbie but recently discovered the ggplot2 and reshape packages which seem incredibly useful and much easier to use for a beginner. Using the data from the IMDB, I'm trying to see how the average movie rating varies by year. Here is what my data looks like: > ratings <- read.delim("groomed.list", header = TRUE, sep = "|", comment.char = "")
2008 Sep 16
2
Setting user colors in barchart
Dear R Users, I have a basis question regarding the use of color in the lattice package. I read the ?barchart help page and searched the R archives but could not understand how to do it. I just need to plot a barchart using specific colors for my groups, e.g. green and red instead of the default lattice colors. How do I do that? If I say: barchart(x ~ a_factor, groups=my_groups,
2003 Nov 16
2
Newbie: Barchart Gray with White Grid?
Hello, I'm just getting in to R, been reading manuals (thanks to all who provided pointers to good docs!), and messing with different commands. I'd appreciate a little help with this exploration, and I hope that my question is relatively easy to answer (probably, there's a simple way to do what I'm working toward). R's statistical functions are coming along easily enough,
2008 Jul 27
1
Lattice wireframe: How to avoid drawing lines around polygons when using shade=TRUE
I am using wireframe from the lattice package, with the shade option set to TRUE. When I output to PDF or Postscript, a line gets drawn around each polygon of my surface which causes ugly Moir? effects and doesn't make sense in my application (think the plot of Maunga Whau--gridlines don't make sense). This does not happen when I display on the screen-- then I just get the surface as
2008 Jan 25
3
plotting gridlines
dear all, I have a very simple question but I could not figure out. I need to make plots with grid in the background. something like I old retrive like this a=runif(100)*10 b=runif(100)*10 plot(a,b, pch=20, xlim=c(0, round(max(a))), ylim=c(0, round(max(b)))) vs=seq(0, max(a), 0.5) for(i in 1:length(vs)){ abline(v=vs[i], col="lightgrey") } hs=seq(0, max(b), 0.5) for(i in