Displaying 20 results from an estimated 6000 matches similar to: "lattice dotplot: line height for multi-line labels"
2010 Jan 14
1
lattice dotplot with missing levels in factor variable
Hi,
I am trying to create a dotplot where each panel shows levels vs.
responses; the levels are sorted by responses but levels vary from one
panel to another. However, I run into problems with controlling the
y-limits and y-labels.
In particular, suppose I have a data frame
rsp <- c(10,2,4,0,2,3)
lvl <-
2007 Jul 26
1
How to auto-scale cex of y-axis labels in lattice dotplot?
When I create a dotplot in lattice, I frequently observe overplotting
of the labels along the vertical axis. On my screen, this illustrates
overplotting of the letters:
windows()
reps=6
dat=data.frame(let=rep(letters,each=reps), grp=rep(1:reps, 26),
y=runif(26*reps))
dotplot(let~y|grp, dat)
Is there a way to automatically scale the labels so that they are not
over-plotted?
I currently do
2003 Jan 15
2
[lattice] lines for stripplot (like dotplot) or jitter for dotplot?
I'd like to use stripplot for some plots because I want to use
the jitter parameter. On the other hand, I'd like to use dotplot
because I'd like to have the horizontal lines that it includes.
dotplot doesn't have a jitter option and I'm not having any
success with getting panel.grid(h=-1) with stripplot. Can anyone
show me how to make dotplot-like lines on a stripplot? Or
2001 Jan 18
2
dotplot: character size of labels
Dear R users,
using dotplot (R1.2.0, WinNT4.0), I am trying to change the character size
of the labels of the points:
> # example
> data(VADeaths)
> dotplot(VADeaths, main = "Death Rates in Virginia - 1940")
> # I'd like to have smaller character size of the labels (for age and
population groups)
> ?dotplot
> # for argument "cex", this says:
2023 Nov 07
1
make a lattice dotplot with symbol size proportional to a variable in the plotted dataframe
Hello. My question is in the subject line. Using R 4.1.3 on Windows 10.
Commented MWE below. Thanks.
--Chris Ryan
library(dplyr)
library(lattice)
## fabricate a dataframe
dd <- data.frame(agency = sample(LETTERS, size = 5),
total = sample(100:200, size = 5),
las = sample(20:40, size = 5))
dd <- dd %>% mutate(proportion = las/total, bubble = total/100)
## attempt to make a dotplot
2009 Mar 03
1
dotplot() lattice charts return blank image (jpeg, bmp, png) file
Thanks in advance for the help. Trying to run a basic dotplot in lattice from R command line. When the file is created, in Fedora, it is blank image (jpeg, bmp, png). Image produces correctly in Windows environment. Libraries lattice and latticeExtra are loaded. Code:
-----------------
jpeg(file = "/tmp/img/temp31.jpg", width = 768, height=768)
xy <- dotplot(1:10)
print(xy)
2011 Feb 09
1
add mean and sd to dotplot in each panel using lattice
Hi,
I have a data frame like this:
ScoreDoseSex
2.81Dose1M
1.81Dose1M
1.22Dose1M
0.81Dose1M
0.49Dose1M
0.22Dose1M
0.00Dose1M
-0.19Dose1M
-0.17Dose1F
-0.32Dose1F
-0.46Dose1F
-0.58Dose1F
-0.70Dose1F
-0.81Dose1F
-0.91Dose1F
-1.00Dose1F
-1.77Dose2M
-1.85Dose2M
-1.93Dose2M
-2.00Dose2M
-2.07Dose2M
-2.14Dose2M
-2.20Dose2M
-2.26Dose2M
-2.32Dose2F
-2.38Dose2F
-2.17Dose2F
-2.49Dose2F
-2.54Dose2F
2006 Jul 07
2
dotplot (lattice) with panel.segments and groups
Hi,
The following produces almost exactly what I needed. The problems are
that the 'panel.dotplot' call (commented) generates the error 'Error in
NextMethod("[") : argument "subscripts" is missing, with no default'. The
other problem is that the colors alternate between the levels of the 'site'
variable, rather than 'year'.
barley$yield2
2004 Feb 10
2
Dotplot: y-labels from rownames
How can I use row.names() as y-labels in Dotplot? How to set horizontal
orientation for y-lables in lattice()?
Dotplot(stcod1 ~ Cbind(statgh2,statgh2-1.96*segh2,statgh2+1.96*segh2)[og],
subset=statgh2[og]>0.1, data=h2inqerrg02st, xlab="G",
ylab=row.names(h2inqerrg02st)[og], main="")
I have tried doing it with mtext() as well, but there is not enough space
besides
2008 Jun 16
2
Lattice: Superpose bwplot and dotplot [newbie question]
Hello everyone
I have dataset containing a monetary value (ABS) and two factors (Fct,
Group). I am able to create useful using:
bwplot(ABS~Group|Fct)
and
dotplot(ABS~Group|Fct)
Question: What do I have to do to overlay the dotplot with the bwplot (same
data set)?
I've found a couple of posts that hinted at the possibility of doing that,
and checked the panel.superpose() help, but the info
2011 Apr 07
1
dotplot as a background for multiple barchart plots (with Lattice)
Hi R users,
I'm kind stuck in my R experience...
I want to have a multiple barchart with n windows, but with the same
background for each window, and I want that background to be a recorded
dotplot.
First, is it possible ?
If so, I guess I have to call a record plot in the panel function but how ?
As there is no panel.plot and I can't use the recorded plot as an
argument for the
2004 Oct 22
3
dotplot & lattice problems: y axis values and bg color output in jpg
I have a linux system with Fedora Core 2 and R-2.0.
I was comparing plots made with plot() and dotplot() and discovered a
problem. Although the dots are positioned correctly, the numerical
labels in the dotplot y axis are not correct.
I put copies here:
http://lark.cc.ku.edu/~pauljohn/R/plotTrouble1.jpg
That is the "correct" one from plot, with the higest value on y showing
at 18.
2012 Oct 11
1
dotplot in ".R" with lattice & latticeExtra: proper visualization
Dear everyone,
I'm trying to do a dotplot with the libraries "lattice" and "latticeExtra".
However, no proper representation of the values on the vertical y-axis is
done by ".R". Instead of choosing the actual values of the numeric variable,
".R" plots the rank of the value. That is, there are values [375, 500, 625,
750, ..., 3000] and ".R"
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 =
2004 Nov 10
1
lattice: ordering the entries in a dotplot of a vector
I tried:
n <- 9
x <- sample(n)
names(x) <- LETTERS[1:n]
dotplot( sort(x) )
The lines of the dotplot are not ordered according to the values of x
(but according to the names of x).
So I did:
dfx <- data.frame( x=x, label=factor( names(x), names(x)[order(x)] ) )
dotplot( label ~ x, data=dfx )
So I got what I wanted.
My question: Is there an easier solution
2008 Jun 16
1
Lattice: Superpose bwplot on dotplot [Newbie Question]
Hello everyone
I have dataset containing a monetary value (ABS) and two factors (Fct,
Group). I am able to create useful using:
bwplot(ABS~Group|Fct)
and
dotplot(ABS~Group|Fct)
Question: What do I have to do to overlay the dotplot with the bwplot (same
data set)?
I've found a couple of posts that hinted at the possibility of doing that,
and checked the panel.superpose() help, but the
2013 Feb 18
1
lattice dotplot labelling median and mean values for each panel
By considering this reproducible example
#start code
library(lattice)
dotplot(variety ~ yield | site, data = barley,
layout = c(1,6),
index.cond= function(x,y){median(x)},
panel = function(x,y,...) {
panel.dotplot(x,y,...)
median.values <- median(x)
panel.abline(v=median.values, col.line="red")
2005 May 03
3
Lattice dotplot with symbols sized and colored
Apologies if this is a naive beginners question.
I am trying to create a dotplot with the lattice dotplot function in which
my dots are colored differently depending on if positive or negative and
sized by sp.nc.bdrs.data$mwZ
I have tried...
dotplot(sporder ~ cvarorder | direct, data=sp.nc.bdrs.data,
cex=abs(sp.nc.bdrs.data$mwZ * 0.05),
xlab="climate variables",
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 =
2006 Apr 11
1
Change in lattice dotplot?
Dear list,
I used to have this code in a Sweave document:
sel <- placeDF$Place == "Velar" & placeDF$manner == "Plosive"
table(placeDF$agem[sel], placeDF$place[sel]) -> pd
print(
dotplot(
prop.table(pd,margin=1),
auto.key=list(
space="right"
),
xlab="Relative Frequency",