You can create your own dashed lines:
lty
The line type. Line types can either be specified as an integer
(0=blank, 1=solid (default), 2=dashed, 3=dotted, 4=dotdash,
5=longdash, 6=twodash) or as one of the character strings "blank",
"solid", "dashed", "dotted", "dotdash",
"longdash", or "twodash",
where "blank" uses 'invisible lines' (i.e., does not draw
them).
_Alternatively, a string of up to 8 characters (from c(1:9,
"A":"F"))
may be given, giving the length of line segments which are
alternatively drawn and skipped. See section 'Line Type
Specification'_
On Tue, Jan 13, 2009 at 8:13 PM, jimdare <jamesdare26 at gmail.com>
wrote:>
> Dear R-Users
>
> I have 2 questions:
>
> Firstly, If I create a matplot and legend for multiple vectors and then tag
> another vector on using matlines (e.g. a 'total' of all vectors),
is there
> anyway to add the new line to the legend without recreating it? I have
> created the plot this way because I would like to define the lty and lwd
for
> the 'total' vector so that it can be differentiated from the rest.
>
> Secondly, in many of my black and white matplots there are more than 6
> vectors. Unfortunately it is hard to tell them apart because the line type
> (lty) for plots repeats from 1 again at lty=7. Is there any way I can
> download new line types to avoid this?
>
> Thanks in advance for your help.
>
> Jimdare
> --
> View this message in context:
http://www.nabble.com/Help-with-Plot-Legend-tp21448206p21448206.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org 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.
>
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390
What is the problem that you are trying to solve?