Why do you take 2.54? I think you forgot a bracket...
#par(mar = c(max(strwidth(names(x)) * 2.54, 4,4,2))
#
#should be
par(mar = c(max(strwidth(names(x))) * 2.54, 4,4,5))
#and 5 would be a better value. But this is merely trial and error?!
Regards
Thomas Kaliwe
Henrique Dallazuanna schrieb:
Try this:
par(mar = c(max(strwidth(names(x)) * 2.54, 4,4,2))
barplot(x, las = 3)
On Mon, Jan 5, 2009 at 2:15 PM, Thomas Kaliwe wrote:
> Dear members,
>
> Is there a way to turn a strwidth of a string into a number of lines that
> ist needed to display the string when using par(mar = c(?,4,4,2)
Dear members,
Is there a way to turn a strwidth of a string into a number of lines
that ist needed to display the string when using par(mar = c(?,4,4,2))
x = 1:5
names(x) = c("Z","Zz","ZZZl","T","Zzhtsddfg" )
par(mfrow = c(1,2))
par(mar = c(8,4,4,2))
barplot(x, las = 3
3 matches
Mail list logo