search for: unfocus

Displaying 20 results from an estimated 83 matches for "unfocus".

Did you mean: onfocus
2006 Jul 19
2
trellis.focus with postscript device
...;,'B'), c(20,35,30,20,4,10)) pp <- rep(c('Cond 1','Cond 2','Cond 3'), c(55, 50, 14)) xyplot(yy ~ xx | pp, groups=gg) trellis.focus('strip', 1, 1) ltext(0,.5,'20',col='red', pos=4) ltext(1,.5,'35',col='black', pos=2) trellis.unfocus() trellis.focus('strip', 2, 1) ltext(0,.5,'30',col='red', pos=4) ltext(1,.5,'20',col='black', pos=2) trellis.unfocus() trellis.focus('strip', 1, 2) ltext(0,.5,'4',col='red', pos=4) ltext(1,.5,'10',col='black', pos=2) tr...
2006 Jul 29
3
placing rectangle behind plot
...ing col = "transparent" to the gpar list but that did not help -- I am on windows and perhaps the windows device does not support transparency? At any rate, how can I place the rectangle behind the plotted points without drawing the rectangle first? library(lattice) library(grid) trellis.unfocus() x <- 1:10 xyplot(x ~ x | gl(2,1), layout = 1:2) trellis.focus("panel", 1, 1) grid.rect(w = .5, gp = gpar(fill = "light grey")) trellis.unfocus()
2006 Apr 13
1
panel.abline() and trellis.focus() on multipage plots
Hi, I'm recently working on a multipage bwplot() using the lattice package. In this context I was trying to use the panel.abline() function individually on certain panels but not all. After some research I found the trellis.focus() and trellis.unfocus() functions which enabled me to do something like: trellis.focus("panel", 1, 3) do.call("panel.abline", list (c(0.5, 0), col="tomato", lty=2 )) trellis.unfocus() The result is quite what I expected and working properly as long I'm having a one-p...
2008 Dec 31
2
Lattice trellis.focus() with pdf
...work when I make the trellis device a pdf. The code is as follows: ---- trellis.device(device="pdf", new=TRUE) trellis.par.set(my.theme()) dotplot(Y ~ X | C, groups=G, data=D, layout=c(2,1), ... ) trellis.focus("panel", 1, 1) for (y in 1:5) { panel.segments(...) } trellis.unfocus() trellis.focus("panel", 2, 1) for (y in 6:10) { panel.segments(...) } trellis.unfocus() dev.off() ---- The first for loop draws perfectly but the next panel never takes the focus and doesn't draw anything. The resulting file has the red focus box around the first panel stil...
2009 Nov 23
3
Trellis Plot
anyone know how to add text in the Trellis plot panel ?? i want to add things eg: dot dot dot. in the headrer of the panel. eg: http://old.nabble.com/file/p26486579/hist1.png hist1.png -- View this message in context: http://old.nabble.com/Trellis-Plot-tp26486579p26486579.html Sent from the R help mailing list archive at Nabble.com.
2012 Apr 07
6
Drawing a line in xyplot
i am trying to replicate the following graph using xyplot : attach(x) plot ( jitter(type), mortality, pch=16, xlim = c(0.25, 3.75)) lines ( c(1-0.375,1.375) , c ( median(mortality[type==1]), median(mortality[type==1])), lwd=5,col=2) lines ( c(2-0.375,2.375) , c ( median(mortality[type==2]), median(mortality[type==2])), lwd=5,col=2) lines ( c(3-0.375,3.375) , c ( median(mortality[type==3]),
2012 Dec 11
1
Focus on a sub-panel of a splom with trellis.focs() -- return coordinate of sub-panel, or names of variables therein
...quot;Virginica")))) This is what I've been able to come up with so far, but I know it's not what I need. I'd like to be able to select an entire sub-panel > trellis.focus() > panel.link.splom() #click on a point in the plot, then hit 'esc' [1] 80 111 > trellis.unfocus() #to end trellis.focus Thanks for your help, Eric [[alternative HTML version deleted]]
2009 May 18
2
Superscripts and subscripts in trellis graphics
...xt(x=1998, y = 0.35, labels="Number of Eggs\nR^2 = 0.43",cex = 0.75) panel.text(x=1995, y = 0.25, labels="Flooded Eggs\nR^2 = -0.50", cex = 0.75) panel.text(x=1986, y = 0.3, labels="Mean HSI", cex = 0.75) trellis.unfocus() Thanks Steve Steve Friedman Ph. D. Spatial Statistical Analyst Everglades and Dry Tortugas National Park 950 N Krome Ave (3rd Floor) Homestead, Florida 33034 Steve_Friedman at nps.gov Office (305) 224 - 4282 Fax (305) 224 - 4147
2006 Aug 09
1
legend on trellis plot
Dear all I have two questions regarding trellis plots - which I hope you may be able to help me with. Is it possible to place the key in a trellis plot on the panel (instead of beside the panel)? This will cause the same key to be reproduced on each panel. Please see the plot below - here I placed the legend below the plot. I tried moving the key to the function statement, but it did not really
2004 Nov 29
1
Call to trellis.focus(); thenpanel.superpose()
...plt <- xyplot(uptake ~ conc, groups=Plant, data=CO2) print(plt) trellis.focus("panel", row=1, column=1) arglist=trellis.panelArgs() arglist$type <- "l" do.call("panel.superpose", args=arglist) trellis.unfocus() Should I be able to use panel.superpose() in this way? The new abilities provided by trellis.focus() etc add greatly to the flexibility of what can be done with lattice plots. The grid-lattice combination is a great piece of software. John Maindonald email: john.maindonald at anu....
2009 Nov 26
1
Adding text in the panels for Trellis plot ...
...ot;index",j+1),mycolors = colors()[c(536,552,652,254,26)], + panel = function(..., col, mycolors) { + panel.histogram(..., col = mycolors[panel.number()])}) + trellis.focus('strip', 1, 1, highlight=FALSE) + ltext(0.60, -0.25, 'PPM', col='blue', pos=3) + trellis.unfocus() + } Error in grid.Call.graphics("L_downviewport", name$name, strict) : Viewport 'plot1.strip.1.1.vp' was not found > > print(plots[[1]]) I am not sure what was happeneing. . . can anyone help me ? -- View this message in context: http://old.nabble.co...
2006 Dec 21
1
Gtk-Window-Decorator Problem
Hi, There is a strange bug in gwd. When using compiz, after some time all window decorations become non-responsive. All buttons on the decoration become non-clickable and I can't move any window. Also the decoration color stays in an unfocused state, but I can focus all windows. After that point if i open new windows, they have a decoration bar, but no buttons, icon or title. I've no idea what might causing this, but it happens all the time. If I restart gwd it works for a few minutes and then happens again. Everything works fine...
2009 Jan 21
1
Text Outside Lattice Plot
...creased the upper margin of the plot using plot(data, position = c(0,0,1,.9)) and attempted to move "SNA" upwards and to the right. I have tried using a variety of text functions such as: trellis.focus("panel", 1, 1) panel.text(x=11, y=100000, labels="SNA") trellis.unfocus() panel.xyplot(...) panel.text(x=11, y=100000, labels="SNA") library(grid) ltext(grid.locator(), label='SNA') The first two of these functions work but the text disappears once I specify a y coordinate > ymax. The last function appears to work but requires me to click...
2011 Mar 30
1
How to put line linking two plots
Hello! Suppose I have three charts like below. The top chart is a general overview and the bottom charts are related so some point of this chart. To make clear this relationship I want to draw a line between (4,0.9) in the top chart and (10,1) in the bottom-left one. Currently I add it manually using Inkscape on the resulting pdf file. Is it possible to add it inside R? Should I switch to other
2011 Oct 08
2
Connecting points over missing observations in Lattice
Hello, I'm trying to plot connected time series of two variables in a lattice plot: xyplot(y1 + y2 ~ t, data=size, type="b") y2 has missing data for some of the observations and some points are therefore not connected. It would make theoretical sense to connect the points - is there a way of doing that? (Without filling the obserations using package 'zoo'). Thanks,
2008 May 11
1
positioning of color key in levelplot
...focus("panel", 1, 2, clip.off=T) panel.axis(at=seq(1,8,1), labels=c(rep("Blah",8)), side=c("right"), outside=T) trellis.focus("panel", 1, 1, clip.off=T) panel.axis(at=seq(1,8,1), labels=c(rep("Blah",8)), side=c("right"), outside=T) trellis.unfocus() _________________________________________________________________ [[alternative HTML version deleted]]
2006 Sep 29
1
Plotting text with lattice
Hello, I've decided to take the leap and try my hand at the lattice package, though I am getting stuck at what one might consider a trivial problem, plotting text at a point in a graph. Apologies in advance if (that) I'm missing something extremely basic. Consider in base graphics: > plot(1:10) > text(2, 4, "Text") In the above you will see text centered at the point (2,
2008 Feb 05
2
dynamically add items to key of lattice xyplot
....number=4)), par.settings=list(plot.line=list(col='red')), type="l", key=list(text=list(c("blah","blah2")),x=0.5,y=0.5,lines=list(type="l",col="red")), ),newpage=FALSE) # add another line to plot trellis.focus("panel") ... trellis.unfocus() # focus on the existing key trellis.focus("legend",1,1,highlight=FALSE) ??
2007 Apr 27
1
add arrows to barchart with groups
...cus("panel",2,1) xx<-trellis.panelArgs()$x yy<-trellis.panelArgs()$y panel.arrows(as.numeric(xx)[c(1,3)]-0.1,yy[c(1,3)],as.numeric(xx)[c(1,3)]-0.1,yy[c(2,4)],lwd=2,code=3) panel.text(as.numeric(xx)[c(1,3)]-0.35,c(87,87),paste(yy[c(2,4)]-yy[c(1,3)],"\nq/ha"),font=2) trellis.unfocus() But I would prefer doing this within a custom panel function so I can apply it more generally, and I haven't been able to figure out how... Could anyone give me a hand? Thanks in advance. David Gouache Arvalis - Institut du V?g?tal
2012 Jul 13
2
minor axis ticks in trellis graphics?
Dear R users, I need to add minor axis ticks to my graph. In traditional R this is easily achievable by simply adding a second axis with the minor ticks. But how to do that in trellis? I am already out of ideas. Any suggestions will be appreciated. Best regards, Martin ----------------------------------------------------------------- ?????????? ??????????? ? ?????? ?? ??????????