Re: [R] lattice xyplot: how to change the y-axis labels size using yscale.components.subticks on the right side and how to adapt the ticks number

2023-05-31 Thread Laurent Rhelp
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

Re: [R] lattice xyplot: how to change the y-axis labels size using yscale.components.subticks on the right side and how to adapt the ticks number

2023-05-30 Thread Deepayan Sarkar
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 = " "

Re: [R] lattice xyplot: trouble about the use of yscale.components to start the yscale from zero

2023-01-24 Thread Laurent Rhelp
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

Re: [R] lattice xyplot: trouble about the use of yscale.components to start the yscale from zero

2023-01-22 Thread Deepayan Sarkar
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

Re: [R] Lattice xyplot

2017-05-02 Thread array chip via R-help
Thanks all for the clarification! From: Jeff Newmiller <jdnew...@dcn.davis.ca.us> To: r-help@r-project.org; Bert Gunter <bgunter.4...@gmail.com>; array chip <arrayprof...@yahoo.com> Cc: "r-help@r-project.org" <r-help@r-project.org> Sent: Monday, May

Re: [R] Lattice xyplot

2017-05-01 Thread peter dalgaard
> 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 > > >

Re: [R] Lattice xyplot

2017-05-01 Thread Bert Gunter
(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

Re: [R] Lattice xyplot

2017-05-01 Thread Jeff Newmiller
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

Re: [R] Lattice xyplot

2017-05-01 Thread Duncan Mackay
In addition to Berts comments Once you change the order you change the non factored id' ordering. If you make it a factor it may be easier to see what is going on I think I have copied correctly - see the differences # original data xyplot(y ~ time, data=dat, groups=id, aspect = "fill", type

Re: [R] Lattice xyplot

2017-05-01 Thread Bert Gunter
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

Re: [R] Lattice xyplot(): adding a legend [RESOLVED]

2016-10-20 Thread Rich Shepard
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 <-

Re: [R] Lattice xyplot(): adding a legend

2016-10-20 Thread David Winsemius
> 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

Re: [R] Lattice xyplot(): adding a legend

2016-10-20 Thread Bert Gunter
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

Re: [R] Lattice xyplot(): adding a legend

2016-10-20 Thread Rich Shepard
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,

Re: [R] Lattice xyplot(): adding a legend

2016-10-19 Thread David Winsemius
> 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

Re: [R] Lattice xyplot(): adding a legend

2016-10-19 Thread Duncan Mackay
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

Re: [R] Lattice xyplot(): adding a legend

2016-10-19 Thread Duncan Mackay
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

Re: [R] Lattice xyplot(): adding a legend

2016-10-19 Thread Rich Shepard
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:

Re: [R] Lattice xyplot(): adding a legend

2016-10-19 Thread Rich Shepard
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

Re: [R] Lattice xyplot(): adding a legend

2016-10-19 Thread David Winsemius
> 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

Re: [R] [lattice::xyplot] Using (panel:.)abline with panel.superpose?

2015-10-07 Thread Duncan Mackay
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 # code 2

Re: [R] Lattice xyplot: Fill Legend Points

2013-10-18 Thread S Ellison
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Rich Shepard Subject: [R] Lattice xyplot: Fill Legend Points When I specify pch = 19 for a scatter plot the points are filled circles. Deapite reading ?points and

Re: [R] Lattice xyplot: Fill Legend Points

2013-10-18 Thread Rich Shepard
On Fri, 18 Oct 2013, S Ellison wrote: Using trellis.par.set seems more successful than specifying par.settings in the call, however much I'd prefer to avoid relying on globals. Example: ss-trellis.par.get(superpose.symbol) ss$pch=rep(19,7) ss$col=rainbow(7) trellis.par.set(superpose.symbol=ss)

Re: [R] Lattice xyplot: Fill Legend Points

2013-10-17 Thread Richard M. Heiberger
put the pch into the par.settings On Thu, Oct 17, 2013 at 11:17 AM, Rich Shepard rshep...@appl-ecosys.com wrote: When I specify pch = 19 for a scatter plot the points are filled circles. Deapite reading ?points and trial-and-error experimentation I have not found how to have the legend

Re: [R] Lattice xyplot: Fill Legend Points

2013-10-17 Thread Rich Shepard
On Thu, 17 Oct 2013, Richard M. Heiberger wrote: put the pch into the par.settings Richard, Tried this again, but I'm not finding the proper location within par.settings. par.settings = list(superpose.points = list(col = rainbow(7)), superpose.lines = list(col = rainbow(7)), pch = 19)

Re: [R] Lattice xyplot: Fill Legend Points

2013-10-17 Thread Richard M. Heiberger
par.settings = list( superpose.points = list(col = rainbow(7), pch = 19), superpose.lines = list(col = rainbow(7)) ) On Thu, Oct 17, 2013 at 11:48 AM, Rich Shepard rshep...@appl-ecosys.com wrote: On Thu, 17 Oct 2013, Richard M. Heiberger wrote: put the pch into the par.settings

Re: [R] Lattice xyplot: Fill Legend Points

2013-10-17 Thread Rich Shepard
On Thu, 17 Oct 2013, Richard M. Heiberger wrote: par.settings = list( superpose.points = list(col = rainbow(7), pch = 19), superpose.lines = list(col = rainbow(7)) ) I had tried that, too. Legend symbols stubbornly remain unfilled. Thanks, Richard, Rich

Re: [R] Lattice xyplot: Fill Legend Points

2013-10-17 Thread Richard M. Heiberger
That should have worked. I think something else is interfering. Did you redefine either T or F? Please send the output from dput(head(ffg.st)) so we can experiment in your setting. Rich On Thu, Oct 17, 2013 at 12:12 PM, Rich Shepard rshep...@appl-ecosys.com wrote: On Thu, 17 Oct 2013, Richard

Re: [R] Lattice xyplot: Fill Legend Points

2013-10-17 Thread Rich Shepard
On Thu, 17 Oct 2013, Richard M. Heiberger wrote: That should have worked. That's what I thought when I first tried it. I think something else is interfering. Did you redefine either T or F? Not intentionally. Please send the output from dput(head(ffg.st)) so we can experiment in

Re: [R] Lattice xyplot: Fill Legend Points

2013-10-17 Thread Richard M. Heiberger
I always get lost in simpleKey. The approach of directly modifying the trellis object usually works. tmp - xyplot(pct.quant ~ sampdate, data = ffg.st, groups = func_feed_grp, type = + 'p', pch = 19, key = simpleKey(text = levels(ffg.st$func_feed_grp), space = + 'right', points = T, lines =

Re: [R] Lattice xyplot: Fill Legend Points

2013-10-17 Thread Rich Shepard
On Thu, 17 Oct 2013, Richard M. Heiberger wrote: I always get lost in simpleKey. As this is my first use of it I take what's offered by those more experienced than I. The approach of directly modifying the trellis object usually works. tmp - xyplot(pct.quant ~ sampdate, data = ffg.st,

Re: [R] Lattice xyplot multipanels

2013-05-22 Thread Santosh
Dear Rxperts, Using the above example, I have been playing around using viewport under panel-function(...) {...} block in conjunction with panel.groups=function(..) {xyplot.} code block.. I have not bee successful so far.. I was wondering if it is possible to pass user-defined functions (including

Re: [R] Lattice xyplot multipanels

2013-05-22 Thread Santosh
Dear Rxperts.. Just figured how to add a text at a custom location in panel.groups.. use grid.text(x=unit(value1,npc),y=unit(value2,npc),label=label content) With this, I hope to stop flogging such a valuable black horse! :) On Wed, May 22, 2013 at 10:35 AM, Santosh santosh2...@gmail.com

Re: [R] Lattice xyplot multipanels

2013-05-21 Thread Santosh
Dear Rxperts, Using the same example above, is there a way to remove the borders of multi-panel strips and control the display of the borders of each panel.. for example, I would like to keep only side 1 2 of a panel... Thanks, Santosh On Wed, May 1, 2013 at 11:11 PM, Santosh

Re: [R] Lattice xyplot multipanels

2013-05-21 Thread Santosh
Dear Rxperts, Ok The curly braces as we talked before,... They appear if the group argument of xyplot function is entered as a numeric value; and don't when the values are letters. I just figured how to hide the strip borders...and also control the ticks in different axes... Any suggestions

Re: [R] Lattice xyplot multipanels

2013-05-21 Thread Santosh
Dear Rxperts, Sorry about that..forgot to update the numeric part of the multipanel group indicator... Below is the updated code... in addition to getting rid of the curly braces, is there a better way to control the position of panel.text flexibly instead of hardcoding. Thanks, santosh q -

Re: [R] Lattice xyplot multipanels

2013-05-02 Thread Santosh
Thanks for all tips/suggestions.. Just a few more comments.. The same code I use with a different data set in another project does not create those curly braces! Regards, Santosh On Wed, May 1, 2013 at 8:16 PM, Santosh santosh2...@gmail.com wrote: Sorry about the word brackets.. Yes, I meant

Re: [R] Lattice xyplot multipanels

2013-05-01 Thread David Winsemius
On May 1, 2013, at 6:16 PM, Santosh wrote: Derar Rxperts, I have a strange situation.. I see curly brackets Wait right here. What do you mean by brackets? In some locales, such as mine, that might mean [ ; in other domains... well, who knows? I don't see any [. The Urban Legends

Re: [R] Lattice xyplot multipanels

2013-05-01 Thread Santosh
Sorry about the word brackets.. Yes, I meant curly braces! I have not heard of curley braces! :). Curly braces surrounding the values of strip.levels appear on the strip of multipanel plots. Thanks, Santosh On Wed, May 1, 2013 at 7:44 PM, David Winsemius dwinsem...@comcast.netwrote: On May

Re: [R] Lattice xyplot multipanels

2013-05-01 Thread David Winsemius
On May 1, 2013, at 8:16 PM, Santosh wrote: Sorry about the word brackets.. Yes, I meant curly braces! I have not heard of curley braces! :). Curly braces surrounding the values of strip.levels appear on the strip of multipanel plots. Not in my running of your code. Thanks, Santosh

Re: [R] Lattice xyplot multipanels

2013-05-01 Thread Duncan Mackay
Hi Santosh Try this : q - data.frame(G=rep(paste(G,1:3,sep=),each=50), D=rep(paste(D,1:5,sep=),each=30), a=rep(1:15,each=10),t=rep(seq(10),15), b=round(runif(150,10,20))) q$grp - paste(q$D,q$a,sep=:) q$grp - ordered(q$grp, levels=unique(q$grp)) q$dcol -

Re: [R] lattice xyplot point labelling

2013-02-28 Thread maxbre
hi duncan, thanks a lot for your help! yes, your solution is working fine with a little tweaking of the vector poscec : but on the other hand it's just affecting the relative position of labels around respective points; to get more flexibility would be probably better to supply (even if I do

Re: [R] lattice xyplot point labelling

2013-02-27 Thread Duncan Mackay
hi the bottom panel seems ok so for the top you supply a vector of positions that are your required positions (name eg posvec) to the panel function. may need to do the same for other functions to access the correct panel there is the ifelse statement posvec = c(...) panel = function(x,

Re: [R] lattice::xyplot file output

2012-12-20 Thread Rolf Turner
See FAQ 7.22 and fortune(line 800). cheers, Rolf Turner On 21/12/12 06:29, Sam Steingold wrote: Hi, When I was using the regular plot() function, I added this: --8---cut here---start-8--- if (!is.null(file)) {

Re: [R] lattice::xyplot file output

2012-12-20 Thread Pascal Oettli
Hello, A reproducible example would be nice. Anyway, with lattice::xyplot, you can store, then print the figure, in order to write it into a file: xyObj - xyplot(...) postscript(...) print(xyObj) dev.off() Regards, Pascal Le 21/12/2012 02:29, Sam Steingold a écrit : Hi, When I was

Re: [R] lattice xyplot, get current level

2012-10-02 Thread Christof Kluß
subj - levels(subject) subj[panel.number()] seems to be a good solution is there something like panel.legend (instead of panel.text)? Am 02-10-2012 12:59, schrieb Christof Kluß: Hi xyplot(y ~ x | subject) plots a separate graph of y against x for each level of subject. But I would like to

Re: [R] lattice xyplot, get current level

2012-10-02 Thread Bert Gunter
Christof: You are aware, I assume, that the subject level name can be incorporated into the strip label via the strip function argument; e.g. xyplot(..., strip = strip.custom(style = 1, strip.levels=c(TRUE,TRUE)), ...) Cheers, Bert On Tue, Oct 2, 2012 at 6:45 AM, Christof Kluß

Re: [R] lattice xyplot, get current level

2012-10-02 Thread David Winsemius
On Oct 2, 2012, at 3:59 AM, Christof Kluß wrote: Hi xyplot(y ~ x | subject) plots a separate graph of y against x for each level of subject. But I would like to have an own function for each level. Something like xyplot(y ~ x | subject, panel = function(x,y) {

Re: [R] Lattice xyplot log scale labels help!

2011-11-20 Thread Deepayan Sarkar
On Fri, Sep 16, 2011 at 6:56 PM, Deepayan Sarkar deepayan.sar...@gmail.com wrote: On Fri, Sep 16, 2011 at 2:17 AM, Cram Rigby cram.ri...@gmail.com wrote: I have a problem with lattice log scales that I could use some help with. I'm trying to print log y-axis scales without exponents in the

Re: [R] lattice::xyplot/ggplot2: plotting weighted data frames with lmline and smooth

2011-10-21 Thread Dennis Murphy
Hi Michael: Here's one way to get it from ggplot2. To avoid possible overplotting, I jittered the points horizontally by +/- 0.2. I also reduced the point size from the default 2 and increased the line thickness to 1.5 for both fitted curves. In ggplot2, the term faceting is synonymous with

Re: [R] lattice::xyplot/ggplot2: plotting weighted data frames with lmline and smooth

2011-10-21 Thread Michael Friendly
Thanks very much, Dennis. See below for something I don't understand. On 10/21/2011 12:15 PM, Dennis Murphy wrote: Hi Michael: Here's one way to get it from ggplot2. To avoid possible overplotting, I jittered the points horizontally by ± 0.2. I also reduced the point size from the default 2

Re: [R] lattice::xyplot/ggplot2: plotting weighted data frames with lmline and smooth

2011-10-21 Thread Dennis Murphy
Hi Michael: The necessary argument to geom_smooth() is weight, not weights (my fault, sorry), so try this instead: ggplot(PearsonLee, aes(x = parent, y = child)) + geom_point(size = 1.5, position = position_jitter(width = 0.2)) + geom_smooth(method = lm, aes(weight = frequency,

Re: [R] Lattice xyplot log scale labels help!

2011-09-16 Thread Deepayan Sarkar
On Fri, Sep 16, 2011 at 2:17 AM, Cram Rigby cram.ri...@gmail.com wrote: I have a problem with lattice log scales that I could use some help with. I'm trying to print log y-axis scales without exponents in the labels.  A similar thread with Deepayan' recommendation is here:

Re: [R] Lattice xyplot to group by two parameters

2011-06-24 Thread Deepayan Sarkar
On Thu, Jun 23, 2011 at 10:15 PM, Guy Jett gj...@itsi.com wrote: My thanks to this mailing list and its members for their great help in the past.  I have yet another question per the following code and comments: # I need individual graphs grouped by PARLABEL AND Event, with PARLABEL #  

Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-10 Thread Felix Andrews
Hi Girish, Try this: disc - xyplot(cnt_gt50pct_disc ~ week_num|sku_num, data=DF,type = h,lwd=2,panel = function(x, y, ...) { panel.abline(v = x[which.max(y)], lty = 2) panel.xyplot(x, y, ...) }) -Felix On 9 December 2010 17:35, Girish A.R. garam...@gmail.com wrote:

Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-10 Thread Girish A.R.
Thanks, Felix! That works. best, -Girish -- View this message in context: http://r.789695.n4.nabble.com/lattice-xyplot-Help-needed-in-help-in-customizing-the-panel-abline-function-tp3079656p3081792.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-08 Thread Girish A.R.
Sorry, just realized that there was a typo in the following code of my original post. The correct code is as shown below (corrected 'data=swtop16' to 'data=DF'): sales - xyplot(pct_inv_left ~ week_num|sku_num, data=DF,type = l,lwd=2,panel = function(...) { panel.abline(h = 75, lty =

Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-08 Thread Dieter Menne
-- View this message in context: http://r.789695.n4.nabble.com/lattice-xyplot-Help-needed-in-help-in-customizing-the-panel-abline-function-tp3079656p3079697.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-08 Thread Dieter Menne
Girish A.R. wrote: Sorry, just realized that there was a typo in the following code of my original post. The correct code is as shown below (corrected 'data=swtop16' to 'data=DF'): sales - xyplot(pct_inv_left ~ week_num|sku_num, data=DF,type = l,lwd=2,panel = function(...) {

Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-08 Thread Girish A.R.
Thanks for the reply, Dieter. I'm sorry I should have made it clear in my original post - the number (output of which.max()) IS dependent on the grouping.. Thanks, -Girish -- View this message in context:

Re: [R] Lattice: xyplot group title format

2010-11-09 Thread Deepayan Sarkar
On Tue, Nov 9, 2010 at 2:06 AM, Marcus Drescher dresc...@tum.de wrote: Dear all, if I plot a lattice xyplot like: library(lattice); require(stats); Depth - equal.count(quakes$depth, number=8, overlap=.1) xyplot(lat ~ long | Depth, data = quakes) How can I manipulate the group title

Re: [R] lattice xyplot - formatting of multiple Y variables when using subgroups

2010-10-17 Thread Prasenjit Kapat
On Sun, Oct 17, 2010 at 10:01 AM, Coen van Hasselt coenvanhass...@gmail.com wrote: Hi all, Using xyplot I want to print to Y variables (y1, y2) versus X, conditional on the group. How can I obtain a line (type=l) for one relationship (ie. y1 ~ x) and points (type=p) for the other (y2 ~ x) ?

Re: [R] Lattice xyplot and groups

2010-09-24 Thread Deepayan Sarkar
On Wed, Sep 22, 2010 at 12:21 AM, Axel axelg...@gmail.com wrote: Hi, I'm trying to plot many (x, y) data files using the xyplot function from the lattice package. Each file can be classified by set name (s1, s2,...) and data type (A, B, ...). Each data set contains a different number of

Re: [R] Lattice xyplot and groups

2010-09-24 Thread Axel
That would be the logically correct approach. Here are a couple of ways to specify color: That's perfect! Thank you very much. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Lattice xyplot and groups

2010-09-21 Thread Phil Spector
Does using df = df[order(df$type,df$set,df$x),] before calling xyplot fix the problem? - Phil Spector Statistical Computing Facility Department of Statistics

Re: [R] Lattice xyplot and groups

2010-09-21 Thread Axel
Does using     df = df[order(df$type,df$set,df$x),] before calling xyplot fix the problem? Thank you very much for your suggestion. It does make the lines open, but unfortunately it mixes different id together. With the new ordering the plot looks something like this: (x=-10, y_id1) -

Re: [R] lattice::xyplot() with one factor for points and another for lines - solution

2010-08-22 Thread Dennis Murphy
Hi: Yesterday, I posted a question regarding how to handle different graphical behavior between two factors in xyplot() [package lattice]. After a public and private reply from Deepayan Sarkar, the problem has been resolved nicely, including the addition of a stacked legend for the two factors in

Re: [R] lattice::xyplot() with one factor for points and another for lines

2010-08-21 Thread Deepayan Sarkar
On Sat, Aug 21, 2010 at 5:58 AM, Dennis Murphy djmu...@gmail.com wrote: Hi: In lattice, how does one handle separate graphical behavior for two different factors? In the xyplot below, the objective is to use the levels of one factor to distinguish corresponding shapes and colors, and the

Re: [R] lattice xyplot with bty=l

2010-07-07 Thread Deepayan Sarkar
2010/7/5 László Sándor sand...@gmail.com: Hi all, Back in 2007, Deepayan and Patrick had an exchange about how to modify axes for lattice plots (pasted below). I need something similar, but I also need to produce ticks on the axes. Deepayan quickly coded up substitute gridlines because they

Re: [R] lattice xyplot with bty=l

2010-07-07 Thread László Sándor
Thank you, this has been really helpful, I think I have managed to produce the desired effect. However, I am having trouble with generating and passing subscripts from the main xyplot call to panel.superpose. My code resembles the examples (e.g. pp 71-73) in your 2008 book --- though I cannot

Re: [R] lattice xyplot with bty=l

2010-07-05 Thread László Sándor
Hi all, Back in 2007, Deepayan and Patrick had an exchange about how to modify axes for lattice plots (pasted below). I need something similar, but I also need to produce ticks on the axes. Deepayan quickly coded up substitute gridlines because they needed to make the default box transparent. The

Re: [R] lattice, xyplot, using panel.segments by just addressing one panel

2010-06-02 Thread Peter Ehlers
Doris, You might get lucky and find some kind soul who's willing to dig through your *un*reproducible code, but your chances for help would probably increase dramatically if you were to provide *reproducible* and *minimal* code to illustrate your problem. I imagine that you might benefit from

Re: [R] lattice xyplot strip colors and location

2009-10-19 Thread ShankarAjay
Hi Duncan, Thanks for your response and I'm sorry for the delayed reply - think my spam filter is to blame. Your solution did work. Thanks a ton! Shankar Duncan Mackay-2 wrote: Hi Shankar On a slightly different note - below produces a strip to the left without the stacked strips

Re: [R] Lattice xyplot: modify line width of plot lines

2009-08-24 Thread Chuck Cleland
On 8/24/2009 4:47 AM, ukoe...@med.uni-marburg.de wrote: # Hi all, # I want to increase the line width of the plotted lines # in a xy-lattice plot. My own attempts were all in vain. # Without the group option the line width is modified - # with the option it is funnily enough not. # Please

Re: [R] Lattice xyplot: modify line width of plot lines

2009-08-24 Thread ukoenig
Now it works. Many thanks, Chuck! Quoting Chuck Cleland cclel...@optonline.net: On 8/24/2009 4:47 AM, ukoe...@med.uni-marburg.de wrote: # Hi all, # I want to increase the line width of the plotted lines # in a xy-lattice plot. My own attempts were all in vain. # Without the group option the

Re: [R] lattice xyplot strip colors and location

2009-08-20 Thread Duncan Mackay
Hi Shankar On a slightly different note - below produces a strip to the left without the stacked strips require(latticeExtra) # NB install if not found useOuterStrips(strip=strip.custom(bg=skyblue), strip.left=strip.custom(bg=yellow), xyplot(V4~V3|frac.f*stdev.f,

Re: [R] Lattice xyplot: same scales within one factor

2009-08-03 Thread Deepayan Sarkar
On Mon, Jul 13, 2009 at 8:33 AM, OBo.borderl...@gmail.com wrote: I am using R 2.8.1 and lattice to produce xyplots conditioned on two factors. What I would like is to have the scales be free between values of one factor, but some within. Thus, in this example, xyplot(mpg ~ disp | factor(gear)

Re: [R] Lattice xyplot: same scales within one factor

2009-08-03 Thread OB
Thank you! I ended up hunting down a few previous posts you made and getting it to to work, although yes, it was not pretty. -Orion On 8/3/09 10:30 am, Deepayan Sarkar deepayan.sar...@gmail.com wrote: On Mon, Jul 13, 2009 at 8:33 AM, OBo.borderl...@gmail.com wrote: I am using R 2.8.1 and

Re: [R] lattice::xyplot axis padding with fontfamily=mono

2009-05-28 Thread Deepayan Sarkar
On Wed, May 27, 2009 at 4:38 PM, Benjamin Tyner bty...@gmail.com wrote: Hello, Say I have a predictor taking a very wide value:  Data - data.frame(pred=a,resp=1)  print(xyplot(pred~resp, data=Data)) # enough y-axis padding to accommodate the wide

Re: [R] lattice::xyplot axis padding with fontfamily=mono

2009-05-28 Thread Benjamin Tyner
Deepayan, Many thanks for the quick response and suggested workaround. Best, Ben Deepayan Sarkar wrote: On Wed, May 27, 2009 at 4:38 PM, Benjamin Tyner bty...@gmail.com wrote: Hello, Say I have a predictor taking a very wide value: Data -

Re: [R] Lattice xyplot with text under x-axis

2009-04-17 Thread kate.m
A million thanks Deepayan! That works great. Deepayan Sarkar wrote: On Wed, Apr 15, 2009 at 8:59 AM, kate.m katherine...@gmail.com wrote: Hi All, I have a data set which I need to plot and show the values of one of the variables as a second x-axis. library(lattice)

Re: [R] Lattice xyplot with text under x-axis

2009-04-17 Thread kate.m
Still on this question, I'm having problems with displaying the text when repeated values are present. For example: library(lattice) year-c(2001,2002,2003,2001,2002,2003,2001,2002,2003,2001,2002,2003) fac-c(arts,arts,arts,arts,arts,arts,sci,sci,sci,sci,sci,sci)

Re: [R] Lattice xyplot with text under x-axis

2009-04-16 Thread Deepayan Sarkar
On Wed, Apr 15, 2009 at 8:59 AM, kate.m katherine...@gmail.com wrote: Hi All, I have a data set which I need to plot and show the values of one of the variables as a second x-axis. library(lattice) year-c(2001,2002,2003,2004,2005,2006) fac-c(arts,arts,arts,sci,sci,sci)

Re: [R] Lattice xyplot with two y axis

2009-04-14 Thread Richard . Cotton
I have some data which needs to be plotted with lattice. library(lattice) cars - c(0.1, 0.3, 0.6, 0.4, 0.9) trucks - c(0.2, 0.5, 0.4, 0.5, 0.1) drivers-c(121,145,167,200, 210) year-c(2005,2006,2007,2008,2009) type-c(local,local,foreign,foreign,foreign) xyplot(cars+trucks~year|type,

Re: [R] Lattice xyplot with two y axis

2009-04-14 Thread Dieter Menne
taz9 alienz747 at gmail.com writes: I have some data which needs to be plotted with lattice. library(lattice) cars - c(0.1, 0.3, 0.6, 0.4, 0.9) trucks - c(0.2, 0.5, 0.4, 0.5, 0.1) drivers-c(121,145,167,200, 210) year-c(2005,2006,2007,2008,2009) type-c(local,local,foreign,foreign,foreign)

Re: [R] Lattice xyplot with two y axis

2009-04-14 Thread alienz747
Richie, this is perfect! Thank you so much. All the best, Kate On Tue, Apr 14, 2009 at 12:16 PM, richard.cot...@hsl.gov.uk wrote: I have some data which needs to be plotted with lattice. library(lattice) cars - c(0.1, 0.3, 0.6, 0.4, 0.9) trucks - c(0.2, 0.5, 0.4, 0.5, 0.1)

Re: [R] Lattice xyplot: Line and Rectangle in legend.

2009-04-14 Thread Deepayan Sarkar
On Tue, Apr 14, 2009 at 4:39 PM, jimdare jamesdar...@gmail.com wrote: Hello fellow R users, I have a problem.  I have created a barchart overlayed by an xyplot line, both of which read off the same Y axis.  The problem comes when I try to generate a key.  It seems that I can only create

Re: [R] lattice xyplot symbols instead of colors and legend matching plot symbols or colors

2008-09-24 Thread stephen sefick
xyplot(GPP~(1/Iron)+(1/TSS)+TIN.TP, groups=RiverMile,data=f, scales=list(relation=free), par.settings = list( superpose.symbol = list( pch = c(1:7), fill = c(red, blue), col = black)), auto.key=TRUE, panel=function(...){

Re: [R] lattice xyplot symbols instead of colors and legend matching plot symbols or colors

2008-09-24 Thread Deepayan Sarkar
On Wed, Sep 24, 2008 at 10:15 AM, stephen sefick [EMAIL PROTECTED] wrote: I would like to use the data below where the plots are close to what I want. Instead of color I would like to use different symbols, and have the symbols in the legend match the graphs. I am also going to See

Re: [R] lattice xyplot symbols instead of colors and legend matching plot symbols or colors

2008-09-24 Thread stephen sefick
Deepayan I believe that I am dense- I am still having a problem getting it working. I can not figure out how to use packet.number. On Wed, Sep 24, 2008 at 2:56 PM, Deepayan Sarkar [EMAIL PROTECTED] wrote: On Wed, Sep 24, 2008 at 10:15 AM, stephen sefick [EMAIL PROTECTED] wrote: I would like to

Re: [R] lattice xyplot symbols instead of colors and legend matching plot symbols or colors

2008-09-24 Thread Deepayan Sarkar
On Wed, Sep 24, 2008 at 12:30 PM, stephen sefick [EMAIL PROTECTED] wrote: Deepayan I believe that I am dense- I am still having a problem getting it working. I can not figure out how to use packet.number. Something like (untested) panel=function(...){ panel.xyplot(...)

Re: [R] lattice xyplot symbols instead of colors and legend matching plot symbols or colors

2008-09-24 Thread stephen sefick
thanks man my head hurts- that is pretty simple. I was trying to will it done, which seems not to work. On Wed, Sep 24, 2008 at 3:38 PM, Deepayan Sarkar [EMAIL PROTECTED] wrote: On Wed, Sep 24, 2008 at 12:30 PM, stephen sefick [EMAIL PROTECTED] wrote: Deepayan I believe that I am dense- I am

Re: [R] lattice/xyplot: horizontal y-axis labels with scales(relation=free)

2007-10-09 Thread Karl Ove Hufthammer
Andreas Krause: # still vertical despite las=1 xyplot(Sepal.Length ~ Sepal.Width | Species, data=iris, scales=list(relation=free), las=1) xyplot(Sepal.Length ~ Sepal.Width | Species, data=iris, scales=list(relation=free, las=1)) Try xyplot(Sepal.Length ~ Sepal.Width | Species, data=iris,