P??r Matsson wrote:> Hi! Probably a simple question, but I can't get any tick marks in the
3d
> scatterplot I created using the cloud function.
>
> The following works to display the three groups using different symbols:
>
> data(iris)
> cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris, cex = 1.2,
> groups = Species, pch = c(16,1,1), col =
c("black","black","red"),
> subpanel = panel.superpose, screen = list(z = 50, x = -80, y = 0),
> par.settings = par.set)
>
> What should I add in order to get tick marks on the x, y, and z axes? I
> would like to use this for my own data, with tick marks preferably at
> defined positions [in original scale] for each axis.
help(cloud) says:
scales: describes scales. Can contain lists named x, y and z. Arrows
are drawn if 'arrows=TRUE', otherwise tick marks with labels
are drawn. Both can be suppressed by 'draw=FALSE'. Several
other components that work in the usual 'scales' argument
also work here (see 'xyplot').
(which I guess could use a bit more work). So you need to add
scales = list(arrows = FALSE)
to your cloud call. For finer control, you really need to read the entry
for scales in help(xyplot), after which the following should make sense.
cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris,
scales = list(arrows = F, x = list(at = 3:5)))
Deepayan