Displaying 20 results from an estimated 40000 matches similar to: "Lattice: Customizing point-sizes with groups"
2009 May 08
1
centering axis labels in lattice
Hello,
I'm attempting to alter the location of text in my axis labels in
lattice plots and have been unsuccessful so far. For example, the
y-axis labels are always right-justified, but I would like them to be
horizontally centered.
Here's an example:
library(lattice);
# create fake dataset to plot
to.plot <- data.frame(
x = 1:5,
y = c("1\nAAA", "2\nBBB",
2002 Dec 12
1
lattice/points and pch="c" inconsistencies
Hi,
The current lattice/grid packages seem to position character
plotting symbols (e.g., ".") differently than the base function
points. The following shows what I mean:
## plain old points() positions the pch="." right at y = c(0,1),
## and thus abline(h = c(0,1)) completely hides the points "."
## (provided the output device has enough resolution, like
2002 Dec 19
1
lattice and display
Hi,
I have just started using lattice and it looks great. But I already have 3
questions about xyplot display.
----------------------------------------------------------------------------
---------------------------------
1.I would like to create two differeny xyplot with different color to
identify my different groups but I have trouble applying colors.
Here are the scripts
2013 Mar 12
2
Specifying point symbol fill colour in lattice xyplot keys
Dear all,
When defining explicit keys with xyplot, I have previously used the fill
parameter to set the background colour of point symbols. That's no
longer working for me, and I am wondering whether it's a bug or whether
I've misinterpreted the documentation and have been relying on a feature
wasn't intended. If the latter, can anyone suggest the correct way to do it?
2013 Feb 08
3
Border width on symbols plotted with the lattice package
Dear list members,
I can't figure out how get 'xyplot' or 'dotplot' in the 'lattice'
package to respect the 'lwd' value for specifying the border with for
*symbols* (for lines it works fine). Example:
-----
# Base graphics works fine (gives a 'fat? circle)
plot(5, cex=10, pch=21, lwd=10)
# But 'xyplot' or 'dotplot' doesn't
2017 Jan 21
2
problema con grafico lattice ....
Hola,
Por si lo quieres con colores rellenando cada punto:
#----------------
library(data.table)
library(lattice)
dat <- read.table("pba.csv", header=TRUE, dec=",", as.is=TRUE)
row.names(dat) <- NULL
dat <- as.data.table(dat)
dat$mycol <- ifelse(dat$sol =="ControlAE", "red", dat$sol)
dat$mycol <- ifelse(dat$mycol
2024 Sep 13
1
how to specify point symbols in the key on a lattice dotplot
For me, Bert's suggestion produces a plot with two black symbols above
the plotting region, a circle and a triangle, both filled, and no text.
This, in which I specify several features of the symbols in the key,
dd %>% dotplot( segment ~ transit_time, groups = impact, data = .,
pch = 16:17,
col = 1:2,
cex = 1.8,
scales =
2007 Aug 30
2
Additions to xyplot (lattice)? - legend, ticks, axis label size, text
I have created an xyplot of a time series with the following code...
win.graph(width = 10, height = 7)
panel1 = function(x, y) {
panel.loess(x, y, lwd=2.5, span=0.5, col="gray")
panel.xyplot(x, y, pch=19, col="blue", cex=1.25)
}
xyplot(oneplusdensity ~ year, data=figdata, aspect="fill", cex=1.5,
xlab=NULL, ylab=expression("Crabs per
2024 Sep 14
1
how to specify point symbols in the key on a lattice dotplot
On Fri, 13 Sept 2024 at 23:36, Christopher W. Ryan
<cwr at agencystatistical.com> wrote:
>
> For me, Bert's suggestion produces a plot with two black symbols above
> the plotting region, a circle and a triangle, both filled, and no text.
>
> This, in which I specify several features of the symbols in the key,
>
> dd %>% dotplot( segment ~ transit_time, groups =
2012 Jan 13
1
plotting regression line in with lattice
#Dear All,
#I'm having a bit of a trouble here, please help me...
#I have this data
set.seed(4)
mydata <- data.frame(var = rnorm(100),
temp = rnorm(100),
subj = as.factor(rep(c(1:10),5)),
trt = rep(c("A","B"), 50))
#and this model that fits them
lm <- lm(var ~ temp * subj, data = mydata)
#i want to
2007 Nov 20
2
Adding points on top of lines in xyplot
All,
I'm trying to make a basic plot: data points superimposed upon the a line
connecting the points w/ a different color. Example below doesn't work as
the first xyplot call doesn't remain. Suggestions?
David
Hour = c(NA,1,2,3,4)
y = c(2,2,3,2,1.5)
xyplot(y ~ Hour, xlab = list("Hour", font=2, cex=2), ylab= list("U_x * V",
font=2, cex=2), type = 'l',
2011 Jan 27
1
How to xyplot without borders
Hello I have the following data.frame and xyplot. I need this plot without
the borders. Does anybody know how to get this xyplot without borders o with
white borders?
Thank's in advance
Juan Hernández
my.label <- data.frame(quantil=rep(20,8),
my.factor=factor(c('FA','FB','FC','FD','FE','FG','FH','FI')))
library(lattice)
2009 Dec 04
1
Apparent different in symbol scaling between xyplot and grid.points
Dear R-users,
For the past few days, I have been trying to find the reason why some of
my plots were showing symbols of different sizes, while I thought I was
using the same .cex arguments everywhere. The problem is exemplified by
the following example code where the xyplot and grid.points functions
are used. The scaling factor is set to 0.84 in both the functions
settings, but one can see
2009 Dec 11
1
lattice - 2 graphs per panel with 2 differents colours
Hello,
I would like to get a lattice plot of 8 panels (unique(df$fact)=8) with 2
graphs (df$y1 and df$y2 as a function of df$x) and 1 red point at (500,
ymax) per panel.
The script below is quite ok but I'm not able to define two different colors
for the two graphs.
If you have an idea how to use the "col" function in order to attribute the
colors, it will be very kind of you to
2017 Jan 20
4
problema con grafico lattice ....
Estimada comunidad, estoy tratando de hacer un grafico y no resulta
(adjuntos datos). Se grafican la vble "con" en el eje X y "can" en el
eje Y. Se agrupa por la vble "sol". Se deben agregar como lineas
horizontales los valores de "can" asociados a "sol" "ControlAE" y
"ControlAB", para lo que uso panel.
Pero al agregar
2008 Jan 11
4
lattice color problem with symbols: bug?
Dear useR's,
I have a problem with the lattice plotting of some symbols:
library(lattice)
test<-data.frame(x=c(2,3,1,5),u=c(rep(1,2),rep(2,2)),g=c(rep(c(1,2),2)))
xyplot(x~u,groups=g,
data=test,
par.settings=list(
superpose.symbol=list(pch=c(22, 23),cex=c(1.7,1.6),col="black")
),
key=list(
text=list(c("t1","t2")),
space =
2010 Jul 15
4
Sweave: infelicities with lattice graphics
In a paper I'm writing using Sweave, I make use of lattice graphics, but
don't want to explicitly show (or explain)
in the article text the print() wrapper I need in code chunks for the
graphs to appear.
I can solve this by including each chunk twice, with different options,
as in
<<ortho-xyplot1-code, keep.source=TRUE, eval=FALSE>>=
library(nlme)
library(lattice)
2007 Feb 06
1
A question regarding cex and pch="." in lattice
Hello,
I'm using lattice and opened an X11 device with the following call
X11(width=5,height=5,pointsize=1)
I then ran the following code
library(lattice)
x<-rnorm(30,sd=2)
y<-runif(30)
xyplot(y~x,pch=".",col="black",cex=1)
If i remove "cex=1", not all the points are plotted. From ?X11, i
read,"pch='.' with cex=1 corresponds to a
2020 Oct 28
0
R for-loop to add layer to lattice plot
On Tue, Oct 27, 2020 at 6:04 PM Luigi Marongiu <marongiu.luigi at gmail.com> wrote:
>
> Hello,
> I am using e1071 to run support vector machine. I would like to plot
> the data with lattice and specifically show the hyperplanes created by
> the system.
> I can store the hyperplane as a contour in an object, and I can plot
> one object at a time. Since there will be
2005 Mar 22
1
Question with lattice xyplot
Hi All,
I have a quick question and any help is greatly appreciated. For the following data when I try to produce the image using xyplot function in lattice package, the key has 4 rows instead of 2. Can anyone tell me what I'm doing wrong and what is the way to fix the problem. Here the code that I'm running
studyData <- as.data.frame(t(structure(c(
"A",0,4.477,