similar to: Text in lattice Graphics outside plot area

Displaying 20 results from an estimated 3000 matches similar to: "Text in lattice Graphics outside plot area"

2005 Feb 15
1
Trellis barchart, column display order issue
I have searched the archives and instructions high and low but have not found what I need. I have a dataframe named Data with columns: AdjResND0 - the numeric result Parameter - the classification (chemical name) Sort - the order I want the chemical names to appear, with leading zeros so all are the same length Client.Name - the sample name I am trying to generate a series of 1 page barcharts,
2005 Mar 09
4
Lattice device page options-margins
I am using lattice to make figures as pdfs: trellis.device(device = "pdf",file = "Figure6.pdf",color = FALSE) I need to specify some blank space on the left-hand margins (the pages will be bound so we need about 0.5 inch)). I have tried a number of solutions but none seems to work (e.g. par.set). Can this be done when initiating the plotting device? Or is the some other way
2004 Sep 01
0
Dependant proportions and sample size
I need to do a sample size calculation to determine the number of audits required. The results of an audit will be: 1) OK 2) Minor variances 3) Multiple variances 4) Severe variances We want to know the sample size required to determine the proportions in each category within say 5% with a confidence of say 80% (specific values to be determined). I have used the test of proportions before but
2005 Apr 21
4
Suggestion for the posting guide
I was preparing an e-mail for the help list and ran across a quandary. When asking for help it is useful to include the code/data so others can run your code and test it. I was running code on a data frame and wanted to include a small version of the data frame. The data frame was based on experimental data. What is the best way to do this? I didn't want to send an attachment so a wrote code
2004 Sep 01
0
Multiple dependant proportions and sample size
I need to do a sample size calculation to determine the number of audits required. The results of an audit will be: 1) OK 2) Minor variances 3) Multiple variances 4) Severe variances We want to know the sample size required to determine the proportions in each category within say 5% with a confidence of say 80% (specific values to be determined). I have used the test of proportions before but
2004 Apr 27
4
Problems raised to 1/3 power and NaN
I am debugging some code and found a function that returns and error most of the time. I have issolated the problem to when it raises an argument to the 1/3 power but for the life of me I can not figure out why it is not working. i have gone through the FAQs and have found nothing (not to say I might have missed something). I am highly embarrased with my inability find the problem (my face is
2009 Jun 24
1
parallel rotated strips with color gradient
Hi, I want to produce two parallel rotated strips with color gradient. So far, the sample strip is something produced by this: pushViewport(viewport(x = unit(0.638, "npc"), y =unit(0.386, "npc"), width=.62, height=0.006, angle=137.2)) grid.rect(y=100:1/100, just="top", gp=gpar(col=NA, fill=colorRampPalette(c("lightgray",
2005 May 26
0
Confidence intervals for prediction based on the logistic equation
Greetings, We are performing a meta-analysis of mink pup survival data versus chemical concentration. We have modeled percent survival successfully using nls as shown below and the plot. What we need to do is construct a confidence interval on the concentration at which we get 50% survival (aka the EC50, although we may want other percent survivals in the future). My first question is, what seems
2009 Jun 26
1
gradient fill of a grid.polygon
Dear list, Following a recent enquiry, I've been playing with the idea of creating a colour gradient for a polygon, using the Grid package. The idea is to draw a number of stripes of different colours, using the grid.clip function. Below is my current attempt at this, library(grid) rotate.polygon <- function(g, angle=0){ # utility function, works fine matR <- matrix(c(cos(angle),
2009 Sep 24
1
Creating grid graphics with grid.layout
Hi, I recently created a function which uses grid with a viewport constructed with grid.layout() to position four plots on a plot device. My question is what's the best way to programatically traverse each element of the viewport? The grid is 5x5 and the four plots occupy positions (2,2), (4,2), (2,4), and (4,4). Here's the viewport code: pushViewport( viewport(
2011 Feb 15
1
gList and gTree methods of grid::grobX
Dear all, In an attempt to draw fill patterns in grid graphics, I have encountered a behavior of grobX that I cannot understand from the documentation. Consider this, library(grid) ## gTree g1 <- gTree(children=gList( rectGrob(0.5,0.5, width=unit(0.8,"npc"), height=unit(2,"cm")), circleGrob(r=0.3)), vp=viewport(0.5,0.5)) ##
2009 Sep 28
2
dichromat, regexp, and grid objects
Dear list, The dichromat package defines a dichromat function which "Collapses red-green color distinctions to approximate the effect of the two common forms of red-green colour blindness, protanopia and deuteranopia." library(dichromat) library(grid) colorStrip <- function (colors = 1:3, draw = TRUE) { x <- seq(0, 1 - 1/length(colors), length = length(colors)) y <-
2010 Feb 22
1
grid unit bug? (PR#14220)
The following seems to me to be at least a perverse trap, if not an = outright bug: > is.numeric(unit(1,"npc")) [1] TRUE > is.numeric(1*unit(1,"npc")) [1] FALSE > is.numeric(unit(0,"npc") +unit(1,"npc")) [1] FALSE ...etc. i.e. is.numeric() appears to be TRUE for class "unit" but false for = class ("unit.arithmetic"
2009 Mar 21
1
Forestplot () box size question
Hi All, I have been able to modify the x-axis to start at zero by adding xlow and xhigh parameters; that was pretty simple. I have been unable to find the location of the code that would turn off the information weighting of the box size (I have smaller randomized trials getting less weight than a much larger non-randomized trial). The function is forestplot() from rmeta. Thanks for any
2005 Oct 15
2
grid.edit problem
I am having a problem in editing a grob. It works ok if I try to shift the grob using npc coordinates but if I do the same thing using native coordinates the grob disappears. What is wrong? library(grid) grid.newpage() # create viewport pushViewport(viewport(xscale = c(100,200), name = "X")) # draw vertical line grid.lines(150, 0:1, default.units = "native", name =
2008 Jul 28
1
grid.ls() after grid.remove() fails
Dr Murrell and others, It seems grid.ls() fails after any use of grid.remove(). It gives an infinite recursion error even in the simplest cases, and no matter what arguments are passed to grid.ls. > library(grid) > grid.newpage() > grid.lines(name="foo") > grid.ls() foo > grid.remove("foo") > grid.ls() Error: evaluation nested too deeply: infinite recursion
2007 Dec 10
2
Viewport and grid.draw
Hi Deepayan and everyone, I need to add a common legend to a group of latice graphs, I have tried different ways using viewport and grid.draw without success. Here is what I have: plot.new() library(grid) library('IDPmisc') print(plot1, split=c(1,1,2,4), more=TRUE) print(plot4, split=c(2,1,2,4), more=TRUE) print(plot2, split=c(1,2,2,4), more=TRUE) print(plot5, split=c(2,2,2,4),
2011 Nov 18
1
How to fill irregular polygons with patterns?
Hi, I'm looking the best way to fill irregular polygons with patterns, Something like the function grid.pattern do, but my case is with irregular polygons. Whit this script I can get it, but I'm looking for an "elegant" solution.. library(grid) grid.polygon(x=c(0.2, 0.8, 0.6, 0.6, 0.8, 0.2), y=c(0.2, 0.2, 0.3, 0.5, 0.7,0.7), gp=gpar(fill="grey",
2007 Sep 13
1
minimize white space around lattice plot
Dear list, I'm trying to produce a plot via xyplot with minimal sourounding white space. However, I cannot find the options in xyplot, ps.options or wherever which prevents lattice from drawing quite some white space around my plot. However, this is quite a problem for me as I want to produce an inset plot inside another lattice-plot. I'm using the panel function to open a viewport and
2008 Nov 19
1
Buggy trellis.focus() with xyplot ?
Hi: (Tried to find a bug report about this issue, but was unable to find it, let me know if this is a known issue) I have been working on an interface to highlight xyplot panels on mouse overs in JavaGD but I have stumbled with what seems to be a bug in trellis.focus. I am using R 2.8 with lattice 0.17-15 *** To replicate the bug: 1.- display an xyplot. For example, from the xyplot help page: