[Vegan-commits] r456 - in pkg: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Aug 4 13:03:05 CEST 2008


Author: jarioksa
Date: 2008-08-04 13:03:05 +0200 (Mon, 04 Aug 2008)
New Revision: 456

Modified:
   pkg/R/orditkplot.R
   pkg/inst/ChangeLog
Log:
orditkplot: plotting text labels was broken

Modified: pkg/R/orditkplot.R
===================================================================
--- pkg/R/orditkplot.R	2008-08-04 10:28:24 UTC (rev 455)
+++ pkg/R/orditkplot.R	2008-08-04 11:03:05 UTC (rev 456)
@@ -1,3 +1,4 @@
+
 ###
 ### Editable Tcl/Tk plot for ordination
 ###
@@ -416,7 +417,7 @@
     ## with zooming
     if (inherits(x, "orditkplot")) {
         lsco <- scores(x, "labels")
-        laboff <- 0
+        laboff <- rep(0, nrow(lsco))
         lsco <- lsco[rownames(sco),]
     } else {
         lsco <- sco
@@ -431,7 +432,7 @@
                       fill = pbg[i], diam = diam[i])
         xy <- usr2xy(lsco[i,])
         fnt <- c(labfam[i], labsize[i], saneslant(labfnt[i]))
-        lab <- tkcreate(can, "text", xy[1], xy[2]-laboff, text=labs[i],
+        lab <- tkcreate(can, "text", xy[1], xy[2]-laboff[i], text=labs[i],
                         fill = tcol[i], font=fnt)
         tkaddtag(can, "point", "withtag", item)
         tkaddtag(can, "label", "withtag", lab)

Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog	2008-08-04 10:28:24 UTC (rev 455)
+++ pkg/inst/ChangeLog	2008-08-04 11:03:05 UTC (rev 456)
@@ -9,6 +9,9 @@
 
 	* ordiArgAbsorber: now knows about 'choices' and 'display' args
 	of scores(). Reported by Michael Denslow.
+
+	* orditkplot: plotting text labels was broken in the default case
+	(zooming is still broken).
 	
 Version 1.14-7 (closed July 30, 2008)
 



More information about the Vegan-commits mailing list