[R] Help with doing overlays plots...

2005-08-08 Thread Jamieson Cobleigh
I have a data frame with three columns, type (a factor with two values: Monolithic and Compositional), size (numeric), and states (numeric). I want to create a plot where size goes on the x-axis and states goes on the y-axis. In this plot, I want two lines, one where the type is Monolithic and

[R] Saving trellis output to files in scripts...

2005-08-09 Thread Jamieson Cobleigh
With much help from Chuck Cleland, I was able to get xyplot to generate the plot I wanted. I'm trying to write a script (that can be read using source(file)) to create the plots I want and save them to files. If I type the following lines into the R (in interactive mode), the correct plot gets

Re: [R] Saving trellis output to files in scripts...

2005-08-09 Thread Jamieson Cobleigh
Thanks, that worked. I see now where it says that in the help for xyplot, however, it wasn't obvious to me before. Jamie On 8/9/05, Liaw, Andy [EMAIL PROTECTED] wrote: This is in the FAQ: You need to wrap any trellis calls in functions or scripts in print(). Andy From: Jamieson

[R] Labels on axes with log scales with lattice

2005-08-14 Thread Jamieson Cobleigh
I using lattice to make some plots and I want to make the y-axis on some of these plots use a log scale. In the following plot: x - 1:10 y - 2^x xyplot(log10(y) ~ x) I get tick marks on the y-axis at 0.5, 1.0, 1.5, 2.0, 2.5, and 3.0. I would rather have just 3 tick marks at 1.0, 2.0, and 3.0

[R] Spacing and margins in plot

2005-09-01 Thread Jamieson Cobleigh
If I use the following command to plot points: plot(c(1,2,2,3,3,3), type=p, pch=20, ylab=Y Label, xlab=X Label, xaxt=n) there is a large amount of space between the label X Label and the actual x-axis. If I change the xaxt=n to xaxt=s, the label X Label don't move at all. Is there a way to get

Re: [R] Spacing and margins in plot

2005-09-01 Thread Jamieson Cobleigh
) hope it helps, Chuck Jamieson Cobleigh wrote: If I use the following command to plot points: plot(c(1,2,2,3,3,3), type=p, pch=20, ylab=Y Label, xlab=X Label, xaxt=n) there is a large amount of space between the label X Label and the actual x-axis. If I change the xaxt=n

[R] Spacing and margins in lattice...

2005-09-01 Thread Jamieson Cobleigh
Similar to my last question, I want to tighten up the spacing and margins in a plot I am doing with lattice. Here are the commands I'm using: data - data.frame(x=c(1:3, 1:3), y=c(1:3, 1:3*2), cat=c(foo,foo,foo,bar, bar,bar)) xyplot(panel=panel.superpose, y~x, data=data, groups=cat, type=b,

Re: [R] Spacing and margins in lattice...

2005-09-01 Thread Jamieson Cobleigh
That did the trick. Thanks! Jamie On 9/1/05, Sundar Dorai-Raj [EMAIL PROTECTED] wrote: Jamieson Cobleigh wrote: Similar to my last question, I want to tighten up the spacing and margins in a plot I am doing with lattice. Here are the commands I'm using: data - data.frame(x=c(1

Re: [R] Copying from graphics window in OS X

2005-09-15 Thread Jamieson Cobleigh
You can try FreeSnap, a screen capture program for OS X: http://www.efritz.net/software.html Also, why are you running R from an XTerm? There is an OS X native version of R that might be better integrated with OS X for doing screen captures: http://cran.stat.ucla.edu/bin/macosx/ Jamie

Re: [R] Copying from graphics window in OS X

2005-09-15 Thread Jamieson Cobleigh
I just tried using Ctrl-C to do a copy a plot from a graphic window using the Cocoa version of OS X that you can download from the link below and I was able to paste the plot into a document. Jamie On 9/15/05, Jamieson Cobleigh [EMAIL PROTECTED] wrote: Also, why are you running R from an XTerm

[R] Setting the colors of lines in a trellis plot...

2006-07-10 Thread Jamieson Cobleigh
With some help from those with expertise on this list, I managed to produce a plot using trellis that looked like I wanted it to look. Now, I need to take the same plot and make the lines on it color, but I want to specify the color for the lines myself. I've managed to make the key use the

Re: [R] Setting the colors of lines in a trellis plot...

2006-07-10 Thread Jamieson Cobleigh
. cut your example down to a *minimal* size and 2. provide it as *self contained* and 3. *reproducible* code. On 7/10/06, Jamieson Cobleigh [EMAIL PROTECTED] wrote: With some help from those with expertise on this list, I managed to produce a plot using trellis that looked like I wanted

[R] Width of bars in barplot2

2006-03-01 Thread Jamieson Cobleigh
I'm using barplot2 to plot some data. Is there any way to determine the width of the bars in the generated plot? I know that barplot2 returns a list of the coordinates of the center of each bar, but since there is some white space between each bar, I don't know how to get the width of each bar.

Re: [R] Width of bars in barplot2

2006-03-01 Thread Jamieson Cobleigh
Thanks. That was all I needed. Jamie On 3/1/06, Marc Schwartz (via MN) [EMAIL PROTECTED] wrote: Unless you have modified the 'width' argument, the default width is 1. Thus the sides of the bars are the centers +/- 0.5. If you modified the width argument, then the widths are set to the

[R] R plots in PowerPoint

2006-03-03 Thread Jamieson Cobleigh
I have some plots that I generating using R (using trellis, plot, and barplot2) that I want to include in a PowerPoint presentation I am giving. My computer is running OS X. I find that presentations are easier to read when there is light text on a dark background and would like to generate

[R] Adding polygons to a barplot

2006-03-08 Thread Jamieson Cobleigh
I have a barplot I have created using barplot2 and I have been able to add points and lines (using the points and lines methods, respectively). I now need to add some polygons (triangles in particular), that I want to be shaded to match bars in the plot. I can get the coordinates of the corners

Re: [R] Adding polygons to a barplot

2006-03-08 Thread Jamieson Cobleigh
Thanks! That worked. Jamie On 3/8/06, Marc Schwartz (via MN) [EMAIL PROTECTED] wrote: On Wed, 2006-03-08 at 14:02 -0500, Jamieson Cobleigh wrote: I have a barplot I have created using barplot2 and I have been able to add points and lines (using the points and lines methods, respectively