[R] auto.key and simpleTheme

2012-02-02 Thread Marcin Kozak
Dear all, parallel(~iris[1:4], groups = Species, iris, par.settings = simpleTheme(lwd = c(1,3,1), lty = c(1,1,2), col.line = 1), auto.key = T) Despite the use of par.settings and simpleTheme, the lines in the key and graph are not the same. Any suggestions why? Regards, Marcin

[R] Double expressions in plot labels

2012-01-22 Thread Marcin Kozak
Hi all, I wanted to do something of this sort: library(lattice) label - expression(alpha) xx - substitute(expression(lab %+-% type), list(lab = label, type = type)) stripplot(Species ~ jitter(Petal.Length), iris, ylab = xx, horizontal=T) (The example plot itself does not make much sense, but I

Re: [R] Plot's aspect ratio and pty

2010-12-13 Thread Marcin Kozak
On 13.12.2010 07:30, Marcin Kozak wrote: Dear All, I've been playing with pty, and it seems it does not produce square plots as it is expected to (or at least as I expect it to). Consider this simple example: par(pty=s); plot(1:10, 1:10) This should produce a square plot, right? Well

[R] Plot's aspect ratio and pty

2010-12-12 Thread Marcin Kozak
Dear All, I've been playing with pty, and it seems it does not produce square plots as it is expected to (or at least as I expect it to). Consider this simple example: par(pty=s); plot(1:10, 1:10) This should produce a square plot, right? Well, if you have a look at the graph, it is not square!

[R] The width argument of stem()

2010-10-13 Thread Marcin Kozak
Dear all, The help page of stem() says that the width argument gives the desired width of plot. However, I cannot come up with any idea what this width stays for. This becomes especially difficult if you run these couple of examples: The decimal point is 3 digit(s) to the right of the | 0 |

[R] Updating a hexbinplot

2010-02-25 Thread Marcin Kozak
Dear all, Considering this simple example of hexbinplot: mixdata - data.frame(x = c(rnorm(5000), rnorm(5000,4,1.5)), y = c(rnorm(5000), rnorm(5000,2,3)), a = gl(2, 5000)) fig - hexbinplot(y ~ x | a, mixdata) print(fig) update(fig, colramp = BTC) produces a

[R] Setting base level for contrasts with lme

2010-01-28 Thread Marcin Kozak
Hi all, Note: lm(Yield ~ Block + C(Variety, base = 2), Alfalfa) equals i - 2; lm(Yield ~ Block + C(Variety, base = i), Alfalfa) However, lme(Yield ~ C(Variety, base = 2), Alfalfa, random=~1|Block) which is fine, does not equal i - 2; lme(Yield ~ C(Variety, base = i), Alfalfa, random=~1|Block)

[R] Comparing regression lines

2009-09-29 Thread Marcin Kozak
Hi, How would you compare several (simple) regression lines in R? Have you heard of any implementation of the Johnson-Neyman procedure or anything of this sort? Any suggestions? Best, Marcin __ R-help@r-project.org mailing list

[R] xyplot: no ticks for a factor scale?

2009-05-12 Thread Marcin Kozak
Hi, I would like to have no ticks on a scale that represents a factor. The tick.number argument from scales does not work in such a situation, as the help page as well as this simple (fairly stupid) code show: require(lattice) fact-gl(4,1,labels=LETTERS[1:4]) y-c(1,4,3,2)

[R] Truncated labels with mosaicplot

2009-02-10 Thread Marcin Kozak
How can I deal with truncated labels in the mosaicplot()? Look at the example: mosaicplot(~ gear + carb, data = mtcars, color = TRUE) Look at carb (the number of carburetors): the label 8 is truncated. How this might be dealt with? Thanks in advance, Marcin

[R] Loess fitting with bisquare

2009-01-22 Thread Marcin Kozak
Hi, It seems there is no straightforward way to carry out in R the loess fitting with bisquare, as given by William Cleveland in his Visualizing Data. Am I right? Thanks in advance, Marcin -- Build up your weaknesses until they become your strong points -- Knute Rockne

[R] Dendrogram with the UPGMA method

2009-01-17 Thread Marcin Kozak
Hi, I am clustering objects using the agnes() function and the UPGMA clustering method (function = average). Everything works well, but apparently something is wrong with the dendrogram. For example: x-c(102,102.1,112.5,113,100.3,108.2,101.1,104,105.5,106.3)

[R] A ternary graph's scales

2008-09-04 Thread Marcin Kozak
Hi all, I am drawing a ternary graph. Everything is fine with both ternaryplot (package vcd) and triangle.plot (package ade4), but I want to present scales in neither percents nor from 0 to 1 (this is actually the only option I found in both functions). I want the scales to be in a natural scale

Re: [R] A ternary graph's scales

2008-09-04 Thread Marcin Kozak
PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcin Kozak Sent: Thursday, September 04, 2008 8:34 AM To: r-help@r-project.org Subject: [R] A ternary graph's scales Hi all, I am drawing a ternary graph. Everything

[R] Point size problem

2008-06-26 Thread Marcin Kozak
Hi all, I have a simple question and couldn't find any post on this. When plotting simple scatterplots (other plots as well), e.g., x-rnorm(30, 10, 1) y-rnorm(30, 10, 1) plot(x, y, pch = 15, cex = 1), the points, even those close to each other, may have visibly different sizes. Do you know

Re: [R] Point size problem

2008-06-26 Thread Marcin Kozak
Sorry. I'm using Windows XP and R 2.7.0, and the same problem occurred for various graphics devices (windows, pdf, jpeg). Marcin On Thu, Jun 26, 2008 at 11:54 AM, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Thu, 26 Jun 2008, Marcin Kozak wrote: Hi all, I have a simple question

[R] Book on R graphics

2008-06-14 Thread Marcin Kozak
Hi all, I am looking for a book from which one could learn a wide range of graphics in R, from the very beginning topics to those advanced (though not necessarily concerned with a particular method or topic). I don't look for a list of such books since this is on R's web page, I am rather

[R] Italics in plot main title

2008-06-02 Thread Marcin Kozak
Hi, I am drawing several plots and want to have italics in a main title; this is easy with expression(). However, I want also to add a value to it, say n_i, that depends on an ith plot. For this I am using paste(). An example: n_i = 10, 20, 30; I want to draw a plot for each i with the title:

[R] EM algorithm for multiple-locus haplotypes frequencies

2008-04-11 Thread Marcin Kozak
Hi all, I've been looking in R for an EM algorithm adjusted for multiple-locus haplotypes frequencies, but failed in 100%. Has anyone heard of anything of this kind in R? Thanks in advance, Marcin __ R-help@r-project.org mailing list

[R] Drawing several pictures on a plot

2008-02-22 Thread Marcin Kozak
Hi, I want to draw several pictures on one plot and do as follows: xy-matrix(rnorm(100,100,10),50) op - par(mfrow = c(2, 2), pty = s) plot(xy,ann=F);plot(xy,ann=F);plot(xy,ann=F);plot(xy,ann=F) par(op) What I need now is to set the size of the pictures within this plot since there is too much

[R] Labels in plot()

2008-02-22 Thread Marcin Kozak
Hi, Look here: xy-matrix(rnorm(100,100,10),50) plot(xy,ann=F,labels=F) Even though the error is reported, the labels do what I want them to. Any reason for this? Thanks, Marcin __ R-help@r-project.org mailing list

[R] Controling width of boxes in boxplots

2008-02-15 Thread Marcin Kozak
Hi, I want to add boxplots to a scatterplot: plot(x,y, xlim=c(80,120),ylim=c(80,120)) boxplot(y,add=TRUE,at=118) boxplot(x,add=TRUE,at=118,horizontal=TRUE) How can I control the width of the boxes (say, I'd like them to be of width 3 in the variables' scales). I've tried the width parameter but

[R] Drawing a loess line

2008-02-03 Thread Marcin Kozak
Dear all, To draw a lowess line on a plot was a piece of cake; to draw a loess line, however, seems not that easy. Is the loess plotting implemented at all in relation to the loess function, or do I have to look in add-on packages? Thanks, Marcin __

Re: [R] Drawing a loess line

2008-02-03 Thread Marcin Kozak
, 1.09) plot(x,y,xlim=c(0.4,2.5)) fit-loess(y~x) lines(predict(fit), col=blue) Marcin On Feb 3, 2008 9:37 PM, Henrique Dallazuanna [EMAIL PROTECTED] wrote: Try this: cars.lo - loess(dist ~ speed, cars) with(cars, plot(speed, dist)) lines(predict(cars.lo), col=blue) On 03/02/2008, Marcin

Re: [R] Drawing a loess line

2008-02-03 Thread Marcin Kozak
) On Feb 3, 2008 3:29 PM, Marcin Kozak [EMAIL PROTECTED] wrote: Dear all, To draw a lowess line on a plot was a piece of cake; to draw a loess line, however, seems not that easy. Is the loess plotting implemented at all in relation to the loess function, or do I have to look in add

[R] Vertical text in a plot

2007-12-06 Thread Marcin Kozak
Hi, Consider this simple plot: plot(1:25,runif(25,0,1),ylab=First Y-axis label,xaxt=n) I want to add an additional axis as axis(4,at=seq(0.2,1,.2), labels=1:5) I have no idea how to add now the title of the new axis as Second Y-axis label. I want this text to be vertically directed from