gmane.comp.lang.r.general.mbox

来自「R-Project是一个开源的统计软件,专门有一个R语言,类似S语言,这个包里面」· MBOX 代码 · 共 1,572 行 · 第 1/5 页

MBOX
1,572
字号
  Bob Muenchen (pronounced Min'-chen), Manager    Statistical Consulting Center  U of TN Office of Information Technology  200 Stokely Management Center, Knoxville, TN 37996-0520  Voice: (865) 974-5230    FAX:   (865) 974-4810  Email: muenchen@utk.edu  Web:   http://oit.utk.edu/scc,   News:  http://listserv.utk.edu/archives/statnews.html______________________________________________R-help@stat.math.ethz.ch mailing listhttps://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.From news@gmane.org Tue Mar 04 03:33:20 2003From: RMan54 <RMan54@cox.net>Subject: xyplot: legend title + legend on 1 lineDate: Fri, 15 Dec 2006 12:41:06 -0800 (PST)Lines: 23Message-ID: <7898800.post@talk.nabble.com>Mime-Version: 1.0Content-Type: text/plain; charset="us-ascii"Content-Transfer-Encoding: 7bitX-From: r-help-bounces@stat.math.ethz.ch Fri Dec 15 21:42:16 2006Return-path: <r-help-bounces@stat.math.ethz.ch>Envelope-to: gclrg-r-help@gmane.orgReceived: from hypatia.math.ethz.ch ([129.132.145.15])	by dough.gmane.org with esmtp (Exim 4.50)	id 1GvJsk-00056a-Rb	for gclrg-r-help@gmane.org; Fri, 15 Dec 2006 21:42:14 +0100Received: from hypatia.math.ethz.ch (hypatia [129.132.145.15])	by hypatia.math.ethz.ch (8.13.6/8.13.6) with ESMTP id kBFKfMRG017955;	Fri, 15 Dec 2006 21:41:32 +0100X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on hypatia.math.ethz.chX-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=AWL, BAYES_50,	SPF_HELO_PASS autolearn=no version=3.1.7Received: from talk.nabble.com (www.nabble.com [72.21.53.35])	by hypatia.math.ethz.ch (8.13.6/8.13.6) with ESMTP id kBFKf77Q017908	(version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO)	for <r-help@stat.math.ethz.ch>; Fri, 15 Dec 2006 21:41:08 +0100Received: from [72.21.53.38] (helo=jubjub.nabble.com)	by talk.nabble.com with esmtp (Exim 4.50) id 1GvJre-0002LX-V9	for r-help@stat.math.ethz.ch; Fri, 15 Dec 2006 12:41:06 -0800To: r-help@stat.math.ethz.chX-Nabble-From: RMan54@cox.netX-Virus-Scanned: by amavisd-new at stat.math.ethz.chX-BeenThere: r-help@stat.math.ethz.chX-Mailman-Version: 2.1.9Precedence: listList-Id: "Main R Mailing List: Primary help" <r-help.stat.math.ethz.ch>List-Unsubscribe: <https://stat.ethz.ch/mailman/listinfo/r-help>,	<mailto:r-help-request@stat.math.ethz.ch?subject=unsubscribe>List-Archive: <https://stat.ethz.ch/pipermail/r-help>List-Post: <mailto:r-help@stat.math.ethz.ch>List-Help: <mailto:r-help-request@stat.math.ethz.ch?subject=help>List-Subscribe: <https://stat.ethz.ch/mailman/listinfo/r-help>,	<mailto:r-help-request@stat.math.ethz.ch?subject=subscribe>Sender: r-help-bounces@stat.math.ethz.chErrors-To: r-help-bounces@stat.math.ethz.chArchived-At: <http://permalink.gmane.org/gmane.comp.lang.r.general/75843>Does anybody know how in xyplot to put the legend title on one line with thelegend? I can get the legend on one line with columns=... but the title isalways on top. I tried a custom key with key=... and text=... but I can'tput the title text in front of the plotting symbol.I am looking for the following layout of the legend, on one line:"Legend Title:" + plot symbol1 + legend text1 + plot symbol2 + legend text2+ ...Thanks. Rene -- View this message in context: http://www.nabble.com/xyplot%3A-legend-title-%2B-legend-on-1-line-tf2829327.html#a7898800Sent from the R help mailing list archive at Nabble.com.______________________________________________R-help@stat.math.ethz.ch mailing listhttps://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.From news@gmane.org Tue Mar 04 03:33:20 2003From: "Deepayan Sarkar" <deepayan.sarkar@gmail.com>Subject: Re: xyplot: legend title + legend on 1 lineDate: Fri, 15 Dec 2006 13:01:56 -0800Lines: 38Message-ID: <eb555e660612151301q324b99fctf8e7924f20014c6@mail.gmail.com>References: <7898800.post@talk.nabble.com>Mime-Version: 1.0Content-Type: text/plain; charset="us-ascii"Content-Transfer-Encoding: 7bitCc: r-help@stat.math.ethz.chX-From: r-help-bounces@stat.math.ethz.ch Fri Dec 15 22:08:43 2006Return-path: <r-help-bounces@stat.math.ethz.ch>Envelope-to: gclrg-r-help@gmane.orgReceived: from hypatia.math.ethz.ch ([129.132.145.15])	by ciao.gmane.org with esmtp (Exim 4.43)	id 1GvKI0-0007IB-QX	for gclrg-r-help@gmane.org; Fri, 15 Dec 2006 22:08:21 +0100Received: from hypatia.math.ethz.ch (hypatia [129.132.145.15])	by hypatia.math.ethz.ch (8.13.6/8.13.6) with ESMTP id kBFL26L6025290;	Fri, 15 Dec 2006 22:02:28 +0100X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on hypatia.math.ethz.chX-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=AWL,	BAYES_50 autolearn=no version=3.1.7Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.238])	by hypatia.math.ethz.ch (8.13.6/8.13.6) with ESMTP id kBFL1vZY025218	for <r-help@stat.math.ethz.ch>; Fri, 15 Dec 2006 22:01:58 +0100Received: by nz-out-0506.google.com with SMTP id i11so464706nzh	for <r-help@stat.math.ethz.ch>; Fri, 15 Dec 2006 13:01:57 -0800 (PST)Received: by 10.64.10.2 with SMTP id 2mr1758743qbj.1166216516836;	Fri, 15 Dec 2006 13:01:56 -0800 (PST)Received: by 10.65.97.6 with HTTP; Fri, 15 Dec 2006 13:01:56 -0800 (PST)To: RMan54 <RMan54@cox.net>In-Reply-To: <7898800.post@talk.nabble.com>Content-Disposition: inlineX-Virus-Scanned: by amavisd-new at stat.math.ethz.chX-BeenThere: r-help@stat.math.ethz.chX-Mailman-Version: 2.1.9Precedence: listList-Id: "Main R Mailing List: Primary help" <r-help.stat.math.ethz.ch>List-Unsubscribe: <https://stat.ethz.ch/mailman/listinfo/r-help>,	<mailto:r-help-request@stat.math.ethz.ch?subject=unsubscribe>List-Archive: <https://stat.ethz.ch/pipermail/r-help>List-Post: <mailto:r-help@stat.math.ethz.ch>List-Help: <mailto:r-help-request@stat.math.ethz.ch?subject=help>List-Subscribe: <https://stat.ethz.ch/mailman/listinfo/r-help>,	<mailto:r-help-request@stat.math.ethz.ch?subject=subscribe>Sender: r-help-bounces@stat.math.ethz.chErrors-To: r-help-bounces@stat.math.ethz.chArchived-At: <http://permalink.gmane.org/gmane.comp.lang.r.general/75844>On 12/15/06, RMan54 <RMan54@cox.net> wrote:>> Does anybody know how in xyplot to put the legend title on one line with the> legend? I can get the legend on one line with columns=... but the title is> always on top. I tried a custom key with key=... and text=... but I can't> put the title text in front of the plotting symbol.>> I am looking for the following layout of the legend, on one line:>> "Legend Title:" + plot symbol1 + legend text1 + plot symbol2 + legend text2> + ...You can create a grob (grid object) representing this legend, or afunction that produces such a grob, and pass it to xyplot through the'legend' argument (see ?xyplot). The 'key' argument essentiallycontrols one such built-in function, namely 'draw.key', which does notsupport such legends.Note however, that column types can be repeated in key, so you mightbe able to fake such a legend. E.g.:xyplot(1 ~ 1,       key =       list(text = list("title: ", font = 2),            points = list(pch = 1),            text = list("1"),            points = list(pch = 2),            text = list("2")))-Deepayan______________________________________________R-help@stat.math.ethz.ch mailing listhttps://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.From news@gmane.org Tue Mar 04 03:33:20 2003From: RMan54 <RMan54@cox.net>Subject: xyplot: logarithmic y-axisDate: Fri, 15 Dec 2006 14:12:22 -0800 (PST)Lines: 46Message-ID: <7900202.post@talk.nabble.com>Mime-Version: 1.0Content-Type: text/plain; charset="us-ascii"Content-Transfer-Encoding: 7bitX-From: r-help-bounces@stat.math.ethz.ch Fri Dec 15 23:13:53 2006Return-path: <r-help-bounces@stat.math.ethz.ch>Envelope-to: gclrg-r-help@gmane.orgReceived: from hypatia.math.ethz.ch ([129.132.145.15])	by dough.gmane.org with esmtp (Exim 4.50)	id 1GvLJM-0000QA-5e	for gclrg-r-help@gmane.org; Fri, 15 Dec 2006 23:13:48 +0100Received: from hypatia.math.ethz.ch (hypatia [129.132.145.15])	by hypatia.math.ethz.ch (8.13.6/8.13.6) with ESMTP id kBFMCY1R013097;	Fri, 15 Dec 2006 23:13:09 +0100X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on hypatia.math.ethz.chX-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=AWL, BAYES_50,	SPF_HELO_PASS autolearn=no version=3.1.7Received: from talk.nabble.com (www.nabble.com [72.21.53.35])	by hypatia.math.ethz.ch (8.13.6/8.13.6) with ESMTP id kBFMCOQh013029	(version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO)	for <r-help@stat.math.ethz.ch>; Fri, 15 Dec 2006 23:12:26 +0100Received: from [72.21.53.38] (helo=jubjub.nabble.com)	by talk.nabble.com with esmtp (Exim 4.50) id 1GvLHy-00065q-7B	for r-help@stat.math.ethz.ch; Fri, 15 Dec 2006 14:12:22 -0800To: r-help@stat.math.ethz.chX-Nabble-From: RMan54@cox.netX-Virus-Scanned: by amavisd-new at stat.math.ethz.chX-BeenThere: r-help@stat.math.ethz.chX-Mailman-Version: 2.1.9Precedence: listList-Id: "Main R Mailing List: Primary help" <r-help.stat.math.ethz.ch>List-Unsubscribe: <https://stat.ethz.ch/mailman/listinfo/r-help>,	<mailto:r-help-request@stat.math.ethz.ch?subject=unsubscribe>List-Archive: <https://stat.ethz.ch/pipermail/r-help>List-Post: <mailto:r-help@stat.math.ethz.ch>List-Help: <mailto:r-help-request@stat.math.ethz.ch?subject=help>List-Subscribe: <https://stat.ethz.ch/mailman/listinfo/r-help>,	<mailto:r-help-request@stat.math.ethz.ch?subject=subscribe>Sender: r-help-bounces@stat.math.ethz.chErrors-To: r-help-bounces@stat.math.ethz.chArchived-At: <http://permalink.gmane.org/gmane.comp.lang.r.general/75845>This should be simple but I am struggling. I like to easily switch in xyplotbetween a linear or logarithmic y-axis by setting a logical flag logY toFalse or True. This switch changes the scales argument of xyplot. I foundout that the original two-dimentional data (Conc vs Time in my case) areconverted to log10(Conc) if log=TRUE in scales, but it appears thatfunctions like panel.curve need to provide the y values in log10 form (ifthere is an automatic method, I would like to know). I therefore like topass on the value logY to my custom panel.curve function. How do I do that?I think that the value of logY should go into xyplot that should pass it onto the panel function and then to the panel.curve function.Thanks, -RenelogY=TRUE# Custom panel.curve functionmyCurve <-function(x, log) {    f <- ...   #  calculate curve here    if (log==TRUE) f <- log10(f)    return(f)}xyplot(Conc ~ Time | Subj,       groups=Dose,       data = mydata,       as.table=TRUE,       scales=list(y=list(log=logY)),       panel = function(...) {           panel.abline(h=c(0, 50, 100, 150, 200, 250) ,                      v=c(0,24,48,72,96), col.line="gray")           panel.xyplot(...)           panel.curve(myCurve, from=0, to=96, n=300))           }       )-- View this message in context: http://www.nabble.com/xyplot%3A-logarithmic-y-axis-tf2829755.html#a7900202Sent from the R help mailing list archive at Nabble.com.______________________________________________R-help@stat.math.ethz.ch mailing listhttps://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.From news@gmane.org Tue Mar 04 03:33:20 2003From: "Deepayan Sarkar" <deepayan.sarkar@gmail.com>Subject: Re: xyplot: logarithmic y-axisDate: Fri, 15 Dec 2006 14:26:47 -0800Lines: 23Message-ID: <eb555e660612151426s30981295r30e3d3ee123f412f@mail.gmail.com>References: <7900202.post@talk.nabble.com>Mime-Version: 1.0Content-Type: text/plain; charset="us-ascii"Content-Transfer-Encoding: 7bitCc: r-help@stat.math.ethz.chX-From: r-help-bounces@stat.math.ethz.ch Fri Dec 15 23:27:39 2006Return-path: <r-help-bounces@stat.math.ethz.ch>Envelope-to: gclrg-r-help@gmane.orgReceived: from hypatia.math.ethz.ch ([129.132.145.15])	by dough.gmane.org with esmtp (Exim 4.50)	id 1GvLWb-0002EO-Q3	for gclrg-r-help@gmane.org; Fri, 15 Dec 2006 23:27:29 +0100Received: from hypatia.math.ethz.ch (hypatia [129.132.145.15])	by hypatia.math.ethz.ch (8.13.6/8.13.6) with ESMTP id kBFMQsmb017293;	Fri, 15 Dec 2006 23:27:11 +0100X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on hypatia.math.ethz.chX-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=AWL,	BAYES_50 autolearn=no version=3.1.7Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178])	by hypatia.math.ethz.ch (8.13.6/8.13.6) with ESMTP id kBFMQl01017253	for <r-help@stat.math.ethz.ch>; Fri, 15 Dec 2006 23:26:48 +0100Received: by py-out-1112.google.com with SMTP id a25so595617pyi	for <r-help@stat.math.ethz.ch>; Fri, 15 Dec 2006 14:26:47 -0800 (PST)Received: by 10.65.188.20 with SMTP id q20mr1868166qbp.1166221607119;	Fri, 15 Dec 2006 14:26:47 -0800 (PST)Received: by 10.65.97.6 with HTTP; Fri, 15 Dec 2006 14:26:47 -0800 (PST)To: RMan54 <RMan54@cox.net>In-Reply-To: <7900202.post@talk.nabble.com>Content-Disposition: inline

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?