Displaying 2 results from an estimated 2 matches for "xydf".
Did you mean:
xpdf
2008 Jun 30
1
Lattice : Single reference line/label at 0.05
r-friends--
I am trying to make a lattice plot with a single label at 0.05. A reference line at y=0.05 as well... This is what I have so far. The label reads 0.0 and there is a grid instead of a single reference line. Can someone help please?
Troy
x<-18:35
(pv<-1/(x-17))
xydf<-data.frame(x, pv)
print(xyplot(pv~x, data=xydf, type=c('p', 'g'),
ylim=c(0,1),
yscale.components= function(lim, ...) {
ans <- yscale.components.default(lim = lim, ...)
ans$left$ticks$at <- c(0.05)
ans$left$ticks$labels$at <- c(0.05)
ans$left$ticks$la...
2008 Mar 27
2
Rule for accessing attributes?
...amed list 'lst', but why
then this doesn't work:
lst$names
?
I am confused ... Moreover, I noticed that some of the objects (e.g.
plot objects returned by ggplot) also have attributes when queried by
the 'attributes' function, but they are accessible by the $ notation.
(e.g.
xydf <- data.frame(x = 1:5, y = 11:15)
plt <- ggplot(data = xydf, aes(x = x,y = y)) + geom_point()
attributes(plt)
Now we can change the title:
plt$title <- "My Title"
plt
So is it some inconsistency or am I missing something important?