Displaying 3 results from an estimated 3 matches for "myyscal".
Did you mean:
myyscale
2008 May 06
1
Spacing between lattice panels
I'm trying to set up a lattice plot with two y-axes for each panel. (Yes,
I know that multiple y-axes are generally a bad idea; the graph is for
someone else and they want it that way.) I've used a custom
yscale.component in xyplot to achieve this:
myyscale.component <- function(...)
{
ans <- yscale.components.default(...)
ans$right <- ans$left
foo <- ans$right$labels$at
ans$right$labels$labels <- as.character(10*foo)
ans
}
xyplot(Sepal.Length ~ Petal.Length| Species, data = iris, scales =
list(y=list(relation="free&q...
2010 Mar 29
1
xyplot second y-xis and legend
...RUE,
text=LETTERS[1:4]))
#to set a second y-axis with an other scale:
# convert data to proper scale:
inp3[which(inp3$group=="A"|inp3$group=="B"),"val"]<-inp3[which(inp3$group=="A"|inp3$group=="B"),"val"]*3
# set second y-axis
myyscale.component <- function(...)
{
ans <- yscale.components.default(...)
ans$right <- ans$left
foo <- ans$right$labels$at
ans$right$labels$labels <- as.character((0.3)*foo)
ans
}
#plot with second y-axis. This does not work:
xyplot(val~GF,groups= group, data=inp3,type="o...
2008 Sep 05
1
controlling lattice plot ticks with relation="free"
How do you persuade lattice to draw tick marks on both the left and right
side of the y-axis, when relation="free" in the scales component?
#Ticks appear on both sides
histogram(~height|voice.part, data=singer)
##Ticks only on left
histogram(~height|voice.part, data=singer,
scales=list(y=list(relation="free")))
Providing tck as a vector of length 2 doesn't seem to