Hi R-ers:

I'm drawing a plot and have used different line types (lty) for
different race/ethnicity groups. I want a legend that explains what line
types correspond to the different race/ethnicity groups. I used the
following code:


legend( 1992 , 42  , c("Hispanic" , "non-Hispanic white (NHW)" ,
"non-Hispanic black" , "AI/AN" , "Asian" ) , lty=1:5 ,cex = .6 , bty='n'
)

Guess what? The legend "box" was so narrow that the line types that show
up in that legend box look essentially the same, because they are short.
I.e, although a line type might be a long dash followed by a short dash,
only the long dash shows up in the box. The consequence of this is that
the race/ethnic group that corresponds to the line type that is only a
long dash cannot be distinguished from the legend.

How do I stretch that legend box out so as to allow lty to draw longer
line segments?

Please reply to: [EMAIL PROTECTED]

Many thanks!
Phil Smith
Centers for Disease Control and Prevention

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to