[R] how to add different type of lines (short dash, long dash) into current plot)
Greg.Snow at imail.org
Mon Apr 14 22:59:37 CEST 2008
The "type" argument to plotting functions determines the type of plot
(plot lines or points or both or ...). To specify the type of line you
need to use the "lty" argument. See the help page for "par" (?par) for
details on the types of line you can use (also "lwd" is the width of the
But you should note that the human eye is drawn to contrasts and
therefore using dashed and dotted lines will sometimes distract the
viewer or require more work to understand the main points of the plot.
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
greg.snow at imail.org
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of Xin
> Sent: Monday, April 14, 2008 1:45 PM
> To: R-Help
> Subject: [R] how to add different type of lines (short
> dash,long dash) into current plot)
> I try to add three different lines (solid, short dash,
> long dash) in to current barplot. I saw there are types of
> lines ("p","b", ect). However, they are not what I request.
> Has nayone have this experience?
> Many Thanks!
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help