similar to: Y-axis label on the right hand side in lattice?

Displaying 20 results from an estimated 10000 matches similar to: "Y-axis label on the right hand side in lattice?"

2008 Sep 19
1
Axes Labels on the Right side of lattice panel
Hello, My plot has two curves on different scales. To create the scale on the extreme right hand side of a panel I followed the example in panel.axis (in this example, the tick marks are at the same location and labels are the same too) axis=function(side, ... ) { ylim <- current.panel.limits()$ylim if(side=="left"){
2008 Oct 06
1
Lattice and Axis height
Hello, My plots consist of 2 rows, 1 column, many pages I've managed to selectively turn of strips for the bottom panel and roll my own strip for the top par.strip.text = list(lines = c(0,3),cex=0.6) I have my own custom prepanel function too. What i'd like to do is turn off the x-axis for the top panel (since on a given page the xlim is same for both top and bottom panel, but the
2008 Sep 19
1
Lines between panels in lattice
Hello, I have a multi-page display each consisting of two-panels above each other. I need to draw a line from the top panel to bottom panel. Using current.vpTree() i find that "plot1.panel.1.2.vp" and "plot1.panel.1.1.vp" are the top and bottom ones respectively. I am using the following code(inspired by Paul Murrell's R Graphics) to draw a line. (All the
2008 Nov 14
1
Splitting a lattice stripplot across several pages
Hello, I have a stripplot with 200+ labels i.e i have network connections. The y-axis are the server port numbers and am graphing the number of packets in a connection. Roughly stripplot(totpacks~portnum,data=network) Due to the large number of server ports in my dataset, the y-axis labels overlap so I would like to split it across several panels(1 panel per page) with about 25-50 per
2008 Apr 03
1
Question on spacing around plot and box in lattice
Hello, How can i increase the padding between the axis and the data region(box just containing the figure) in xyplot? An example: new <- function(x){ if(x<0){ return(x^2) }else{ return(x) } } x <- seq(-1,1,length.out=100) y <- sapply(x,new) sc=list() sc$alternating=0 sc$tck=0 xyplot(y~x,type='l', aspect=0.05, scales=sc, col='black',
2008 Oct 05
1
Conditioning variables in lattice - not all combinations
Hello, I have a shingle A and B. A has 5 levels and B has 4 levels. Also, I have 8 levels of a factor C. I wish to xyplot( x ~ y | C *A *B,data=data), I think this is how the lattice conditioning works: If i'm not mistaken, all possible combinations of C,A,B , a subset of the data is accordingly taken and x~y is plotted. However, I have empty sets for some levels and these are
2007 Feb 06
1
A question regarding cex and pch="." in lattice
Hello, I'm using lattice and opened an X11 device with the following call X11(width=5,height=5,pointsize=1) I then ran the following code library(lattice) x<-rnorm(30,sd=2) y<-runif(30) xyplot(y~x,pch=".",col="black",cex=1) If i remove "cex=1", not all the points are plotted. From ?X11, i read,"pch='.' with cex=1 corresponds to a
2012 Mar 16
2
Changing axis labels depending on panel in lattice
Hello, I am lattice scatterplot that has 2 panels (could be a few more). Both panels have a y-axis label that is different on the left and right sides. However the right hand side axis labelling depends on which panel i'm in . (I am plotting two curves in one panel, the left y-axis has the scale for the red line and the right y-axis has the scale for the blue line I need to convert the
2008 Feb 17
1
Set length of axes in lattice
Hello, It is possible to set the aspect ratio of the Y-axis to the X-axis in xyplot (a) xyplot(y~x,aspect=1.8) Suppose I have only 1 panel and i wish to set the length of the X- axis to 2" keeping the same aspect ratio as in (a). I would also like to keep the same scales. I suppose i need to do something in prepanel but what? Is there any function i can call to set the actual
2007 Mar 06
1
Substituting functions in package - Lattice
Hi, I'm trying to learn how a package works but substituting a parituclart function with my own (basically the original one with some debug statements). The package is lattice and the method is "print.trellis" which is a S3 method and is not visible. To replace this, i sourced a file with the rewritten print.trellis, and the old one was replaced. However, i get this error
2009 Jan 05
2
eval using a environment X but resultsin .GlobalEnv
Hello, Suppose I have an expression, E, which accesses some variables present in an environment V. I do this via eval(E,envir=V) however all assignments end up in V. I would like the results of assignments in E to end up in the .GlobalEnv ? Or at least the calling environment. Is there a quick way to this instead of iterating over all objects E and assigning into .GlobalEnv? Thank you Saptarshi
2009 Sep 23
2
Crash due to extreme example
Hello, I was trying this bit of code (i know it is an extreme case) g=function(r){ if(r==1) return(list(x=1)) else return(list(x=g(r-1))) } For z=g(500), the code runs but when I print z i.e >> z I get <environment: R_GlobalEnv> *** caught bus error *** address 0x1, cause 'non-existent physical address' Possible actions: 1: abort (with core dump, if enabled)
2008 Nov 30
1
Rserve and creating a list of lists
Hello, I have some code which generates lattice objects. The function recieves serialized forms of the lattice objects which it then unserializes and then adds to an ArrayList<REXP>. REXPRaw rser = new REXPRaw( target ); //target contains the raw serialized forms of lattice objects rconn.assign("temp",rser); REXP ret =
2007 Dec 10
1
lattice: placing y-axis labels on right-hand side of panel when relation="sliced"
Hello, I'm using lattice to create a multi-panel figure. I would like to draw each panel's y-axis ticks and labels on the right-hand side of the panel. Ordinarily, I would do this by specifying scales=list(y=list(draw=T, alternating=2)). But in this case, I am using relation="sliced" to determine the y-axis limits. So "alternating" is ignored. Is there any
2008 Dec 12
1
Writing a Long across the network?
Hello, I have to write single Long to a server written in java. The server passes the input as in.readLong() // it expects to receive 8 bytes In Python, i can do it by sending struct.pack( "!q", value) However, I have tried this writeBin(length(x),con=conn,endian="big") #conn opened in binary But the response on the server side is wrong, eg. 1 is received as
2009 Aug 14
1
Embed R, and provide a function to user scripts
Hello, I'm not sure how to go about this. Suppose I have a function SEXP boo(SEXP x){ //do something } Also, I have an executable which embeds R in itself. I would like to provide a R function to user code to call that calls 'boo' e.g ##user supplied expression that is given to me x<-1 boo(x) One way is to create a library with function boo that performs .Call to boo, but is
2009 Sep 20
1
Return a list from a .Call but segfaults
Hello, I call a function via .Call passing to it a raw vector(D) and an integer(I) The vector is a series K1,KData1, V1,VData1, K2, KData2, ... where the integer K1 is the length of Data1 and similarly for Ki (wrt Datai)(similarly for V*) There 2*I such pairs( (Ki,KDatai), (Vi,VDatai)) The numbers Ki(and Vi) are written in network order. I am returning a list of I elements each element a
2010 Feb 14
4
Feature Request: Multiline Comments
Hello, Is it possible to extend the R lexer/parser to include multiline comments like /* acomment */ ? This way I can integrate emacs org-mode with my R code, so that I can have a table of contents, section folding, html-output of source etc. e.g /* * Display Code */ #+BEGIN_SRC R foo <- function(...){ stuff } #+end_src and so on . Thanks Saptarshi
2009 Dec 01
4
Package is loaded but functions are not exported
Hello, I wrote a package, which in the NAMESPACE file exports functions like this: exportPattern("^\\rh") On R-2.8 (Linux, 64), upon loading the package I have the rh functions present. On R-2.10, Mac OS X, (32 bit), it builds, loads, but the functions are not loaded, i.e the only function is rhyper (which is not from my package). Is there something wrong with my package setup?
2009 May 10
2
In C, a fast way to slice a vector?
Hello, Suppose in the following code, PROTECT(sr = R_tryEval( .... )) sr is a RAWSXP vector. I wish to return another RAWSXP starting at position 13 onwards (base=0). I could create another RAWSXP of the correct length and then memcpy the required bytes and length to this new one. However is there a more efficient method? Regards Saptarshi Guha