How can I use subscripts to draw the last graph with one call to
function xyplot()?
Thanks,
This code gives unexpected result.
library(data.table)
library(lattice)
set.seed(123)
mydt <- data.table(date = seq.Date(as.IDate("2024-01-01"), by = 1,
length.out = 50), xgroup = "A", x = runif(50, 0, 1))
mydt <- rbindlist(list(mydt, data.table(date = mydt$date, xgroup = "B", x =
runif(50, 0,
Thanks Greg and Bert for solving my problem.
This gives what I want:
myticks <- 2^(3*(0:11))
mylabels <- parse(text=paste0("2^",log2(myticks)))
xyplot(c+t+u~n,data=x,type="b", xlab="Size", ylab="Number of tangles",
scales=list(x=list(at=4*(1:9)),y=list(log=2,at=myticks,labels=
Do the "at" and "labels" components of the "scales" list argument to xyplot
not do what you want?
Cheers,
Bert
On Thu, Sep 5, 2024 at 4:05 AM Gerrit Draisma wrote:
> Dear R-helpers,
>
> In the plot below I would like to have labels at positions 2^(3*(0:10)),
> and keep the labels in the exponen
Dear R-helpers,
In the plot below I would like to have labels at positions 2^(3*(0:10)),
and keep the labels in the exponential format.
I tried using yscale.components.default.
*This* gives the right format of the labels:
> yscale.components.default(lim= c(0,30),log=2)
$num.limit
[
You are thinking of latticeExtra::useOuterStrips.
Best,
-Deepayan
On Sat, 31 Aug 2024 at 02:53, Christopher W. Ryan via R-help <
r-help@r-project.org> wrote:
> Years ago, I recall creating lattice plots with two binary factors, call
> them f1 and f2, as in
>
> xyplot(y ~ x | f1 + f2, data = dd)
Years ago, I recall creating lattice plots with two binary factors, call
them f1 and f2, as in
xyplot(y ~ x | f1 + f2, data = dd)
and I made it so the rows had strips on the left with the levels of one
factor, and the columns had strips on the top with the levels of the
other factor. Sort of lik
Yes, the following should (mostly) work:
lattice::densityplot(~ x, mydf, groups = name, weights = wt,
auto.key = list(space = "inside"), grid = TRUE)
I just realised that the 'subdensity' and 'warnWbw' arguments are not
passed through by densityplot(), so there is no way to get rid of the
cor
Unless I misunderstand...
See ?panel.densityplot
Lattice functions do their work through a host of panel functions,
typically passing their ... arguments to the panel functions.
panel.densityplot has a weights argument.
Cheers,
Bert
On Fri, Sep 29, 2023 at 3:32 AM Naresh Gurbuxani <
naresh_g
density() function in R accepts weights as an input. Using this
function, one can calculate density and plot it. Is it possible to
combined these two operations in lattice densityplot()?
mydf <- data.frame(name = "A", x = seq(-2.9, 2.9, by = 0.2), wt =
diff(pnorm(seq(-3, 3, by = 0.2
mydf <
I will try to explain in a bit more detail.
1. I want to have the labels on the right with a small size to be able
to read them
2. I would like not to have the labels on the left
3. I would like to be able to choose the number of principal ticks for
every sensor. That is to say the value of n
Thanks for the reproducible example. Could you explain what you want
in a bit more detail? Does the following do more or less what you
want, except that the labels are on the left instead of right?
gr <-
xyplot(value ~ tindexTOP | sensor
, data = df_rhelp
, ylab = " "
Dear R-Help-list,
I want to display many sensors on the same page so I have to adapt
the size of the y-axis labels and I woul like to adapt the number of
ticks according to the sensor. I use the yscale.components argument with
the function yscale.components.subticks: see the code below.
I
Thank you very much for the typo !! and the example about the
consequences. I did not know about the option warnPartialMatchDollar =
TRUE, I tested it with my mistake it is very effective indeed. This
option should be TRUE by default.
I edited my mistake but there is still the trouble, the lab
On Sun, Jan 22, 2023 at 6:48 PM Laurent Rhelp wrote:
> Dear RHelp-list,
>
> I want to choice my scale for every panel in a lattice graph according to
> the ylim range of every panel, with 10 ticks and with a start from 0.
> Also I want to plot a grid
>according to the y ticks (I did that
Dear RHelp-list,
I want to choice my scale for every panel in a lattice graph according to
the ylim range of every panel, with 10 ticks and with a start from 0.
Also I want to plot a grid
according to the y ticks (I did that in the panel argument with the
panel.abline function) .
So I deci
On Sun, Dec 11, 2022 at 11:05 PM Laurent Rhelp wrote:
>
> Excellent, it works.
>
> But, may you please explain me how xyplot knows that it has to apply
> panel.bwplot on every groups according to the groups factor ? Because
> there is only one panel. I introduced the groups argument in order to
>
Thank you very much Deepayan, I will see the help of panel.bwplot.
Best regards
L.
Le 11/12/2022 à 18:53, Deepayan Sarkar a écrit :
On Sun, Dec 11, 2022 at 11:05 PM Laurent Rhelp wrote:
Excellent, it works.
But, may you please explain me how xyplot knows that it has to apply
panel.bwplot on
Excellent, it works.
But, may you please explain me how xyplot knows that it has to apply
panel.bwplot on every groups according to the groups factor ? Because
there is only one panel. I introduced the groups argument in order to
apply the bwplot function only on the values of every group.
On Sun, Dec 11, 2022 at 2:33 PM Laurent Rhelp wrote:
>
> I understand the idea but I did not succeed.
>
> Here is what I tried:
>
> ## 1.middles of classes calculation
>
> m <- tapply(DF$x, groups, mean)
>
> ## 2. create a new factor columns with the levels deduced from
> ## the va
Indeed, I have to clarify my problem.
I have to display my physical measurements in a log-log representation.
I can do that with xyplot from the lattice package. But I would like to
show the dispersion of my measurement. So I wanted to use the bwplot
function but it is not possible because the
There can be **no log scale** for the x axis, only labels, if x is a factor
(Groups).
If what you mean is that there are no tick marks o the x-axis, they can be
added in my code in the scales list (for my reprex with 5 levels of group):
scales = list(
alternating = 1 ## ticls only on b
Ok for the labels but the x-axis is not displayed in log scale ?
Le 10/12/2022 à 22:36, Bert Gunter a écrit :
> ... and here's a version where the x variable is different than y.
> It's basically the same.
>
>
> set.seed(123)
> y <- runif(40,min=0, max= 10)
> x <- seq(0,10, length = 40)
> ## 5
I understand the idea but I did not succeed.
Here is what I tried:
## 1. middles of classes calculation
m <- tapply(DF$x, groups, mean)
## 2. create a new factor columns with the levels deduced from
## the values of the middles of the classes
##
DF$m <- DF$groups
levels(DF$m) <
... and here's a version where the x variable is different than y. It's
basically the same.
set.seed(123)
y <- runif(40,min=0, max= 10)
x <- seq(0,10, length = 40)
## 5 equally spaced groups labeled by log10 of the center
## of the intervals
xrng <- range(x)
eps <- .0001*c(-1,1)*diff(xrng) ## see
If Deepayan's suggestion does not suit and especially *if* I understand
what you want to do correctly, then it seems to me that it is
straightforward to create the groups and group labels manually:
## in verbose detail to hopefully improve clarity
set.seed(123) ## for reprex
y <- runif(40,min=0,
Log-scales for the "factor" variable in bwplot() is not allowed.
You could, however, use the panel function panel.bwplot() with
xyplot(num ~ num). The potential problem with that is the box widths,
which panel.bwplot() will not know how to compute.
See if the following gives you a reasonable star
Dear R-Help list,
I would like to use bwplot from the lattice package with a log scale
both on
the x-axis and the y-axis but I do not know how to do that because I do
not know
how to change the factor x-axis in a numeric x-axis.
Here is my example:
library(lattice)
# the mock data
y <-
I hit the wrong button, unfortunately, so others beside Naresh and
Deepayan can safely ignore my "coda".
On Fri, Aug 12, 2022 at 2:29 PM Bert Gunter wrote:
>
> As a private coda -- as it is unlikely to be of general interest --
> note that it is easy to do this without resorting to the layering
>
This is the solution I was looking for. Thanks to Deepayan and Bert for
sticking with me.
Naresh
Sent from my iPhone
On Aug 12, 2022, at 8:02 AM, Deepayan Sarkar wrote:
On Thu, Aug 11, 2022 at 9:03 PM Naresh Gurbuxani
mailto:naresh_gurbux...@hotmail.com>> wrote:
Bert,
Thanks for provid
Deepayan,
Thanks for providing a solution. While this is close to my goal, I want one
more change. The line type (lty) should be the same for long and short. The
line type should only change according to “name” group. So the the graph will
have two line types (not four as in your solution).
Awesome, thanks!
On Wed, Nov 17, 2021 at 7:50 PM Bill Dunlap wrote:
>
> Try using at=c(1.8, 2.8) to specify the contour levels you want (and omit the
> cuts= argument).
>
> -Bill
>
> On Wed, Nov 17, 2021 at 5:41 AM Luigi Marongiu
> wrote:
>>
>> I have a dataframe of three variables: x, y, z. T
Thank you! yes, I thought line width was controlled by some kind of
panel function...
On Wed, Nov 17, 2021 at 7:06 PM Bert Gunter wrote:
>
> Your code is unnecessarily complex.
> contourplot() will by default use the panel.contourplot() function and pass
> down graphical arguments to it.
>
> So
Try using at=c(1.8, 2.8) to specify the contour levels you want (and omit
the cuts= argument).
-Bill
On Wed, Nov 17, 2021 at 5:41 AM Luigi Marongiu
wrote:
> I have a dataframe of three variables: x, y, z. The value of z are:
> ```
> > unique(df$z)
> [1] 1.0 1.2 1.4 1.6 1.8 2.0 2.2 2.6 3.0 2.4 2
Your code is unnecessarily complex.
contourplot() will by default use the panel.contourplot() function and pass
down graphical arguments to it.
So this suffices:
contourplot(Z ~ X*Y, data = df, cuts = 3, lwd =2)
Customization of the panel function appears to be unnecessary for your
needs.
Bert G
I have a dataframe of three variables: x, y, z. The value of z are:
```
> unique(df$z)
[1] 1.0 1.2 1.4 1.6 1.8 2.0 2.2 2.6 3.0 2.4 2.8
```
I would like to plot the contour where the data get integer values
(1.0, 2.0, 3.0) but also highlight where the 1.8 and 2.8 values
occurred. Thus, I am plotting
sorry, it was easier than expected: just add `lwd` to the main cal.
sorry I could not stop the message before checking...
On Wed, Nov 17, 2021 at 10:31 AM Luigi Marongiu
wrote:
>
> Hello,
> I have generated a contourplot with lattice. How do I set the line
> width? I tried with:
> ```
> library(l
Hello,
I have generated a contourplot with lattice. How do I set the line
width? I tried with:
```
library(lattice)
contourplot(Z ~ X*Y, data = df, cuts = 3,
panel=function(x,y,...){
panel.contourplot(lty=1, lwd = 3)
})
```
but did not work...
Thank you
Hi
See in line
> -Original Message-
> From: Luigi Marongiu
> Sent: Friday, October 25, 2019 1:33 PM
> To: PIKAL Petr
> Cc: Bert Gunter ; r-help
> Subject: Re: [R] R lattice stripplot add median line to data
>
> Ops, yes now it works. But again it gives a sin
own3"))),
> > > > > strip = function(..., bg) {
> > > > > strip.default(...,
> > > > > bg =
> > > > > trellis.par.get("strip.background")$col[which.packet()])
> > > > > },
> > >
uot;brown3"))),
> > > > strip = function(..., bg) {
> > > > strip.default(...,
> > > > bg =
> > > > trellis.par.get("strip.background")$col[which.packet()])
> > > > },
> > > > # add
v = v[k], h = h[k],
> ...)
> else panel.abline(a = a, b = b, v = v, h = h, ...)
> trellis.unfocus()
> }
> }
>
> Cheers
> Petr
>
>
>
> > -Original Message-
> > From: R-help On Behalf Of Bert Gunter
> >
er
> Sent: Thursday, October 24, 2019 6:23 PM
> To: Luigi Marongiu
> Cc: r-help
> Subject: Re: [R] R lattice stripplot add median line to data
>
> Yes, it's possible to do about anything in lattice, but you have to learn
how
> to write custom panel functions, which ta
Yes, it's possible to do about anything in lattice, but you have to learn
how to write custom panel functions, which takes some effort. If you want
to use lattice in this way, you should probably go through Deepayan's book.
Here is one way to do what I think you want. Note that it depends on
knowi
Dear all,
I am plotting data with lattice's stripplot. Is it possible to add a
median line to each cluster?
This is the working example:
```
Sample = c("A0", "A0", "A0", "A3", "A3", "A3", "A7", "A7", "A7",
"A9", "A9", "A9", "H1", "H1",
"H1", "H2", "H2", "H2", "H3", "H3", "
On Fri, 24 Aug 2018, Richard M. Heiberger wrote:
color for the legend comes from trellis.par.get
You can control that for an individual plot with the par.settings argument.
tmp <- data.frame(y=sample(10),
group=rep(c("Median", "Maximum"), each=5),
year=factor(re
On Fri, 24 Aug 2018, Bert Gunter wrote:
For the legend, you can use the full "key" argument for more control.
Bert,
This I did.
For the scales, again, the docs provide the answer: the "at" and "labels"
components of "x" component of the scales lists can explicitly control the
x -labels,
x -labels, e.g.
scales = list( x = list( at = ..., labels = ...)etc.
If you are uncomfortable with the R lattice help docs, and you intend to
continue to use lattice plots (a good idea; ggplot is an alternative of
course), Deepayan has written a book that you might wish to get:
http://lm
color for the legend comes from trellis.par.get
You can control that for an individual plot with the par.settings argument.
tmp <- data.frame(y=sample(10),
group=rep(c("Median", "Maximum"), each=5),
year=factor(rep(1998:1999, length=10)))
barchart(y ~ year, da
On Wed, 22 Aug 2018, Rich Shepard wrote:
More when I have results.
Almost there. I've read the auto.key section in ?barchart and looked at
examples from stackoverflow on the web without seeing my syntax errors. I
would like help on two issues:
1. What I want is to have the legend text in
On Wed, 22 Aug 2018, Bert Gunter wrote:
groups = Summary.Type, ...
in your call will then do the job.
As an aside, this is a good example of why you should adhere to this format
for data analysis in R.
Bert,
Progress and retreat. I'm putting this aside for a day or so because I
need t
On Wed, 22 Aug 2018, Bert Gunter wrote:
(I know that you said your post may already be "out of date", but ...)
Bert,
Still reading ?xyplot/?barchart.
But ?barchart says:
"Formally, if groups is specified, then groups along with subscripts is
passed to the panel function, ..."
which, as I
(I know that you said your post may already be "out of date", but ...)
" Despite additional reading of barchart() examples and help pages I'm
still
missing how to get grouping working and use the years in the dataframe as
labels on the x-axis."
But ?barchart says:
"Formally, if groups is specif
On Wed, 22 Aug 2018, Rich Shepard wrote:
Correcting the barchard() command fixed the main issue; getting the second
set of bars is still eluding me, but I'll continue working on fixing this.
I'll get the years as the x-axis labels rather than year number in
sequence from 1 to 29.
Despite add
On Wed, 22 Aug 2018, Bert Gunter wrote:
See inline.
Bert,
Will do. Sent a reply before seeing this. More to follow.
Thanks,
Rich
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
P
See inline.
-- Bert
On Wed, Aug 22, 2018 at 9:17 AM Rich Shepard
wrote:
> On Wed, 22 Aug 2018, Bert Gunter wrote:
>
> > No reproducible example (see posting guide below) so minimal help.
>
> Hi Bert,
>
>I thought the header and six data rows of the dataframe plus the syntax
> of
> the com
On Wed, 22 Aug 2018, Bert Gunter wrote:
No reproducible example (see posting guide below) so minimal help.
Hi Bert,
I thought the header and six data rows of the dataframe plus the syntax of
the command I used were sufficient. Regardless, here's the dput() output:
structure(list(Year = c(1
No reproducible example (see posting guide below) so minimal help.
Remove the quotes from your formula. Why did you think they should be
there? -- see ?formula.
Read the relevant portions of ?xyplot carefully (again?). You seemed to
have missed:
"*Primary variables:* The x and y variables should
I've not before created bar charts, only scatter plots and box plots.
Checking in Deepayan's book, searching the web, and looking at ?barchart has
not shown me the how to get the results I need.
The dataframe looks like this:
head(stage_heights)
Year Med Max
1 1989 91.17 93.32
2 1990
c("yellow", "orange"))
> ),
> strip = strip.custom(factor.levels = c("Cases","Controls"),
> strip.levels=TRUE,
> strip.names=FALSE,
> par.strip.text = list(cex = 1)
> )
par.strip.text = list(cex = 1)
)
)
Too late to do anything more
Regards
Duncan Macka
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Luigi
Marongiu
Sent: Friday, 22 September 2017 21:53
To: r-help
Subject: [R] Lattice stacked
Dear all,
I have made a barplot using lattice in which the bars are stacked
horizontally. I would like to stack them vertically, but if I use the
parameter 'horizontal = FALSE' I get the error: 'Error in FUN(X[[i]],
...) : invalid 'type' (character) of argument'. The problem I face is
that, in draw
The original was conditioning the entire histogram, not just the kernel
estimate, on bw. I am assuming that the bw in the condition should be
bandwidths.
What you want is easily done by using the latticeExtra package.
This works from a new R session:
url <- "http://www.econ.uiuc.edu/~roger/rese
My apologies, the data can now be found at:
url <- "http://www.econ.uiuc.edu/~roger/research/ebayes/velo.d";
x <- scan(url,skip = 1)
If I could get each of the histograms to mimic what is produced by
hist(x, 100, freq = FALSE)
I’ve experimented with xlim, ylim, without success so far...
url:
Your example is not easily reproducible.
The REBayes requires Rmosek which requires a system command MOSEK.
Please try again with an example using data in base R.
Meanwhile, my guess is that you will need to do something like
explicitly specifying xlim and ylim so all panels have the same
limits.
I am trying to do some comparisons of density estimators using lattice.
The code below attempts to plot the same histogram in each panel and
then overplots a kernel estimate with different bandwidths. Finding
packet.number() was a bit arduous, but seems to do what I want. My
concern now is that cl
Thanks all for the clarification!
From: Jeff Newmiller
To: r-help@r-project.org; Bert Gunter ; array chip
Cc: "r-help@r-project.org"
Sent: Monday, May 1, 2017 10:53 AM
Subject: Re: [R] Lattice xyplot
It is not a question of whether lattice "understands&quo
> On 1 May 2017, at 17:59 , Bert Gunter wrote:
>
> (Too trivial for the list)
...so you decided to include us only once? >;-)
-pd
>
> I debated saying something similar but decided not to, as polygons can
> be drawn e.g. via panel.polygon.
>
> Cheers,
> Bert
>
>
>
>
> On Mon, May 1, 201
(Too trivial for the list)
I debated saying something similar but decided not to, as polygons can
be drawn e.g. via panel.polygon.
Cheers,
Bert
On Mon, May 1, 2017 at 8:25 AM, Jeff Newmiller wrote:
> It is not a question of whether lattice "understands" the unsorted data...
> imagine trying
It is not a question of whether lattice "understands" the unsorted data...
imagine trying to plot 4 points to form a square instead of a trend line... you
would NOT want lattice to sort those points for you. That lattice leaves your
data alone gives you more flexibility, even while it adds work
groups=id, aspect = "fill", type = c("p", "l"),
xlab = "Time", ylab = "Y")
Regards
Duncan
Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mac...@northnet.com.au
-Original M
Yes. type = "l" connects the points in the order given in the data, so
if the x's are not already ordered, the plots will be different after
ordering the x's.
e.g.
> x <- c(3,1,2,4,6,5)
> y <- 11:16
> xyplot(y~x. type = "l")
As for why ... that's just the way it was designed. You can always
ord
Dear all, I am new to lattice, so would appreciate anyone's help on the
questions below. I am using xyplot to plot some trend in my dataset. Using the
example dataset attached, I am trying to plot variable "y" over variable "time"
for each subject "id":
dat<-read.table("dat.txt",sep='\t',header=
This worked very well for me.
Thanks,
Naresh
From: P Tennant
Sent: Saturday, November 5, 2016 7:57 PM
To: Naresh Gurbuxani
Cc: R-help@r-project.org
Subject: Re: [R] lattice graph with free scales and reversed axis values
Hi Naresh,
You could calculate the
Hi Naresh,
You could calculate the ranges explicitly and then supply to scales():
holdRange <- vector('list', length(unique(my.df$name)))
for(i in 1:length(holdRange)){
holdRange[[i]] <-
rev(range(my.df$x[my.df$name==unique(my.df$name)[i]]))
}
holdRange
# [[1]]
# [1] -5.052890 -9.967
> On Nov 5, 2016, at 3:59 PM, Naresh Gurbuxani
> wrote:
>
> I want to draw a lattice graph where different panels have different ranges
> AND the order of values is reversed. I am struggling to achieve both at the
> same time. Can you help?
>
> Thanks,
> Naresh
>
> # Create dummy data for
University of New England
Armidale NSW 2351
Email: home: mac...@northnet.com.au
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ben Tupper
Sent: Tuesday, 25 October 2016 23:53
To: r-help
Subject: [R] lattice: control panel extent on device
Hello,
I am drawing a
Thanks, Bert.
I have used latticeExtra for layering graphics. I'm not sure how I would use
it to align graphics rather superimposing them.
I shall look into the the custom panel plot but that is very new territory for
me.
Ben
> On Oct 25, 2016, at 9:13 AM, Bert Gunter wrote:
>
> Write a cu
Hello,
I am drawing a levelplot and an xyplot on a single device as shown in the
runnable example below. I would like the x axes to align - that is for them to
cover the same extent left-to-right on the device. How do I go about doing that?
###
# START
###
library(lattice)
d <- dim(vo
Hi,
Yes, it is available in "latticeExtra" package in function
"panel.smoother()".
Thanks,
Carlos Ortega
www.qualityexcellence.es
2016-10-24 15:13 GMT+02:00 Sébastien Bihorel :
> Hi,
>
> The ggplot2 includes the very convenient stat_summary function to summarize
> y variable data and plot this
Hi,
The ggplot2 includes the very convenient stat_summary function to summarize
y variable data and plot this summary statistic in a y vs x graph. I need
to implement similar functionality in a lattice-based framework.
Googling this topic using keywords like lattice, equivalent, stat_summary,
did
On Thu, 20 Oct 2016, David Winsemius wrote:
Why are you creating this factor? The `date` column has the desirable
properties associated with the "Date" class. Axis labeling will be
correct.
David, et al.:
Because originally I mis-understood the parameters; it's gone now.
rainbyday2 <- xyp
> On Oct 20, 2016, at 9:20 AM, Rich Shepard wrote:
>
> On Wed, 19 Oct 2016, David Winsemius wrote:
>
>> I am getting annoyed, exhausted, and frustrated reading code like that.
>> Never, ever, ... ever, use the "$" operator in a formula. Use the 'data'
>> argument and the 'formula' as they are s
1. Your par(), opar() business is junk -- lattice displays do not use or
modify these. See ?trellis.par.set .
2. You do *not* need rain$ in your formula with the data=rain argument; you
*do* need it in the at argument and elsewhere. The data argument only
controls where the variables in the formul
On Wed, 19 Oct 2016, David Winsemius wrote:
I am getting annoyed, exhausted, and frustrated reading code like that.
Never, ever, ... ever, use the "$" operator in a formula. Use the 'data'
argument and the 'formula' as they are supposed to be used.
David,
I apologize for annoying, exhaustin
> On Oct 19, 2016, at 4:04 PM, Rich Shepard wrote:
>
> On Wed, 19 Oct 2016, Rich Shepard wrote:
>
>> I did read that but mis-applied what I read. Tried auto.key but that did
>> not work as desired. Now I know to learn how to apply 'key'.
>
> Almost there after another careful reading Section
Mackay
Sent: Thursday, 20 October 2016 16:11
To: R
Subject: Re: [R] Lattice xyplot(): adding a legend
Hi Rich
Without an example to check I think you need to fill in the arguments for
par.settings eg
par.settings = list(plot.symbol = list(c("black","red","dark green&quo
rsity of New England
Armidale NSW 2351
Email: home: mac...@northnet.com.au
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Rich Shepard
Sent: Thursday, 20 October 2016 10:05
To: r-help@r-project.org
Subject: Re: [R] Lattice xyplot(): adding a legend
O
On Wed, 19 Oct 2016, Rich Shepard wrote:
I did read that but mis-applied what I read. Tried auto.key but that did
not work as desired. Now I know to learn how to apply 'key'.
Almost there after another careful reading Section 9.2.3 ff in the book.
Here's the command to produce the plot:
ra
On Wed, 19 Oct 2016, David Winsemius wrote:
The `legend` function is used with base graphics plotting (as is the par
function).
David,
And that's how I used it before so it is the wrong template for this plot.
Mea culpa!
I think you might first read ?Lattice since it makes reference to th
> On Oct 19, 2016, at 10:48 AM, Rich Shepard wrote:
>
> After reading ?xyplot and pages 161-162 in Deepayan's book I'm still not
> getting the syntax correct to add a legend to a scatterplot. The data are
> attached as filename rain.dput.
>
> Without the legend (and testing interactively) the
After reading ?xyplot and pages 161-162 in Deepayan's book I'm still not
getting the syntax correct to add a legend to a scatterplot. The data are
attached as filename rain.dput.
Without the legend (and testing interactively) the data plot but not the
legend. Sourcing the script opens the dis
2)
)
)
Regards
Duncan
Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mac...@northnet.com.au
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Seth Bigelow
Sent: Thursday, 28 July 2016
I have constructed a barchart that requires a panel call, but the panel
reduces the facsimiles of bars in the legend to small colored circles. You
can see this behavior in the following example:
Titan <- as.data.frame(Titanic)
titanpanel <- function(x,y,...){
panel.barchart(x,y,...)
}
barchart(C
> On Dec 18, 2015, at 12:22 PM, Luigi Marongiu wrote:
>
> Dear all,
> I am plotting the count of some data subdivided in different groups.
> the variables i am using are:
> A = tests performed
> B = positive/negative results (but in this case the results are all
> positive, so all 1)
> C = multi
Dear all,
I am plotting the count of some data subdivided in different groups.
the variables i am using are:
A = tests performed
B = positive/negative results (but in this case the results are all
positive, so all 1)
C = multiple (1) or single (0) test applied
D = count of instances
E = cases (1) o
You need to go back and read an R tutorial (e.g. the Intro to R one
that ships with R) about how functions pass ... arguments. Your
customPanel2 function does not use the ... argument passed to it, so
what you are trying to do by including it?
Beyond that, I do not have the patience to go through
I am developing an interactive scatterplot so that when the user rolls over
a data point, a label is displayed. However, I would also like to add edges
between certain data points.
I am successful at developing the interactive scatterplot using several
libraries, including grid, gridSVG, lattice,
Forgot to send to list
-Original Message-
From: Duncan Mackay [mailto:dulca...@bigpond.com]
Sent: Thursday, 8 October 2015 08:44
To: 'Szumiloski, John'
Subject: RE: [R] [lattice::xyplot] Using (panel:.)abline with
panel.superpose?
Hi John
I only got grid lines on your # c
Dear useRs,
I recently had a query concerning how to customize the graphics parameters in
lattice::xyplot to change not only the color but also the pch symbols, lty and
lwd line parameters, etc., within each grouping variable in the plot.
(https://stat.ethz.ch/pipermail/r-help/2015-July/430285
1 - 100 of 1255 matches
Mail list logo