Displaying 20 results from an estimated 10000 matches similar to: "Vector lty argrument for lines or plot"
2009 Jan 22
5
Combining Custom and Preset Linetypes
Dear R-Users,
I created the xyplot below using 10 groups (9 groups + 'Total' of all
groups) with lty=1:10. I need the 'Total' to be a bold solid line (lty=1)
where as the 9 groups just need to be distinguishable from each other. As
you can probably see, when the group reaches CRA6 the lty starts from 1
again. I have tried to specify ten unique lines using lty=
2009 Jan 22
1
Defining Solid Line using Line Type Specification
Dear R-Users,
I created the xyplot below using 10 groups (9 groups + 'Total' of all
groups) with lty=1:10. I need the 'Total' to be a bold solid line (lty=1)
where as the 9 groups just need to be distinguishable from each other. As
you can probably see, when the group reaches CRA6 the lty starts from 1
again. I have tried to specify ten unique lines using lty=
2010 Oct 25
1
Sweave and absolute escaped backslashed Windows paths in R 2.12.0
I've noticed a change in behavior in R 2.12.0 from 2.11.1 regarding the
treatment of absolute paths in the file argument of Sweave in a Windows
environment.
Consider the minimal Rnw file, attached and reproduced below my
signature in case .Rnw files get stripped. This file is stored on my
(Windows) computer in H:/My Documents. Using an absolute path with the
standard window's
2011 Dec 01
2
legend, "lheight", and alignment
Hello,
A bit of fairly simple code, yet I don't seem to be able to manipulate it
quite as much as I would like:
1) It would be nice if the objects appearing in the legend were aligned,
and by aligned I mean the boxes are centered over the lines. Do I need to
adjust the use of "NA" in the code below to accomplish this? Here's how it
appears on my machine:
2001 Jul 20
0
problem with printing lines with lty
I'm running R 1.3 on WinNT.
When I plot lines with different linetypes e.g.:
x<-matrix(rnorm(50),,5)
plot(c(1,10),c(min(x),max(x)),type="n")
for(i in 1:5) lines(x[,i],lty=i+1)
legend( locator(1),legend=as.character(1:5),lty=2:6,ncol=2)
I see the lines clearly on my screen. When printing them through R, I can
see nearly no difference between them. When using another program
2010 Feb 01
1
Error with cut.POSIXt and daylight savings time switchover dates
The following code:
cut(as.POSIXct("2009-11-01 04:00:00", tz="America/Los_Angeles"), "1 day")
gives the error:
Error in seq.int(0, to - from, by) : 'to' must be finite
This is related to November 1st, 2009 being the switchover date from daylight savings time to standard time in the America/Los_Angeles time zone. In particular, in cut.POSIXt, the starting
2001 Feb 01
1
postscript and lty
To the plot experts:
when creating a plot containing different lines, each with a special line
type, it may happen that the result of 'postscript()' is not readable by
ghostview (which may not be an R error, thus not bug report ;-).
This is the case when mixing lty as 0:6 and character or even when
using lty as character only.
Example:
postscript("test.ps")
plot(1:10,
2011 Nov 14
2
arrow egdes and lty
Dear R developers,
I want to draw an arrow in a figure with lty=2. The
lty argument also affects the edge of the arrow, which is
unfortunate. Feature or bug?
Is there some way to draw an arrow with intact edge, still
with lty=2?
Example code:
plot(1:10)
arrows(4, 5, 6, 7, lty=2)
Best wishes,
Matthias
--
2005 Dec 16
2
dendrogram branches with different lty
Dear r-list,
I am trying to visually seperate the two main clusters of a dendrogram.
The idea is to use:
'edgePar=list(lty=3)' for 'dend1[[1]]' and
'edgePar=list(lty=1)' for 'dend1[[2]]'
I have not found a way to solve this. Any suggestions?
Patrick
hc <- hclust(dist(USArrests), "ave")
(dend1 <- as.dendrogram(hc))
par(mfrow=c(2,2))
plot(dend1)
2003 May 21
1
axis() default values for "lty", "lwd", and "col"
Hi,
I would like to recommend a minor modification in axis() which I believe
can simplify the making of plots for publications. I am trying to define
default values for par() in order to make labels bigger and lines thicker,
so that the resulting plots look good when resized for publication
purposes. I ran into the following problem...
axis() does not use par() values as default for
2015 May 18
2
A "bug" in plot.dendrogram - can't plot lty with character color
The problem:
===========
Once a dendrogram has a branch with both a line type AND a color (which is
a character color), the plot.dendrogram function will not plot and return
an error.
I say this is a bug because (I believe), we would like a dendrogram to be
able to use character colors, while also allowing control over line types.
This e-mail includes an example, and what I think a solution
2007 Nov 08
1
Mixing lty specifications in legend
Hi all
I have a plot with lines, one specified as (say) lty=1,
using standard line types, and another as (say) my
own spec: lty="51".
I can't get legend to display both. Toy example:
> plot(1~1)
> legend("topright", lty=c("51",1), legend=c("My own","Standard"))
Error in segments(x1, y1, x2, y2, ...) : invalid line type: must be
2010 Oct 10
2
Line Type Specification: lty="<on><off>" but lty="<off><on>"?
Hi,
Section 'Line Type Specification' in help(par) explains how you can do
custom line types. For example:
plot(NA, xlim=c(0,1), ylim=c(0,1));
abline(h=1/2, col="blue", lwd=2, lty="88");
will draw a dashed line segment where the line is composed of 8 units
of "on" (blue color) and 8 units of "off" (transparent), then
repeated.
Now I'd like
1998 Jun 03
4
lty
I find, viewing the output with ghostview, that lty="2","3", or "4" gives
the same dashed line. So basically you have choice of solid ("1") or
dashed ("2","3","4").
If this is not implemented yet, maybe the docs should reflect it?
Hmm now I tried plotting with both lty="2" and lty="3" for two separate
2011 Apr 21
3
line type lty
Hi All,
Does somebody know how to know the detail of the line types? For example, lty = 1, means what kind of line?, lty = 2, means what kind of line?
Thanks.
HXD
[[alternative HTML version deleted]]
2009 Oct 08
2
lattice: passing multiple lty values to the key/legend
hi all,
It's not clear to me how (or if) I can pass multiple values for lty to a key in xyplot?
I've tried: lines=list(lty=1:3), to no avail.
Do I need to use something other than auto.key?
(Deepayan, if you're out there, I have your book and must admit the answer isn't jumping out at me.)
thanks in advance!
Michael Folkes
example code:
#____________________________
2008 May 16
1
xyplot: subscripts, groups and subset
I have stumbled across something in the Lattice package that is vexing me.
Consider the code below:
__________________________________________________________
library(lattice)
myData <- expand.grid(sub = factor(1:16), time = 1:10)
myData$observed <- rnorm(nrow(myData))
myData$fitted <- with(myData, ave(observed, sub, FUN = mean))
myData$event.time <- with(myData, ave(observed, sub,
2003 Mar 12
1
plot() with type="s" and lty=2 (PR#2630)
Full_Name: Jerome Asselin
Version: 1.6.2
OS: RedHat Linux 7.2
Submission from: (NULL) (142.103.173.179)
In the following example, the line type lty=2 does not show properly
across the entire line.
x <- c(seq(0,.5,.001),seq(.6,1,.1))
y <- rep(1,length(x))
plot(x,y,type="s",lty=2)
Sincerely,
Jerome Asselin
2010 Feb 11
1
Sweave, lty = 3 line incorect in pdf output
I'm having a problem with dotted lines (lty = 3) in the pdf output
in documents generated with Sweave. In the displayed pdf, the
dotted line does not show up and in the printed output, it is
there but does not seem to respect the lwd argument, for example, it
is very faint despite using lwd = 3. The dotted line is correct
in a quartz window and if I save the Quartz window to a pdf
and
1999 Mar 10
1
lty=2
On Wed, Mar 10, 1999 at 03:14:08PM +0000, Simon Bond wrote:
> Dear all,
>
> I'm using R 63.2 on windows NT, when I use
>
> > lines(x,y, lty=2)
>
> it produces a dashed line between the first pair of points and then reverts
> back to a solid line. It produces different colours perfectly ok, but it's
> not really a solution when the plot needs to be printed