[R] lattice: cloud: aspect ratio, labels, vertical lines
Wolfram Fischer
wolfram at fischer-zim.ch
Wed Jan 15 12:13:05 CET 2003
I am interested to know how to make for clouds:
- aspect ratio = 1
- labels attached to points
- vertical lines from the points to the x/y base plane
I tried:
t = c( 'A', 'B', 'C', 'D' )
x = c( 100, 0, 200, 100 )
y = c( 0, 100, 0, 100 )
z = c( 80, 0, 20, 40 )
q = data.frame( x, y, z )
rownames( q ) = t
print(cloud( z ~ x * y, data = q, type = c( 'p', 'h' )
, scales = list( arrows=FALSE )
, aspect = c( max(y)/max(x), max(z)/max(x) )
))
My questions:
- Is there an easier way to tell that aspect ratio should be 1
on all dimensions, especially without the precalculations
of max(...)?
- "type = 'h'" does not work as I expected. What to do?
- How can I get the labels of t into the graphic?
Thanks
Wolfram
More information about the R-help
mailing list