[med-svn] [r-cran-adegraphics] 06/13: New upstream version 1.0-6

Andreas Tille tille at debian.org
Sat Sep 30 06:27:00 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-cran-adegraphics.

commit 909699e49d3e8fcb0a02ed5adc6ac45ac3fc4c10
Author: Andreas Tille <tille at debian.org>
Date:   Sat Sep 30 08:15:37 2017 +0200

    New upstream version 1.0-6
---
 DESCRIPTION                        |   34 +
 MD5                                |  190 +++++
 NAMESPACE                          |  197 +++++
 R/ADEg.C1.R                        |  294 +++++++
 R/ADEg.R                           |  356 ++++++++
 R/ADEg.S1.R                        |  360 ++++++++
 R/ADEg.S2.R                        |  416 ++++++++++
 R/ADEg.T.R                         |  238 ++++++
 R/ADEg.Tr.R                        |  173 ++++
 R/ADEgS.R                          |  637 +++++++++++++++
 R/C1.barchart.R                    |  172 ++++
 R/C1.curve.R                       |  124 +++
 R/C1.curves.R                      |   83 ++
 R/C1.density.R                     |  249 ++++++
 R/C1.dotplot.R                     |  125 +++
 R/C1.gauss.R                       |  249 ++++++
 R/C1.hist.R                        |  136 +++
 R/C1.interval.R                    |  160 ++++
 R/S1.boxplot.R                     |  246 ++++++
 R/S1.class.R                       |  246 ++++++
 R/S1.distri.R                      |  197 +++++
 R/S1.label.R                       |  165 ++++
 R/S1.match.R                       |  190 +++++
 R/S2.arrow.R                       |  131 +++
 R/S2.class.R                       |  281 +++++++
 R/S2.corcircle.R                   |  127 +++
 R/S2.density.R                     |  148 ++++
 R/S2.distri.R                      |  202 +++++
 R/S2.image.R                       |  180 ++++
 R/S2.label.R                       |  114 +++
 R/S2.logo.R                        |  108 +++
 R/S2.match.R                       |  138 ++++
 R/S2.traject.R                     |  191 +++++
 R/S2.value.R                       |  179 ++++
 R/T.cont.R                         |   56 ++
 R/T.image.R                        |  194 +++++
 R/T.value.R                        |  194 +++++
 R/Tr.class.R                       |  265 ++++++
 R/Tr.label.R                       |  196 +++++
 R/Tr.match.R                       |  132 +++
 R/Tr.traject.R                     |  186 +++++
 R/addtext.R                        |   78 ++
 R/ade4-kplot.R                     |  471 +++++++++++
 R/ade4-plot.R                      | 1569 +++++++++++++++++++++++++++++++++++
 R/ade4-scatter.R                   |  694 ++++++++++++++++
 R/adeGsenv.R                       |   76 ++
 R/genericMethod.R                  |   32 +
 R/multiplot.R                      |  605 ++++++++++++++
 R/panelfunctions.R                 |  256 ++++++
 R/parameter.R                      |  273 +++++++
 R/s.Spatial.R                      |  109 +++
 R/utils.R                          |  486 +++++++++++
 R/utilsADEgS.R                     |  238 ++++++
 R/utilsclass.R                     |  105 +++
 R/utilskey.R                       |  217 +++++
 R/utilstriangle.R                  |  172 ++++
 build/vignette.rds                 |  Bin 0 -> 214 bytes
 debian/README.test                 |    8 -
 debian/changelog                   |   23 -
 debian/compat                      |    1 -
 debian/control                     |   29 -
 debian/copyright                   |   32 -
 debian/docs                        |    3 -
 debian/rules                       |    4 -
 debian/source/format               |    1 -
 debian/tests/control               |    3 -
 debian/tests/run-unit-test         |   14 -
 debian/watch                       |    3 -
 inst/doc/adegraphics.R             |  335 ++++++++
 inst/doc/adegraphics.Rmd           | 1252 ++++++++++++++++++++++++++++
 inst/doc/adegraphics.html          | 1589 ++++++++++++++++++++++++++++++++++++
 man/ADEg-class.Rd                  |  159 ++++
 man/ADEg.C1-class.Rd               |  110 +++
 man/ADEg.S1-class.Rd               |  119 +++
 man/ADEg.S2-class.Rd               |  127 +++
 man/ADEg.T-class.Rd                |  106 +++
 man/ADEg.Tr-class.Rd               |  103 +++
 man/ADEgS-class.Rd                 |  173 ++++
 man/ADEgS.Rd                       |   64 ++
 man/C1.barchart-class.Rd           |   82 ++
 man/C1.curve-class.Rd              |   91 +++
 man/C1.density-class.Rd            |   96 +++
 man/C1.dotplot-class.Rd            |   82 ++
 man/C1.gauss-class.Rd              |   97 +++
 man/C1.hist-class.Rd               |   92 +++
 man/C1.interval-class.Rd           |   85 ++
 man/S1.boxplot-class.Rd            |   90 ++
 man/S1.class-class.Rd              |   95 +++
 man/S1.distri-class.Rd             |   92 +++
 man/S1.label-class.Rd              |   89 ++
 man/S1.match-class.Rd              |   86 ++
 man/S2.arrow-class.Rd              |   90 ++
 man/S2.class-class.Rd              |  101 +++
 man/S2.corcircle-class.Rd          |   91 +++
 man/S2.density-class.Rd            |   96 +++
 man/S2.distri-class.Rd             |   96 +++
 man/S2.image-class.Rd              |   98 +++
 man/S2.label-class.Rd              |   84 ++
 man/S2.logo-class.Rd               |   87 ++
 man/S2.match-class.Rd              |   87 ++
 man/S2.traject-class.Rd            |   89 ++
 man/S2.value-class.Rd              |  109 +++
 man/T.cont-class.Rd                |   89 ++
 man/T.image-class.Rd               |   94 +++
 man/T.value-class.Rd               |  109 +++
 man/Tr.class-class.Rd              |  103 +++
 man/Tr.label-class.Rd              |   94 +++
 man/Tr.match-class.Rd              |   86 ++
 man/Tr.traject-class.Rd            |   90 ++
 man/add.ADEg.Rd                    |   53 ++
 man/addhist.Rd                     |   96 +++
 man/addtext.Rd                     |   61 ++
 man/adeg.panel.Spatial.Rd          |   92 +++
 man/adeg.panel.hist.Rd             |   53 ++
 man/adeg.panel.join.Rd             |   38 +
 man/adeg.panel.label.Rd            |   73 ++
 man/adeg.panel.nb.Rd               |   84 ++
 man/adeg.panel.values.Rd           |   84 ++
 man/adegpar.Rd                     |  236 ++++++
 man/adegraphics-internal.Rd        |   29 +
 man/adegraphics-package.Rd         |   81 ++
 man/cbindADEg.Rd                   |   50 ++
 man/changelatticetheme.Rd          |   45 +
 man/getcall-methods.Rd             |   26 +
 man/insert.Rd                      |   90 ++
 man/layout2position.Rd             |   49 ++
 man/panel-methods.Rd               |   87 ++
 man/plot.Rd                        |  220 +++++
 man/plotEig.Rd                     |   80 ++
 man/prepare-methods.Rd             |   96 +++
 man/s.Spatial.Rd                   |   73 ++
 man/s.arrow.Rd                     |   80 ++
 man/s.class.Rd                     |  114 +++
 man/s.corcircle.Rd                 |   70 ++
 man/s.density.Rd                   |   89 ++
 man/s.distri.Rd                    |   80 ++
 man/s.image.Rd                     |  116 +++
 man/s.label.Rd                     |   80 ++
 man/s.logo.Rd                      |   79 ++
 man/s.match.Rd                     |   78 ++
 man/s.traject.Rd                   |   88 ++
 man/s.value.Rd                     |  112 +++
 man/s1d.barchart.Rd                |   68 ++
 man/s1d.boxplot.Rd                 |   74 ++
 man/s1d.class.Rd                   |   90 ++
 man/s1d.curve.Rd                   |   72 ++
 man/s1d.curves.Rd                  |   68 ++
 man/s1d.density.Rd                 |   82 ++
 man/s1d.distri.Rd                  |   98 +++
 man/s1d.dotplot.Rd                 |   72 ++
 man/s1d.gauss.Rd                   |   82 ++
 man/s1d.hist.Rd                    |   76 ++
 man/s1d.interval.Rd                |   75 ++
 man/s1d.label.Rd                   |   76 ++
 man/s1d.match.Rd                   |   70 ++
 man/setlimits1D.Rd                 |   47 ++
 man/sortparamADEg.Rd               |   57 ++
 man/superpose.Rd                   |  106 +++
 man/table.image.Rd                 |   83 ++
 man/table.value.Rd                 |  125 +++
 man/triangle.class.Rd              |   88 ++
 man/triangle.label.Rd              |   88 ++
 man/triangle.match.Rd              |   72 ++
 man/triangle.traject.Rd            |   89 ++
 man/zoom.Rd                        |   48 ++
 tests/add.R                        |   61 ++
 tests/adegraphics.R                |   41 +
 tests/nbgraph.R                    |   15 +
 tests/panelSpatial.R               |   84 ++
 tests/parameter.R                  |   95 +++
 tests/s1d.boxplot.R                |   31 +
 tests/s1d.density.R                |   12 +
 tests/s1d.distri.R                 |   15 +
 tests/s1d.gauss.R                  |   18 +
 tests/s1d.label.R                  |   11 +
 tests/s1d.match.R                  |    6 +
 tests/s1dclass.R                   |   28 +
 tests/sarrow.R                     |   33 +
 tests/scatter.R                    |   56 ++
 tests/sclass.R                     |   28 +
 tests/scorcircle.R                 |   10 +
 tests/sdensity.R                   |   13 +
 tests/sdistri.R                    |   31 +
 tests/shist.R                      |   16 +
 tests/simage.R                     |   26 +
 tests/slabel.R                     |   24 +
 tests/slogo.R                      |   18 +
 tests/smatch.R                     |   10 +
 tests/straject.R                   |   19 +
 tests/svalue.R                     |   37 +
 tests/tdist.R                      |   19 +
 tests/timage.R                     |   26 +
 tests/triangle.R                   |   31 +
 tests/tvalue.R                     |   58 ++
 vignettes/adegraphics.Rmd          | 1252 ++++++++++++++++++++++++++++
 vignettes/adegraphics.bib          |   33 +
 vignettes/classes.png              |  Bin 0 -> 756947 bytes
 vignettes/gargsVSclass.R           |   11 +
 vignettes/gargsVSclass.csv         |   42 +
 vignettes/paramVSfunction.R        |   10 +
 vignettes/paramVSparam.R           |   46 ++
 vignettes/tableparamVSfunction.csv |   31 +
 202 files changed, 27432 insertions(+), 121 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
new file mode 100644
index 0000000..7a4c8be
--- /dev/null
+++ b/DESCRIPTION
@@ -0,0 +1,34 @@
+Package: adegraphics
+Type: Package
+Title: An S4 Lattice-Based Package for the Representation of
+        Multivariate Data
+Version: 1.0-6
+Date: 2016-12-13
+Author: Stéphane Dray <stephane.dray at univ-lyon1.fr> and Aurélie Siberchicot <aurelie.siberchicot at univ-lyon1.fr>, with contributions from Jean Thioulouse. Based on earlier work by Alice Julien-Laferrière.
+Maintainer: Aurélie Siberchicot <aurelie.siberchicot at univ-lyon1.fr>
+Description: Graphical functionalities for the representation of multivariate data. It is a complete re-implementation of the functions available in the 'ade4' package.
+Depends: R (>= 3.0.2)
+License: GPL (>= 2)
+Imports: ade4, graphics, grid, KernSmooth, lattice, latticeExtra,
+        methods, RColorBrewer, sp (>= 1.1-1), stats
+Suggests: Guerry, knitr, maptools, pixmap, rmarkdown, spdep, splancs
+Collate: adeGsenv.R parameter.R utils.R utilstriangle.R genericMethod.R
+        utilsclass.R panelfunctions.R ADEg.R ADEgS.R utilsADEgS.R
+        ADEg.C1.R C1.barchart.R C1.curve.R C1.curves.R C1.density.R
+        C1.gauss.R C1.dotplot.R C1.hist.R C1.interval.R ADEg.S1.R
+        S1.boxplot.R S1.class.R S1.distri.R S1.label.R S1.match.R
+        ADEg.S2.R S2.arrow.R S2.class.R S2.corcircle.R S2.density.R
+        S2.distri.R S2.image.R S2.label.R S2.logo.R S2.match.R
+        S2.traject.R S2.value.R ADEg.T.R T.image.R T.value.R T.cont.R
+        ADEg.Tr.R Tr.class.R Tr.label.R Tr.match.R Tr.traject.R
+        addtext.R ade4-kplot.R ade4-scatter.R ade4-plot.R multiplot.R
+        s.Spatial.R utilskey.R
+URL: http://pbil.univ-lyon1.fr/ADE-4, Mailing list:
+        http://listes.univ-lyon1.fr/wws/info/adelist
+BugReports: https://github.com/sdray/adegraphics/issues
+Encoding: UTF-8
+VignetteBuilder: knitr
+NeedsCompilation: no
+Packaged: 2016-12-13 16:26:49 UTC; aurelie
+Repository: CRAN
+Date/Publication: 2016-12-13 19:53:07
diff --git a/MD5 b/MD5
new file mode 100644
index 0000000..dd8b8be
--- /dev/null
+++ b/MD5
@@ -0,0 +1,190 @@
+c9064e2cdb7d3561005682df1d9ae101 *DESCRIPTION
+b4088c0e1885d7be5a5dd041292c145d *NAMESPACE
+df8836b16fe378a33be9f8a4ed3b6f77 *R/ADEg.C1.R
+f9398e5cc9c57c5c4b6835dde14f7bc5 *R/ADEg.R
+f66e5c9cf7175cf176069c5ad2ba7080 *R/ADEg.S1.R
+56c4944df0f38bfc2ff1abc55855de58 *R/ADEg.S2.R
+faef3f753ccb139fe60508736b784f5b *R/ADEg.T.R
+be814ef56be814a617cee2e398627b69 *R/ADEg.Tr.R
+7f50e188e2d69328b1b306fe5645ada9 *R/ADEgS.R
+a9697051052b07eafeae670191b6d155 *R/C1.barchart.R
+14cf56097d2a3477a34f91cac9dc1ade *R/C1.curve.R
+1cbfe1cfa4facb3b8bf03bf6ec9a7b33 *R/C1.curves.R
+1a18230d19f601760c1e49da814d7807 *R/C1.density.R
+b22c962b6f85ec74c512817ab03b816b *R/C1.dotplot.R
+5dfc1a965b5db9e39dcfc7d735f4ee60 *R/C1.gauss.R
+e2ed04a387365c8f28913a7f7a5f3843 *R/C1.hist.R
+80879bed3d247f407f9b18103c2e9fe2 *R/C1.interval.R
+c13eb6e9a077eb3bd31f1714ba1fe863 *R/S1.boxplot.R
+0d7eb82fe6783a5380dd2f2b6bcf936a *R/S1.class.R
+b7188f7d92e5986ec6c987188978d26d *R/S1.distri.R
+49299eab6e71fa09994fc724ded2052f *R/S1.label.R
+003a1a9798720cffd544741a9dcab3ec *R/S1.match.R
+1ba8275849af24e24b048e6e7b53ac14 *R/S2.arrow.R
+3dee3c620b44926ed59559ccc97caea9 *R/S2.class.R
+edc0f1922dce276f13ce6e079fa42163 *R/S2.corcircle.R
+e04707c70cbdde635c0bdff9c2cade7f *R/S2.density.R
+1b6af8729aa4ff39982c1ede804a3624 *R/S2.distri.R
+21b8b7a59c875b83be4ac2ce24901d2c *R/S2.image.R
+e5a9a6d2195c499a9e0ae15450d2d5ae *R/S2.label.R
+1478e4cb28f0ef20d2acbcd46fe6c494 *R/S2.logo.R
+b2ead4be3f1d2b4035ca40d190d65e09 *R/S2.match.R
+79942dadf862f16357ebcb2742e2569d *R/S2.traject.R
+25003bf829528c22fcd39b0f178675af *R/S2.value.R
+0e8d0ea82221d74f6b162321d2828f4d *R/T.cont.R
+ea211464493a4b4a7e56e030ce5ba124 *R/T.image.R
+4dd2f8a5545a3ba0c3b9f2e48440a8e4 *R/T.value.R
+722944d7d97edebbc1e6ce98061f82a8 *R/Tr.class.R
+9867e403405d299ca1cd737a310f329f *R/Tr.label.R
+ff06fe70abb0e3218aaaa904f4f2d487 *R/Tr.match.R
+212b2031be6b85efd371d270b56ea852 *R/Tr.traject.R
+826e3790fd381de7f09e6f57e4cda593 *R/addtext.R
+5c21e6a21545a45fbdbcea330b1d8c0d *R/ade4-kplot.R
+cd420ae778a28028f906c737735de3de *R/ade4-plot.R
+15650c713cbfefb6b2e4b5cc9da6ccfe *R/ade4-scatter.R
+970d295db2936d608f06cbd2ece30b50 *R/adeGsenv.R
+746e00372f84ac545a79667e09908efa *R/genericMethod.R
+183974f7b76b53212392b1572ae8cd7c *R/multiplot.R
+cd4865b82faf10c95e2ac6441d3b77b5 *R/panelfunctions.R
+cd3035aad7ee190549860f64ae62517e *R/parameter.R
+a9ba768a5e37c3ae5d61ed0c92ebb3fc *R/s.Spatial.R
+c5fb3cf01f58d61a11c7f2b55dce1751 *R/utils.R
+2b66c0ed9f670b26bf2cd12b488ca8d3 *R/utilsADEgS.R
+cadc907d6b204acff6fd94143b178b4c *R/utilsclass.R
+800f764310cebf74dbb286040c08773d *R/utilskey.R
+bf8d58f56fec3d532e6611ee839eb1b6 *R/utilstriangle.R
+99623dc54757368ff1e66bb8dee7bffd *build/vignette.rds
+04415e8f14da2aa15ba85a78303903da *inst/doc/adegraphics.R
+96835067ef72b58fc1e77ababd8a7422 *inst/doc/adegraphics.Rmd
+b874ea04c11baef18318a25a21d712c1 *inst/doc/adegraphics.html
+5598610d87d39c76f4655ded0eb71939 *man/ADEg-class.Rd
+04d2d39bbab2e82a441b1dbb4f996e29 *man/ADEg.C1-class.Rd
+fe42debb511ab4a929b9029778b4fdac *man/ADEg.S1-class.Rd
+fbdf0df2c03ed9297d5e812eef1e68a0 *man/ADEg.S2-class.Rd
+911ffe3a951cab8e45199dfb7b3a8e63 *man/ADEg.T-class.Rd
+fefb3b817bcb32d08afb0d4d8fc9494c *man/ADEg.Tr-class.Rd
+0baa08dcf2af5cb4f5907e6ddf959ac7 *man/ADEgS-class.Rd
+ff24343f2c2fe48dee8142b6bbd5b605 *man/ADEgS.Rd
+fa08acc7a15dc7b2086a431f3c2c36e4 *man/C1.barchart-class.Rd
+1250e8ac88f1739a8cbf1274e6298467 *man/C1.curve-class.Rd
+06cc64ed333d3fc5cdde3ba14f26c559 *man/C1.density-class.Rd
+b438e7afdb9592d106ab927d94e1e014 *man/C1.dotplot-class.Rd
+3061b29846f210d2aca0e6152d5aca11 *man/C1.gauss-class.Rd
+d216ddb2c2b58a05d8f0f72349559ea9 *man/C1.hist-class.Rd
+2d6d101a398b8c5e1bd33aaef5df6415 *man/C1.interval-class.Rd
+7ae1eadd9adf1ab229886b554d8e698b *man/S1.boxplot-class.Rd
+de5f6476be1f6a9ab016c88b91c9bbf7 *man/S1.class-class.Rd
+dcdd8a493382df52d7bebf25adc2bdcf *man/S1.distri-class.Rd
+ccdf3bc2fe1fa928c01b3e3eb6a1fe77 *man/S1.label-class.Rd
+9233128a5129ec98a5b0ffb768d99ec8 *man/S1.match-class.Rd
+4fb52e7b683616c6a717ee66d9cb12b4 *man/S2.arrow-class.Rd
+14bdd69fbfb066826de381bd7d45fc6e *man/S2.class-class.Rd
+50c3549ba79a734cf55f0431860ed0db *man/S2.corcircle-class.Rd
+64fea9fc12633cfaa5e19d570d60bf2f *man/S2.density-class.Rd
+821f8156feee060b07e5031cb4fe4a13 *man/S2.distri-class.Rd
+04520e2cf701a51b9af7a8a9e055a7b1 *man/S2.image-class.Rd
+425d1128f82830cf8c9e065c21218608 *man/S2.label-class.Rd
+5b7cf8c2ceb2e019abcbe8680401630f *man/S2.logo-class.Rd
+425abe8b71bbeea2b60618fb6345cf78 *man/S2.match-class.Rd
+b55f15033357545e498bd2916eda4a28 *man/S2.traject-class.Rd
+99ee1dac269f87545d9d4531bd7892c1 *man/S2.value-class.Rd
+8c8e2e372dd37cb0c4993d6c39f90d9f *man/T.cont-class.Rd
+1c62778fdcab3fb8c2bbc44979a4b83f *man/T.image-class.Rd
+4d9d77163bb26e7bd695048caca831ce *man/T.value-class.Rd
+4f00222ee88ee4ee93cf7a98c59723fb *man/Tr.class-class.Rd
+eebd649933116bbd0a3d157103e3893c *man/Tr.label-class.Rd
+271d927c3968008b8b842a69cd2dd731 *man/Tr.match-class.Rd
+5ae2ceb127ac94164bccb3028ad122a5 *man/Tr.traject-class.Rd
+0c7b0685e07ffcc4b795eebd2cb3db38 *man/add.ADEg.Rd
+1fc0b2b157d5b97948a8e93e31769f5d *man/addhist.Rd
+bb283a094b87babd471d66563b27a7f3 *man/addtext.Rd
+58f81adbd9988c70f2cd4b147934cf6f *man/adeg.panel.Spatial.Rd
+b00d3d52049c9dff5aacfe730d87ccf2 *man/adeg.panel.hist.Rd
+8c7ae1f804a77a8887fa713bb9482de6 *man/adeg.panel.join.Rd
+6a5e3577fd76312d52549c073c6584bc *man/adeg.panel.label.Rd
+3623561abff649bb261c70026cac672a *man/adeg.panel.nb.Rd
+8689bfefeeea15cd3488939e48d2250f *man/adeg.panel.values.Rd
+616d9e555ee43859a71580ac9e9aa922 *man/adegpar.Rd
+b236f2fcf939e84c32c2f12947a6d646 *man/adegraphics-internal.Rd
+fedc5cf01f9d563af504159774e000d5 *man/adegraphics-package.Rd
+4583b908e3dba3541a6aead9d4847a8d *man/cbindADEg.Rd
+6c129bbd3c7d6cdb0a1250de3d60e295 *man/changelatticetheme.Rd
+3685372b4e0b9847d9cc4c002d245eb4 *man/getcall-methods.Rd
+0f38ace18b1d17e3ce74086db5cecab8 *man/insert.Rd
+349c1d1984cfd9297fc1cd48c1658b7a *man/layout2position.Rd
+54125b8cd7e930803ed18aae6196b54a *man/panel-methods.Rd
+7179d3392bb42d312143c73f3d1fe816 *man/plot.Rd
+22f22e39e74120ce0473c5bae267d26d *man/plotEig.Rd
+8c1d6460e342bf764802ea0a1b4377e9 *man/prepare-methods.Rd
+41cfc1dfc69a32198c38faa9ba75e224 *man/s.Spatial.Rd
+6c34d9ac54550d66665c875b40a09010 *man/s.arrow.Rd
+405755d59de8e046df922cde0ed6494c *man/s.class.Rd
+62611638daec8c5448a6ce369a715107 *man/s.corcircle.Rd
+0d743ad4bc59be66347c21a0a08f24e1 *man/s.density.Rd
+4f4b13b10306a004ee688befecb9fe46 *man/s.distri.Rd
+2e8e1ce20792aefb1308184135ffe2d2 *man/s.image.Rd
+3bdcb6cb1b937b09c9a5e6ec183b90a1 *man/s.label.Rd
+f7b6296c463e32fe39e277d1a40429ab *man/s.logo.Rd
+7b61953336ea5ce084586e689eb9bce3 *man/s.match.Rd
+d27b943fe8bae0ce295e5fd72587dffc *man/s.traject.Rd
+de5a2b09ca7820b23ce4fdc372600217 *man/s.value.Rd
+aa089763207bb38418192cef8e76d3df *man/s1d.barchart.Rd
+9a7a01eed3541b4f8bb4067dd94934f4 *man/s1d.boxplot.Rd
+b395fc2c44c262fa62e52fe3a3ec1897 *man/s1d.class.Rd
+1e2078d044e58c8ae36ffedd79f751d5 *man/s1d.curve.Rd
+0b1b30396480f8d75ba2e7ba972f1dac *man/s1d.curves.Rd
+05906da995f25431db2250868c7c7c4c *man/s1d.density.Rd
+5a837a311c574253054b7852c14569d6 *man/s1d.distri.Rd
+b6d20f9b0fec290688e53237f4897d50 *man/s1d.dotplot.Rd
+00fd13742b93c09bb7931b318d756538 *man/s1d.gauss.Rd
+f978ad297d26ea7934c1b502c6446690 *man/s1d.hist.Rd
+06bc6632401967ed221f319f9e087aed *man/s1d.interval.Rd
+c33b37cb982dabf45d9a2e6a7104c2fa *man/s1d.label.Rd
+1eb668e640b0ef5f01803e7b054756a7 *man/s1d.match.Rd
+ce346255dced36dcf23801268c8b7325 *man/setlimits1D.Rd
+d521408a977531b8d58c7c7e29ea8f1b *man/sortparamADEg.Rd
+e0f5a596dd873f9a49f36532fffef83b *man/superpose.Rd
+1b2d4e5770016736118a9cbde8ecde89 *man/table.image.Rd
+84885822abf9dd54add96dbff22e64ce *man/table.value.Rd
+94b4c00b0ecf6a885f37360e5a363c51 *man/triangle.class.Rd
+b3da4bd4af2cd0052020122b32f54463 *man/triangle.label.Rd
+f7ac2a54fc22d3d9ea646a5376c8bf9b *man/triangle.match.Rd
+acf04240fc9c7c9aaa9dcaa73bd736a9 *man/triangle.traject.Rd
+c3afe7c260dd4eca59f03ca2097fafec *man/zoom.Rd
+87607bc1b86138bbbb0667739fa79509 *tests/add.R
+5e517dea83edac5c1a447f6ed495010a *tests/adegraphics.R
+b972f806bdbee4ec9f3fd927a8dfcea5 *tests/nbgraph.R
+b59896741bc5fb770981ce39ece4153c *tests/panelSpatial.R
+3e3147b27f2c2186e26e74c50bfd29d9 *tests/parameter.R
+98a7f5006087b4b99503d0f74c012f70 *tests/s1d.boxplot.R
+e4293117f250e3c2da4effecfec646a2 *tests/s1d.density.R
+30bc20653ace8330292bdd9b73fa0545 *tests/s1d.distri.R
+0a768ca7ca7fc0814485775868ad6c2b *tests/s1d.gauss.R
+8e45493f980b7849afe935d58c240a50 *tests/s1d.label.R
+c3348687040f2feb1b3eebeda243807d *tests/s1d.match.R
+013b48dab2c93d3d3193b99f8c09c86d *tests/s1dclass.R
+52b160917b369ee6858e014c6b91b02c *tests/sarrow.R
+1d92c17c7ecc8e852cb0b7d888be072a *tests/scatter.R
+ef50b9359296a3f505633a0e61c57a02 *tests/sclass.R
+6993e0e8d73d680a334e074346c50557 *tests/scorcircle.R
+d392c714ea6d79272352bab7be7431a8 *tests/sdensity.R
+ecd998290ff8bb644566af1bb3342e48 *tests/sdistri.R
+cadc360d96b0efce0ff26e9612861068 *tests/shist.R
+88f63a7d0ec6ada153178b85f6523879 *tests/simage.R
+8c2fb65981c2f3725beb6e728381a151 *tests/slabel.R
+63a01fedc36a56f8068425bd4d32dedc *tests/slogo.R
+8696faeff707e9a82616e28609b8aed3 *tests/smatch.R
+09cf5aab7878e7dc29e4ce1f772895c3 *tests/straject.R
+e9906442c53b7f9a7b47872344b81836 *tests/svalue.R
+7e73862d40b79c633de9c90716449759 *tests/tdist.R
+3ab3d03a658dc2bf44d97a1b062546a6 *tests/timage.R
+22e0c33678322769bdbd349bdd157368 *tests/triangle.R
+9f29a1e52787d2db73feed37a3e432fc *tests/tvalue.R
+96835067ef72b58fc1e77ababd8a7422 *vignettes/adegraphics.Rmd
+fee78b9fb7f2f4c820ceba919fa3ea76 *vignettes/adegraphics.bib
+1520393ca0966c7fe6a7311f3b72a27f *vignettes/classes.png
+1d77c7392af1b74694a1a360391faf63 *vignettes/gargsVSclass.R
+b5a2e8d2b525dd92ef3d9fcac3b4fa6a *vignettes/gargsVSclass.csv
+f2678b6a3b44dfed82563a378d98d086 *vignettes/paramVSfunction.R
+2b0090986571a97a477ad4154b503786 *vignettes/paramVSparam.R
+f6179df0e8e9082cd6ca1c6b2aa42a3e *vignettes/tableparamVSfunction.csv
diff --git a/NAMESPACE b/NAMESPACE
new file mode 100644
index 0000000..40548e4
--- /dev/null
+++ b/NAMESPACE
@@ -0,0 +1,197 @@
+import("grDevices")
+import("grid")
+import("lattice")
+import("utils")
+importFrom("ade4", "covfacwt", "covwt", "dudi.pca", "inertia.dudi", "kplot", "meanfacwt", "scatter", "score", "varfacwt", "varwt")
+importFrom("graphics", "hist", "plot")
+importFrom("KernSmooth", "bkde", "bkde2D")
+importFrom("latticeExtra", "panel.ellipse")
+importFrom("methods", "callNextMethod", "new", "show", "validObject")
+importFrom("RColorBrewer", "brewer.pal")
+importFrom("sp", "GridTopology", "is.projected", "Polygon", "Polygons", "proj4string", "sp.grid", "sp.lines", "sp.points", "sp.polygons", "SpatialGrid", "SpatialPointsDataFrame", "SpatialPolygons", "SpatialPolygonsDataFrame", "sppanel")
+importMethodsFrom("sp", "[", "bbox", "coerce", "coordinates", "over")
+importClassesFrom("sp", "Spatial", "SpatialGrid", "SpatialGridDataFrame", "SpatialLines", "SpatialLinesDataFrame", "SpatialPoints", "SpatialPointsDataFrame", "SpatialPolygons", "SpatialPolygonsDataFrame")
+importFrom("stats", "as.formula", "biplot", "coefficients", "dnorm", "formula", "lm", "loess", "predict", "quantile", "reorder", "runif", "screeplot", "weighted.mean")
+
+S3method("biplot", "dudi")
+S3method("kplot", "foucart")
+S3method("kplot", "mbpcaiv")
+S3method("kplot", "mcoa")
+S3method("kplot", "mfa")
+S3method("kplot", "pta")
+S3method("kplot", "sepan")
+S3method("kplot", "statis")  
+S3method("plot", "acm")
+S3method("plot", "betcoi")
+S3method("plot", "betdpcoa")
+S3method("plot", "betwitdpcoa")
+S3method("plot", "betrlq")
+S3method("plot", "between")
+S3method("plot", "coinertia")
+S3method("plot", "discrimin")
+S3method("plot", "dpcoa")
+S3method("plot", "fca")
+S3method("plot", "foucart")
+S3method("plot", "inertia")
+S3method("plot", "krandboot")
+S3method("plot", "krandxval")
+S3method("plot", "mcoa")
+S3method("plot", "mfa")
+S3method("plot", "multiblock")
+S3method("plot", "multispati")
+S3method("plot", "niche") 
+S3method("plot", "pcaiv")
+S3method("plot", "procuste")
+S3method("plot", "randboot")
+S3method("plot", "randxval")
+S3method("plot", "rlq")
+S3method("plot", "pta")
+S3method("plot", "sepan")
+S3method("plot", "statis")
+S3method("plot", "witcoi")
+S3method("plot", "witdpcoa")
+S3method("plot", "within")
+S3method("plot", "witrlq")
+S3method("scatter", "coa")
+S3method("scatter", "dudi")
+S3method("scatter", "nipals")
+S3method("scatter", "pco")
+S3method("score", "acm")
+S3method("score", "mix")
+S3method("score", "pca")
+S3method("screeplot", "dudi")
+
+export(
+  "adegpar",
+  "adeg.panel.label",
+  "adeg.panel.edges",
+  "adeg.panel.nb",
+  "adeg.panel.Spatial",
+  "adeg.panel.values",
+  "adeg.panel.hist",
+  "adeg.panel.join",
+  "layout2position",
+  "as.raster.pixmapRGB",
+  "as.raster.pixmapGrey",
+  "changelatticetheme",
+  "sortparamADEg",
+  "sortparamADEgS",
+  "setlimits2D",
+  "setlimits1D",
+  "plotEig",
+  "ADEgS",
+  "s.label",
+  "s.corcircle",
+  "s.arrow",
+  "s.class",
+  "s.distri",
+  "s.value",
+  "s.image",
+  "s.logo",
+  "s.density",
+  "s.match",
+  "s.Spatial",
+  "s.traject",
+  "table.value",
+  "table.image",
+  "triangle.label",
+  "triangle.match",
+  "triangle.class",
+  "triangle.traject",
+  "s1d.label",
+  "s1d.class",
+  "s1d.curve",
+  "s1d.curves",
+  "s1d.density",
+  "s1d.distri",
+  "s1d.dotplot",
+  "s1d.gauss",
+  "s1d.hist",
+  "s1d.barchart",
+  "s1d.interval",
+  "s1d.match",
+  "s1d.boxplot",
+  "kplot",
+  "kplotsepan.coa",
+  "biplot",
+  "plot",
+  "scatter",
+  "score",
+  "screeplot"
+  )
+
+exportMethods(
+  "[",
+  "[[",
+  "[[<-",
+  "+",
+  "$",
+  "length",
+  "names",
+  "names<-",
+  "cbindADEg",
+  "rbindADEg",
+  "add.ADEg",
+  "addhist",
+  "addtext",
+  "getcall",
+  "getgraphics",
+  "getlatticecall",
+  "getparameters",
+  "getpositions",
+  "getstats",
+  "gettrellis",
+  "insert",
+  "panel",
+  "panelbase",
+  "plot",
+  "prepare",
+  "print",
+  "printSuperpose",
+  "setlatticecall",
+  "show",
+  "superpose",
+  "update",
+  "zoom"
+  )
+
+exportClasses(
+  "ADEg",
+  "ADEgS",
+  "ADEg.C1",
+  "ADEg.S1",
+  "ADEg.S2",
+  "ADEg.T",
+  "ADEg.Tr",
+  "C1.barchart",
+  "C1.curve",
+  "C1.curves",
+  "C1.density",
+  "C1.dotplot",
+  "C1.gauss",
+  "C1.hist",
+  "C1.interval",
+  "S1.boxplot",
+  "S1.class",
+  "S1.distri",
+  "S1.label",
+  "S1.match",
+  "S2.arrow",
+  "S2.class",
+  "S2.corcircle",
+  "S2.density",
+  "S2.distri",
+  "S2.image",
+  "S2.label",
+  "S2.logo",
+  "S2.match",
+  "S2.traject",
+  "S2.value",
+  "T.cont",
+  "T.image",
+  "T.value",
+  "Tr.class",
+  "Tr.label",
+  "Tr.match",
+  "Tr.traject"
+  )
diff --git a/R/ADEg.C1.R b/R/ADEg.C1.R
new file mode 100644
index 0000000..1aa9617
--- /dev/null
+++ b/R/ADEg.C1.R
@@ -0,0 +1,294 @@
+####################################################
+##              Curves Plot                       ##
+##        1d score represents in 2D plot          ##
+####################################################
+setClass(
+    Class = "ADEg.C1",
+    contains = c("ADEg", "VIRTUAL"),
+    slots = c(data = "list")
+    )
+
+setMethod(
+    f = "initialize",
+    signature  = "ADEg.C1",
+    definition = function(.Object, data = list(score = NULL, frame = 0, storeData = TRUE), ...) {
+        .Object <- callNextMethod(.Object, ...) ## ADEg initialize
+        .Object at data <- data
+        return(.Object)
+    })
+
+
+setMethod(
+    f = "prepare",
+    signature = "ADEg.C1",
+    definition = function(object) {
+        ## prepare: grid calculations
+        ## reset limits and sets axis information for lattice
+        
+        name_obj <- deparse(substitute(object))
+        if(object at data$storeData)
+            score <- object at data$score
+        else
+            score <- eval(object at data$score, envir = sys.frame(object at data$frame))
+        
+        if(inherits(object, "C1.curve") | inherits(object, "C1.dotplot") | inherits(object, "C1.interval"))
+            if(object at data$storeData)
+                at <- object at data$at
+            else
+                at <- eval(object at data$at, envir = sys.frame(object at data$frame))
+        
+        if(inherits(object, "C1.curves"))
+            score <- as.matrix(score)
+        else
+            score <- as.matrix(score)[, 1]  ## to manage 'score' when it is a data.frame with only one column
+        
+        if(class(object) == "C1.interval")  ## to manage only the first score in c(score1, score2)
+            score <- score[1:(length(score) / 2)]
+        
+        ## limits and scale
+        if(!is.null(object at s.misc$hori.update))
+            if(object at s.misc$hori.update != object at adeg.par$p1d$horizontal) {
+                aux <- object at g.args$xlim
+                object at g.args$xlim <- object at g.args$ylim
+                object at g.args$ylim <- aux 
+            }
+        object at s.misc$hori.update <- object at adeg.par$p1d$horizontal
+        
+        minX <- min(score)
+        maxX <- max(score)
+        if(object at adeg.par$p1d$horizontal & !is.null(object at g.args$xlim)) {
+            minX <- object at g.args$xlim[1]
+            maxX <- object at g.args$xlim[2]
+        }
+
+        if(!object at adeg.par$p1d$horizontal & !is.null(object at g.args$ylim)) {
+            minX <- object at g.args$ylim[1]
+            maxX <- object at g.args$ylim[2]
+        }
+
+        origin <- object at adeg.par$porigin
+        lim <- setlimits1D(minX, maxX, origin = origin$origin[1], includeOr = origin$include)
+
+        ## compute grid size
+        tmp <- pretty(lim, n = object at adeg.par$pgrid$nint)
+        if(!origin$include)
+            origin$origin[1] <- tmp[1]
+        
+        cgrid <- diff(tmp)[1]
+        if(is.na(cgrid))
+            stop("error while calculating grid")
+
+        ## compute grid location
+        v0 <- origin$origin[1]
+        if((origin$origin[1] + cgrid) <= lim[2])
+            v0 <- c(v0, seq(origin$origin[1] + cgrid, lim[2], by = cgrid))
+        if((origin$origin[1] - cgrid >= lim[1]))
+            v0 <- c(v0, seq(origin$origin[1] - cgrid, lim[1], by = -cgrid))
+        v0 <- sort(v0[v0 >= lim[1] & v0 <= lim[2]])
+
+        ## clean near-zero values
+        delta <- diff(range(v0))/object at adeg.par$pgrid$nint
+        if (any(small <- abs(v0) < 1e-14 * delta)) 
+            v0[small] <- 0
+
+        object at s.misc$backgrid <- list(x = v0, d = cgrid)
+
+        ## object at adeg.par$paxes has priority over object at g.args$scales
+        scalesandlab <- modifyList(as.list(object at g.args$scales), object at adeg.par$paxes, keep.null = TRUE)
+        
+        if(!scalesandlab$draw) {
+            scalesandlab$x$draw <- FALSE
+            scalesandlab$y$draw <- FALSE
+        }
+        
+        lead <- ifelse(object at adeg.par$p1d$reverse, 1 , -1)
+        
+        if(object at adeg.par$p1d$horizontal) {
+            ## draw axes for horizontal plot
+            if(is.null(scalesandlab$x$at))
+                scalesandlab$x$at <- object at s.misc$backgrid$x
+            
+            if(is.null(object at g.args$xlim))
+                object at g.args$xlim <- lim
+            
+        } else {
+            ## draw axes for vertical plot
+            if(is.null(scalesandlab$y$at))
+                scalesandlab$y$at <- object at s.misc$backgrid$x
+            
+            if(is.null(object at g.args$ylim))
+                object at g.args$ylim <- lim
+            
+        }
+        
+        object at g.args$scales <- scalesandlab
+        assign(name_obj, object, envir = parent.frame())
+    })
+
+
+setMethod(
+    f = "panelbase",
+    signature = "ADEg.C1",
+    definition = function(object, x, y) {
+        ## Formula defined in gettrellis
+        ## if horizontal, x is score and y is a vector with repetitions of origin
+        ## if vertical, this is the inverse
+        grid <- object at adeg.par$pgrid
+        porigin <- object at adeg.par$porigin 
+        pscore <- object at adeg.par$p1d
+        lims <- current.panel.limits(unit = "native")
+        
+        ## for rugs
+        if(pscore$rug$draw & (pscore$rug$tck != 0)) {
+            plines <- object at adeg.par$plines
+            if(!is.null(object at data$fac)) {
+                ## C1.density or C1.gauss (different colors for rugs)
+                if(object at data$storeData)
+                    fac <- as.factor(object at data$fac)
+                else
+                    fac <- as.factor(eval(object at data$fac, envir = sys.frame(object at data$frame)))
+                plines <- lapply(plines, FUN = function(x) {return(rep(x, length.out = nlevels(fac))[fac])})
+            }
+        }
+        lead <- ifelse(pscore$reverse, -1, 1)
+        
+        if(pscore$horizontal) {
+            ## horizontal plot
+            
+            ## set margins to get some place for rug
+            ref <- ifelse(pscore$reverse, lims$ylim[2], lims$ylim[1])
+            margin <- ref
+            if(pscore$rug$draw)
+                margin <- ifelse(is.unit(pscore$rug$margin), convertUnit(pscore$rug$margin, typeFrom = "dimension", unitTo = "native", axisFrom = "y", valueOnly = TRUE), pscore$rug$margin)
+            
+            ## draw grid
+            if(grid$draw)
+                panel.segments(x0 = object at s.misc$backgrid$x , x1 = object at s.misc$backgrid$x, y0 = lims$ylim[1], y1 = lims$ylim[2], col = grid$col, lty = grid$lty, lwd = grid$lwd)
+            
+            ## draw origin
+            panel.abline(
+                v = if(porigin$draw) porigin$origin else NULL,
+                h = if(pscore$rug$draw & pscore$rug$line) ref + lead * margin else NULL,
+                col = porigin$col, lwd = porigin$lwd, lty = porigin$lty, alpha = porigin$alpha)
+            
+            ## draw rug
+            if(pscore$rug$draw & (pscore$rug$tck != 0)) {
+                ## tick end and starting points
+                start <- ref + lead * margin
+                end <- (start - pscore$rug$tck * lead * abs(start - ref))
+                start <- convertUnit(unit(start, "native"), unitTo = "npc", axisFrom = "y", valueOnly = TRUE)
+                end <- convertUnit(unit(end, "native"), unitTo = "npc", axisFrom = "y", valueOnly = TRUE)
+                do.call("panel.rug", c(list(x = y, start = start, end = end), plines))
+            }
+            
+        } else {
+            ## vertical plot
+            
+            ## set margins to get some place for rug
+            ref <- ifelse(pscore$reverse, lims$xlim[2], lims$xlim[1])
+            margin <- ref
+            if(pscore$rug$draw)          
+                margin <- ifelse(is.unit(pscore$rug$margin), convertUnit(pscore$rug$margin, typeFrom = "dimension", unitTo = "native", axisFrom = "x", valueOnly = TRUE), pscore$rug$margin)
+            
+            ## draw grid
+            if(grid$draw)
+                panel.segments(y0 = object at s.misc$backgrid$x , y1 = object at s.misc$backgrid$x, x0 = lims$xlim[1], x1 = lims$xlim[2], col = grid$col, lty = grid$lty, lwd = grid$lwd)
+
+            ## draw origin
+            panel.abline(
+                h = if(porigin$draw) porigin$origin else NULL,
+                v = if(pscore$rug$draw & pscore$rug$line) ref + lead * margin else NULL,
+                col = porigin$col, lwd = porigin$lwd, lty = porigin$lty, alpha = porigin$alpha)
+
+            ## draw rug
+            if(pscore$rug$draw && pscore$rug$tck != 0) {
+                ## tick end and starting points
+                start <- ref + lead * margin
+                end <- (start - pscore$rug$tck * lead * abs(start - ref))
+                start <- convertUnit(unit(start, "native"), unitTo = "npc", axisFrom = "x", valueOnly = TRUE)
+                end <- convertUnit(unit(end, "native"), unitTo = "npc", axisFrom = "x", valueOnly = TRUE)
+                do.call("panel.rug", c(list(y = y, start = start, end = end), plines))
+            }
+        }
+
+        ## indicate grid size (d = **)
+        if(grid$draw & (grid$text$cex > 0)) { 
+            text.pos <- .setposition(grid$text$pos)
+            textgrid <- textGrob(label = paste("d =", object at s.misc$backgrid$d), x = text.pos$posi[1], y = text.pos$posi[2], gp = gpar(cex = grid$text$cex, col = grid$text$col), name = "gridtext")
+            grid.rect(x = text.pos$posi[1], y = text.pos$posi[2], width = grobWidth(textgrid), height = grobHeight(textgrid), gp = gpar(fill = object at adeg.par$pbackground$col, alpha = 0.8, col = "transparent"))
+            grid.draw(textgrid)
+        }
+        
+        callNextMethod()
+    })
+
+
+setMethod(
+    f = "setlatticecall",
+    signature = "ADEg.C1",
+    definition = function(object) {
+        ## arguments recurrents de la liste, pas les limites car elles seront definis ensuite
+        name_obj <- deparse(substitute(object))
+
+        ## grid background and box
+        object at trellis.par$panel.background$col <- object at adeg.par$pbackground$col
+        if(!object at adeg.par$pbackground$box)
+            object at trellis.par$axis.line$col <- "transparent"
+        
+        arguments <- list(
+            par.settings = object at trellis.par,
+            scales = object at g.args$scales,
+            key = createkey(object),
+            axis = axis.L, ## see utils.R
+            panel = function(...) {
+                panelbase(object, ...) ## grid,
+                panel(object, ...) ## call to C1.panel function, for slabel and ADEg.C1 class of graphs
+            })
+        
+        object at lattice.call$arguments <- arguments          
+        object at lattice.call$graphictype <- "xyplot" 
+
+        ## get lattice arguments (set unspecified to NULL)
+        argnames <- c("main", "sub", "xlab", "ylab")
+        largs <- object at g.args[argnames]
+        names(largs) <- argnames
+        ## add xlim and ylim if not NULL
+        if("xlim" %in% names(object at g.args))
+            largs["xlim"] <- object at g.args["xlim"]
+        if("ylim" %in% names(object at g.args))
+            largs["ylim"] <- object at g.args["ylim"]
+        
+        object at lattice.call$arguments <- c(object at lattice.call$arguments, largs, list(strip = FALSE))
+        assign(name_obj, object, envir = parent.frame())
+    })
+
+
+setMethod(
+    f = "gettrellis",
+    signature = "ADEg.C1",
+    definition = function(object) {
+        if(object at data$storeData)
+            score <- object at data$score
+        else
+            score <- eval(object at data$score, envir = sys.frame(object at data$frame))
+        
+        if(inherits(object, "C1.curves"))
+            score <- as.matrix(score)
+        else
+            score <- as.matrix(score)[, 1]  ## to manage 'score' when it is a data.frame with only one column
+
+        xdata <- rep(1, length(score))
+        if(inherits(object, "C1.barchart")) {
+            xdata <- 1:length(score)
+        } else if(inherits(object, "C1.dotplot") | inherits(object, "C1.curve") | inherits(object, "C1.interval")) {
+            if(object at data$storeData)
+                xdata <- object at data$at
+            else
+                xdata <- eval(object at data$at, envir = sys.frame(object at data$frame))
+        }
+        
+        fml <- as.formula(score ~ xdata)
+        
+        tmptrellis <- do.call(what = object at lattice.call$graphictype, args = c(fml, object at lattice.call$arguments, environment()))
+        return(tmptrellis)
+    })
diff --git a/R/ADEg.R b/R/ADEg.R
new file mode 100644
index 0000000..d25f474
--- /dev/null
+++ b/R/ADEg.R
@@ -0,0 +1,356 @@
+##############################################
+##               general class              ##
+##############################################
+
+setClass(
+  Class = "ADEg",
+  contains = "VIRTUAL",
+  slots = c(
+    trellis.par = "list",
+    adeg.par = "list",
+    lattice.call = "list",
+    g.args = "list",
+    stats = "list",
+    s.misc = "list",
+    Call = "call")
+	## validity
+	## validity = function(object){return(TRUE)}
+)
+
+##############################################          
+##                 initialize               ##
+##############################################       
+
+setMethod(
+  f = "initialize",
+  signature = "ADEg",
+  definition = function(.Object, trellis.par = list(), adeg.par = list(), lattice.call = list(), g.args = list(), stats = list(), s.misc = list(), Call = call("emptycall"), ...) {
+    .Object at trellis.par <- trellis.par
+    .Object at adeg.par <- adeg.par
+    .Object at lattice.call <- lattice.call
+    .Object at g.args <- g.args
+    .Object at stats <- stats
+    .Object at s.misc <- s.misc
+    .Object at Call <- Call
+    return(.Object)
+  })
+
+
+setOldClass("trellis")
+setClassUnion(name = "ADEgORtrellis", members = c("ADEg", "trellis"))
+
+
+setMethod(
+  f = "panelbase",
+  signature = "ADEg",
+  definition = function(object, x, y) {
+    
+    whichpanel <- packet.number()
+    sub <- lapply(object at adeg.par$psub, FUN = function(x) {rep(x, length.out = max(whichpanel, 2))}) ## repeat at least twice for position coordinates
+    if(is.numeric(object at adeg.par$psub$position)) 
+      num <- 1
+    else 
+      num <- 0
+    
+    if(sub$cex[whichpanel] && (sub$text[whichpanel] != "")) {
+      if(!num)
+        posit <- .setposition(sub$position[whichpanel])     
+      else
+        posit <- .setposition(sub$position[(2 * whichpanel - 1):(2 * whichpanel)])
+      text <- textGrob(label = sub$text[whichpanel], x = posit$posi[1], y = posit$posi[2], gp = gpar(cex = sub$cex[whichpanel], col = sub$col[whichpanel]), just = posit$just, name = paste("subtitle_", whichpanel, sep = ""))            
+      grid.rect(x = posit$posi[1], y = posit$posi[2], width = grobWidth(text), height = grobHeight(text), just = posit$just, gp = gpar(fill =  ifelse(class(object) == "S2.corcircle" | inherits(object, "ADEg.Tr"), "transparent", object at adeg.par$pbackground$col), alpha = 1, col = "transparent"))
+      grid.draw(text)
+    }
+  })
+
+##############################################          
+##      Get elements/information            ##
+##############################################
+
+setMethod(
+  f = "getparameters",
+  signature = "ADEg",
+  definition = function(object, number = 0) {	
+    if(number == 0)
+      return(list(trellis.par = object at trellis.par, adeg.par = object at adeg.par, g.args = object at g.args))
+    if(number == 1)
+      return(object at trellis.par)
+    if(number == 2)
+      return(object at adeg.par)
+    stop("wrong number for getparameters")
+  })
+
+
+setMethod(
+  f = "getlatticecall",
+  signature = "ADEg",
+  definition = function(object) {
+    return(object at lattice.call)
+  })
+
+
+setMethod(
+  f = "getcall",
+  signature = "ADEg",
+  definition = function(object) {
+    return(object at Call)
+  })
+
+
+setMethod(
+  f = "getstats",
+  signature = "ADEg",
+  definition = function(object) {
+    return(object at stats)
+  })
+
+
+##############################################          
+##               superposition              ##
+##############################################
+
+## g1 superpose on refg
+## settings about margin limits ect... taken from refg
+## modified object only displayed (not save), original limits ect are kept 
+setMethod(
+  f = "printSuperpose",
+  signature = c("ADEgORtrellis", "ADEgORtrellis"),
+  definition = function(g1, refg) {
+    ## to respect axis, limits, etc., we work directly on the trellis objects.
+    if(inherits(refg, "ADEg")) {
+      trelref <- gettrellis(refg)
+      if(inherits(g1, "ADEg")) {
+      	g1 at adeg.par$pgrid$draw <- FALSE
+      	g1 at g.args$xlim <- refg at g.args$xlim
+      	g1 at g.args$ylim <- refg at g.args$ylim
+      	g1 at adeg.par$paxes$draw <- refg at adeg.par$paxes$draw
+        g1 at adeg.par$pbackground$col <- "transparent"	## useful for S2.corcircle
+      	g1 at adeg.par$porigin$draw <- FALSE
+      	g1 at s.misc$scales <- refg at s.misc$scales
+        
+      	if(inherits(g1, "ADEg.Tr") & inherits(refg, "ADEg.Tr")) {
+  	      g1 at g.args$min3d <- refg at g.args$min3d
+        	g1 at g.args$max3d <- refg at g.args$max3d
+        	g1 at adeg.par$pgrid$text$cex <- 0 ## no text corner for g1
+        	g1 at lattice.call$arguments$par.settings$axis.text$cex <- 0
+      	}
+      	setlatticecall(g1)
+      	trel1 <- gettrellis(g1)
+      } else {
+      	trel1 <- g1
+      }
+    } else {  ## refg is a trellis
+      trelref <- refg
+      if(inherits(g1, "ADEg")) {
+        g1 at adeg.par$pgrid$draw <- FALSE
+      	g1 at g.args$xlim <- refg$x.limits
+      	g1 at g.args$ylim <- refg$y.limits
+      	g1 at adeg.par$paxes$draw <- refg$x.scales$draw * refg$y.scales$draw
+      	g1 at adeg.par$porigin$draw <- FALSE
+        g1 at g.args$xlab <- ""
+        g1 at g.args$ylab <- ""
+        
+      	setlatticecall(g1)
+      	trel1 <- gettrellis(g1)
+      } else {
+        trel1 <- g1
+      }
+    }
+    
+    trel1$par.settings$panel.background$col <- "transparent"
+    trel1$par.settings$axis.text$alpha <- 0
+    trel1$par.settings$axis.line$col <- "transparent"
+    
+    names <- c("x.scales", "y.scales", "xlab", "ylab", "main", "sub", "x.between", "y.between", "as.table", "x.limits", "y.limits", "aspect.ratio")            
+    for(i in names)
+      trel1[[i]] <- trelref[[i]]
+
+    print(trel1, newpage = FALSE)
+  })
+
+  
+setMethod(
+  f = "superpose",
+  signature = c("ADEgORtrellis", "ADEgORtrellis", "ANY", "ANY"),
+  definition = function(g1, g2, which, plot) {
+    addi <- matrix(0, 2, 2)
+    addi[1, 2] <- 1
+    obj <- new(Class = "ADEgS", ADEglist = list(g1, g2), positions = matrix(rep(c(0, 1), each = 4), 2, 4), add = addi, Call = match.call())
+    if(plot)
+      print(obj)
+    invisible(obj)
+  })
+
+  
+##############################################          
+##                   insertion              ##
+##############################################
+
+setMethod(
+  f = "insert", 
+  signature = c("ADEgORtrellis", "missing"),
+  definition = function(graphics, oldgraphics, posi, ratio, inset, plot, which) {
+    positions <- .getposition(posi, w = ratio, h = ratio) + inset
+    currentgraphic <- get("currentadeg", envir = .ADEgEnv)
+    if(!(length(currentgraphic)))
+      stop("no existing graphics")
+    else
+      newADEgS <- insert(graphics = graphics, oldgraphics = currentgraphic, posi = posi, ratio = ratio, inset = inset, plot = plot, which = which)
+    
+    if(plot)
+      print(newADEgS[length(newADEgS)], closeViewport = FALSE)
+    assign("currentadeg", newADEgS, envir = .ADEgEnv)
+    invisible(newADEgS)
+  })
+
+
+setMethod(
+  f = "insert", 
+  signature = c("ADEgORtrellis", "ADEg"),
+  definition = function(graphics, oldgraphics, posi, ratio, inset, plot) {
+    positions <- .getposition(posi, w = ratio, h = ratio) + inset
+    thecall <- call("insert", graphics at Call, oldgraphics at Call)
+    newADEgS <- new(Class = "ADEgS", ADEglist = list(oldgraphics, graphics), positions = rbind(c(0, 0, 1, 1), positions), add = matrix(0, ncol = 2, nrow = 2), Call = thecall)
+    if(plot)     
+      print(newADEgS)
+    assign("currentadeg", newADEgS, envir = .ADEgEnv)
+    invisible(newADEgS)
+  })
+
+  
+##############################################          
+##                   Add                    ##
+##############################################
+
+setMethod(
+  f = "+",
+  signature = c("ADEg", "ADEg"),
+  definition = function(e1, e2) {
+    newobj <- superpose(e1, e2)
+    newobj at Call <- match.call()
+    return(newobj)
+  })
+
+
+setMethod(
+  f = "add.ADEg",
+  signature = c("ADEg"),
+  definition = function(object) {
+    previous <- get("currentadeg", envir = .ADEgEnv)
+    if(!(length(previous))) 
+      stop("no graph to add to")
+    
+    objects <- superpose(previous, object)
+    if(inherits(previous, "ADEg"))              
+      printSuperpose(object, previous, position = c(0, 0, 1, 1))
+    
+    else if(inherits(previous, "ADEgS"))
+      printSuperpose(object, previous[[length(previous)]], position = previous at positions[length(previous), ])
+#    lattice:::lattice.setStatus(print.more = FALSE)
+    assign("currentadeg", objects, envir = .ADEgEnv)
+    invisible(objects)
+  })
+
+##############################################          
+##                  Update                  ##
+##############################################
+
+## update the modified parameters
+setMethod(
+  f = "update",
+  signature = "ADEg",
+  definition = function(object, ..., plot = TRUE) {
+    nameobj <- deparse(substitute(object, env = parent.frame(n = 1)))
+    ## object is in parent.frame() because 'update' method pattern is different with 'update' generic method pattern
+    ## see https://stat.ethz.ch/pipermail/r-help/2008-January/152296.html
+    
+    ## extract specific slots used in function call
+    pattern <- names(object at g.args)
+    lpattern <- as.list(rep("", length(pattern)))
+    names(lpattern) <- pattern
+    
+    ## sort parameters
+    sep <- separation(..., pattern = lpattern)
+    selection <- sortparamADEg(sep[[2]])
+    selection$g.args <- c(selection$g.args, sep[[1]])
+    
+    if(length(selection$rest))
+      warning(c("Unused parameters: ", paste(unique(names(selection$rest)), " ", sep = "")), call. = FALSE)
+    
+    object at adeg.par <- modifyList(object at adeg.par, selection$adepar, keep.null = TRUE)
+    object at trellis.par <- modifyList(object at trellis.par, selection$trellis, keep.null = TRUE)
+    object at g.args <- modifyList(object at g.args, selection$g.args, keep.null = TRUE)
+    
+    prepare(object)
+    setlatticecall(object)
+    if(plot)
+      print(object)
+    
+    assign(nameobj, object, envir = parent.frame(n = 2))
+    ## see also https://stat.ethz.ch/pipermail/r-help/2008-January/152296.html
+    
+    assign("currentadeg", object, envir = .ADEgEnv)
+  })
+
+
+##############################################          
+##                   Display                ##
+##############################################
+
+setMethod(
+  f = "show",
+  signature = "ADEg",
+  definition = function(object) {
+    print(object)
+  })
+
+
+setMethod(
+  f = "plot",
+  signature = c("ADEg", "ANY"),
+  definition = function(x, y, adjust = FALSE) {
+    print(x, adjust = adjust)
+  })
+
+
+setMethod(
+  f = "print",
+  signature = c("ADEg"),
+  definition = function(x, adjust = FALSE, newpage = TRUE) {
+		## if adjust, graphic limits are readjust according to the device size.
+		## for now it is only available if only an ADEg is drawn (not in ADEgS)
+    if(adjust) {
+      aspp <- dev.size()  ## device size (in inches)
+      ratid <- aspp[1] / aspp[2]
+      oxlim <- x at lattice.call$arguments$xlim  ## old xlim
+      oylim <- x at lattice.call$arguments$ylim
+      ratig <- diff(oxlim) / diff(oylim)
+      ## if not mandatory ...?
+      if((ratid / ratig) > 1) { 
+        ## width device bigger (relative) than width graphic        
+        centerx <- oxlim[1] + diff(oxlim) / 2
+        nxlim <- rep(centerx, 2) + c(-1, 1) * ((ratid * diff(oylim)) / 2)
+        nylim <- oylim
+      }
+      else if((ratid / ratig) < 1) {  ## then relative device height bigger than relative graphic height
+        centery <- oylim[1] + diff(oylim) / 2
+        nylim <- rep(centery, 2) + c(-1, 1) * (1 / ratid * diff(oxlim)) / 2
+        nxlim <- oxlim
+      }
+      x at s.misc$backgrid <- .getgrid(xlim = nxlim, ylim = nylim, x at adeg.par$pgrid$nint, rep(x at adeg.par$porigin$origin, le = 2), asp = x at adeg.par$paxes$aspectratio)
+      setlatticecall(x) ## passing backgrid
+      ## changing limits
+      x at lattice.call$arguments$xlim <- nxlim
+      x at lattice.call$arguments$ylim <- nylim
+    }
+    object <- x
+    
+    if(!length(object at lattice.call))
+      stop("no graphics instruction")
+    else { 
+      tmp_object <- gettrellis(x)
+      print(tmp_object, newpage = newpage)
+      assign("currentadeg", x, envir = .ADEgEnv)
+    }
+  })
+
diff --git a/R/ADEg.S1.R b/R/ADEg.S1.R
new file mode 100644
index 0000000..37ea101
--- /dev/null
+++ b/R/ADEg.S1.R
@@ -0,0 +1,360 @@
+####################################################
+##               Uni-dimensionnal plot            ##
+####################################################
+
+setClass(
+  Class = "ADEg.S1",
+  contains = c("ADEg", "VIRTUAL"),
+  slots = c(data = "list")
+  )
+
+  
+setMethod(
+  f = "initialize",
+  signature = "ADEg.S1",
+  definition = function(.Object, data = list(score = NULL, at = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, ...) ## ADEg initialize
+    .Object at data <- data
+    return(.Object)
+  })
+
+
+## prepare: grid calculations
+## reset limits and sets axis information for lattice
+setMethod(
+  f = "prepare",
+  signature = "ADEg.S1",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    if(object at data$storeData) {
+      score <- object at data$score
+      at <- object at data$at
+    } else {
+      score <- eval(object at data$score, envir = sys.frame(object at data$frame))
+      at <- eval(object at data$at, envir = sys.frame(object at data$frame))
+    }
+    
+    if(inherits(object, "S1.boxplot")){
+      if(object at data$storeData) {
+        fac <- object at data$fac
+      } else {
+        fac <- eval(object at data$fac, envir = sys.frame(object at data$frame))
+      }
+    }
+    
+    score <- as.matrix(score)[, 1]  ## to manage 'score' when it is a data.frame with only one column
+    
+    ## limits and scale
+    minX <- min(score)
+    maxX <- max(score)
+    if(object at adeg.par$p1d$horizontal & !is.null(object at g.args$xlim) & is.null(object at s.misc$hori.update)) {
+      minX <- object at g.args$xlim[1]
+      maxX <- object at g.args$xlim[2]
+    }
+
+    if(!object at adeg.par$p1d$horizontal & !is.null(object at g.args$ylim) & is.null(object at s.misc$hori.update)) {
+      minX <- object at g.args$ylim[1]
+      maxX <- object at g.args$ylim[2]
+    }
+
+    origin <- object at adeg.par$porigin
+    lim <- setlimits1D(minX, maxX, origin = origin$origin[1], includeOr = origin$include)
+
+    ## compute grid size
+    tmp <- pretty(lim, n = object at adeg.par$pgrid$nint)
+    if(!origin$include)
+      origin$origin[1] <- tmp[1]
+    
+    cgrid <- diff(tmp)[1]
+    if(is.na(cgrid))
+      stop("error while calculating grid")
+
+    ## compute grid location
+    v0 <- origin$origin[1]
+    if((origin$origin[1] + cgrid) <= lim[2])
+      v0 <- c(v0, seq(origin$origin[1] + cgrid, lim[2], by = cgrid))
+    if((origin$origin[1] - cgrid >= lim[1]))
+      v0 <- c(v0, seq(origin$origin[1] - cgrid, lim[1], by = -cgrid))
+    v0 <- sort(v0[v0 >= lim[1] & v0 <= lim[2]])
+
+    ## clean near-zero values
+    delta <- diff(range(v0))/object at adeg.par$pgrid$nint
+    if (any(small <- abs(v0) < 1e-14 * delta)) 
+        v0[small] <- 0
+    
+    object at s.misc$backgrid <- list(x = v0, d = cgrid)
+    
+    ## object at adeg.par$paxes has priority over object at g.args$scales
+    scalesandlab <- modifyList(as.list(object at g.args$scales), object at adeg.par$paxes, keep.null = TRUE)
+    
+    if(!scalesandlab$draw) {
+      scalesandlab$x$draw <- FALSE
+      scalesandlab$y$draw <- FALSE
+    }
+    
+    lead <- ifelse(object at adeg.par$p1d$reverse, 1 , -1)
+    
+    if(object at adeg.par$p1d$horizontal) {
+      ## draw axes for horizontal plot
+      if(is.null(scalesandlab$x$at))
+        scalesandlab$x$at <- object at s.misc$backgrid$x
+      
+      if(is.null(object at g.args$xlim) || !identical(object at s.misc$hori.update, object at adeg.par$p1d$horizontal))
+        object at g.args$xlim <- lim
+      
+      if(is.null(object at g.args$ylim))
+        object at g.args$ylim <- setlimits1D(min(at), max(at), 0, FALSE)
+      if(inherits(object, "S1.boxplot")) ## extend ylim for boxes
+        object at g.args$ylim <- object at g.args$ylim + c(-1, 1) * abs(diff(range(at))) / (nlevels(fac) + 1)
+      
+      ref <- ifelse(object at adeg.par$p1d$reverse, 2, 1)
+      margin <- object at g.args$ylim[ref]
+      if(object at adeg.par$p1d$rug$draw)
+        margin <- object at adeg.par$p1d$rug$margin * abs(diff(object at g.args$ylim))
+      object at s.misc$rug <- object at g.args$ylim[ref]
+      object at g.args$ylim[ref] <- object at g.args$ylim[ref] + lead * margin
+        
+    } else {
+      ## draw axes for vertical plot
+      if(is.null(scalesandlab$y$at))
+        scalesandlab$y$at <- object at s.misc$backgrid$x
+      
+      if(is.null(object at g.args$ylim) || !identical(object at s.misc$hori.update, object at adeg.par$p1d$horizontal))
+        object at g.args$ylim <- lim
+      
+      if(is.null(object at g.args$xlim))
+        object at g.args$xlim <- setlimits1D(min(at), max(at), 0, FALSE)
+      if(inherits(object, "S1.boxplot")) ## extend xlim for boxes
+        object at g.args$xlim <- object at g.args$xlim + c(-1, 1) * abs(diff(range(at))) / (nlevels(fac) + 1)
+      
+      ref <- ifelse(object at adeg.par$p1d$reverse, 2, 1)
+      margin <- object at g.args$xlim[ref]
+      if(object at adeg.par$p1d$rug$draw)
+        margin <- object at adeg.par$p1d$rug$margin * abs(diff(object at g.args$xlim))
+      object at s.misc$rug <- object at g.args$xlim[ref]
+      object at g.args$xlim[ref] <-  object at g.args$xlim[ref] + lead * margin
+    }
+    
+    object at g.args$scales <- scalesandlab
+    object at s.misc$hori.update <- object at adeg.par$p1d$horizontal
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panelbase",
+  signature = "ADEg.S1",
+  definition = function(object, x, y) {
+    ## Formula defined in gettrellis
+    ## if horizontal, x is score and y is a vector with repetitions of origin
+    ## if vertical, this is the inverse
+    
+    grid <- object at adeg.par$pgrid
+    porigin <- object at adeg.par$porigin 
+    pscore <- object at adeg.par$p1d
+    lims <- current.panel.limits(unit = "native")
+
+    plines <- object at adeg.par$plines
+    if(!is.null(object at data$fac)) {
+      ## there is a factor in the data (e.g., S1.class)
+      if(object at data$storeData)
+        fac <- object at data$fac
+      else
+        fac <- as.factor(eval(object at data$fac, envir = sys.frame(object at data$frame)))
+      plines <- lapply(plines, FUN = function(x) return(rep(x, length.out = nlevels(fac))[fac]))
+    }
+    
+    lead <- ifelse(pscore$reverse, -1 , 1)
+    
+    if(pscore$horizontal) {
+      ## horizontal plot
+      
+      ## set margins to get some place for rug
+      ref <- ifelse(pscore$reverse, object at g.args$ylim[2], object at g.args$ylim[1])
+      margin <- ref
+      if(pscore$rug$draw)
+        margin <- ifelse(is.unit(pscore$rug$margin), convertUnit(pscore$rug$margin, typeFrom = "dimension", unitTo = "native", axisFrom = "y", valueOnly = TRUE), pscore$rug$margin)
+            
+      ## draw grid
+      if(grid$draw)
+        panel.segments(x0 = object at s.misc$backgrid$x , x1 = object at s.misc$backgrid$x, y0 = lims$ylim[1], y1 = lims$ylim[2], col = grid$col, lty = grid$lty, lwd = grid$lwd)
+      
+      ## draw origin
+      panel.abline(
+        v = if(porigin$draw) porigin$origin else NULL,
+        h = if(pscore$rug$draw & pscore$rug$line) object at s.misc$rug else NULL,
+        col = porigin$col, lwd = porigin$lwd, lty = porigin$lty, alpha = porigin$alpha)
+      
+      ## draw rug
+      if(pscore$rug$draw & (pscore$rug$tck != 0)) {
+        ## tick end and starting points
+        start <- object at s.misc$rug
+        end <- start - pscore$rug$tck * lead * abs(start - ref)
+        ## 'panel.rug' needs 'npc' values 
+        start <- convertUnit(unit(start, "native"), unitTo = "npc", axisFrom = "y", valueOnly = TRUE)
+        end <- convertUnit(unit(end, "native"), unitTo = "npc", axisFrom = "y", valueOnly = TRUE)
+        do.call("panel.rug", c(list(x = y, start = start, end = end), plines))
+      }
+    } else {
+      ## vertical plot
+      
+      ## set margins to get some place for rug
+      ref <- ifelse(pscore$reverse, object at g.args$xlim[2], object at g.args$xlim[1])
+      margin <- ref
+      if(pscore$rug$draw)          
+        margin <- ifelse(is.unit(pscore$rug$margin), convertUnit(pscore$rug$margin, typeFrom = "dimension", unitTo = "native", axisFrom = "x", valueOnly = TRUE), pscore$rug$margin)
+      
+      ## draw grid
+      if(grid$draw)
+        panel.segments(y0 = object at s.misc$backgrid$x , y1 = object at s.misc$backgrid$x, x0 = lims$xlim[1], x1 = lims$xlim[2], col = grid$col, lty = grid$lty, lwd = grid$lwd)
+
+      ## draw origin
+      panel.abline(
+        h = if(porigin$draw) porigin$origin else NULL,
+        v = if(pscore$rug$draw & pscore$rug$line) object at s.misc$rug else NULL,
+        col = porigin$col, lwd = porigin$lwd, lty = porigin$lty, alpha = porigin$alpha)
+
+      ## draw rug
+      if(pscore$rug$draw && (pscore$rug$tck != 0)) {
+        ## tick end and starting points
+        start <- object at s.misc$rug
+        end <- start - pscore$rug$tck * lead * abs(start - ref)
+        start <- convertUnit(unit(start, "native"), unitTo = "npc", axisFrom = "x", valueOnly = TRUE)
+        end <- convertUnit(unit(end, "native"), unitTo = "npc", axisFrom = "x", valueOnly = TRUE)
+        do.call("panel.rug", c(list(y = y, start = start, end = end), plines))
+      }
+    }
+
+    ## indicate grid size (d = **)
+    if(grid$draw & (grid$text$cex > 0)) { 
+      text.pos <- .setposition(grid$text$pos)
+      textgrid <- textGrob(label = paste("d =", object at s.misc$backgrid$d), x = text.pos$posi[1], y = text.pos$posi[2], gp = gpar(cex = grid$text$cex, col = grid$text$col), name = "gridtext")
+      grid.rect(x = text.pos$posi[1], y = text.pos$posi[2], width = grobWidth(textgrid), height = grobHeight(textgrid), gp = gpar(fill= object at adeg.par$pbackground$col, alpha = 0.8, col = "transparent"))
+      grid.draw(textgrid)
+    }
+    callNextMethod()
+  })
+
+
+setMethod(
+  f = "setlatticecall",
+  signature = "ADEg.S1",
+  definition = function(object) {
+    ## arguments recurrents de la liste, pas les limites car elles seront definis ensuite
+    name_obj <- deparse(substitute(object))
+    
+    ## grid background and box
+    object at trellis.par$panel.background$col <- object at adeg.par$pbackground$col
+    if(!object at adeg.par$pbackground$box)
+      object at trellis.par$axis.line$col <- "transparent"
+    
+    arguments <- list(
+                   par.settings = object at trellis.par,
+                   scales = object at g.args$scales,
+                   key = createkey(object),                   
+                   axis = axis.L, ## see utils.R
+                   panel = function(...) {
+                     panelbase(object,...) ## grid,
+                     panel(object,...) ## call to S1.panel function, for slabel and ADEg.S1 class of graphs
+                   })
+    
+    object at lattice.call$arguments <- arguments
+    object at lattice.call$graphictype <- "xyplot" 
+
+    ## get lattice arguments (set unspecified to NULL)
+    argnames <- c("main", "sub", "xlab", "ylab")
+    largs <- object at g.args[argnames]
+    names(largs) <- argnames
+    ## add xlim and ylim if not NULL
+    if("xlim" %in% names(object at g.args))
+      largs["xlim"] <- object at g.args["xlim"]
+    if("ylim" %in% names(object at g.args))
+      largs["ylim"] <- object at g.args["ylim"]
+    
+    object at lattice.call$arguments <- c(object at lattice.call$arguments, largs, list(strip = FALSE))
+    assign(name_obj, object, envir = parent.frame())
+})
+
+
+setMethod(
+  f = "gettrellis",
+  signature = "ADEg.S1",
+  definition = function(object) {
+    if(object at data$storeData)
+      score <- object at data$score
+    else
+      score <- eval(object at data$score, envir = sys.frame(object at data$frame))
+    
+    score <- as.matrix(score)[, 1]  ## to manage 'score' when it is a data.frame with only one column
+    
+    xdata <- rep(1, length(score))
+    fml <- as.formula(score ~ xdata)
+    tmptrellis <- do.call(what = object at lattice.call$graphictype, args = c(fml, object at lattice.call$arguments, environment()))
+    return(tmptrellis)
+  })
+
+
+## zoom without center
+setMethod(
+  f = "zoom",
+  signature = c("ADEg.S1", "numeric", "missing"),
+  definition = function(object, zoom, center) {
+    ## zoom in xlim
+    p1d <- object at adeg.par$p1d
+    nameobj <- deparse(substitute(object))
+    if(length(zoom) != 1)
+      stop("zoom factor should be length 1")
+    center <- ifelse(p1d$horizontal, mean(object at g.args$xlim), mean(object at g.args$ylim))
+    zoom(object, zoom, center)
+  })
+
+
+## zoom with center
+setMethod(
+  f = "zoom",
+  signature = c("ADEg.S1",  "numeric", "numeric"),
+  definition = function(object, zoom, center) {
+    nameobj <- deparse(substitute(object))
+    p1d <- object at adeg.par$p1d
+    origin <- object at adeg.par$porigin
+    
+    if(length(center) != 1)
+      stop("Center should be a numeric")
+    if(length(zoom) != 1)
+      stop("Zoom factor should be a numeric")
+    
+    if(p1d$horizontal) {
+      diffx <- diff(object at g.args$xlim) / zoom
+      minX <- center - diffx / 2
+      maxX <- center + diffx / 2
+      object at g.args$xlim <- c(minX, maxX)
+    } else {
+      diffx <- diff(object at g.args$ylim) / zoom
+      minX <- center - diffx / 2
+      maxX <- center + diffx / 2
+      object at g.args$ylim <- c(minX, maxX)
+    }
+    
+    lim <- setlimits1D(minX, maxX, origin = origin$origin[1], includeOr = origin$include)
+    ## compute grid size
+    tmp <- pretty(lim, n = object at adeg.par$pgrid$nint)
+    if(!origin$include)
+      origin$origin[1] <- tmp[1]
+    
+    cgrid <- diff(tmp)[1]
+    if(is.na(cgrid))
+      stop("error while calculating grid")
+    
+    ## compute grid location
+    v0 <- origin$origin[1]
+    if((origin$origin[1] + cgrid) <= lim[2])
+      v0 <- c(v0, seq(origin$origin[1] + cgrid, lim[2], by = cgrid))
+    if((origin$origin[1] - cgrid >= lim[1]))
+      v0 <- c(v0, seq(origin$origin[1] - cgrid, lim[1], by = -cgrid))
+    v0 <- sort(v0[v0 >= lim[1] & v0 <= lim[2]])
+    object at s.misc$backgrid <- list(x = v0, d = cgrid)
+
+    setlatticecall(object)
+    print(object)
+    invisible()   
+  })
diff --git a/R/ADEg.S2.R b/R/ADEg.S2.R
new file mode 100644
index 0000000..1342abd
--- /dev/null
+++ b/R/ADEg.S2.R
@@ -0,0 +1,416 @@
+setClass(
+    Class = "ADEg.S2",
+    contains = c("ADEg", "VIRTUAL"),
+    slots = c(data = "list")
+    )
+
+
+setMethod(
+    f = "initialize",
+    signature = "ADEg.S2",
+    definition = function(.Object, data = list(dfxy = NULL, xax = 1, yax = 2, frame = 0, storeData = TRUE), ...) {
+        .Object <- callNextMethod(.Object, ...) ## ADEg initialize
+        .Object at data <- data
+        return(.Object)
+    })
+
+
+setMethod(
+    f = "prepare",
+    signature = "ADEg.S2",
+    definition = function(object) {
+        ## TODO: factorise les if
+        name_obj <- deparse(substitute(object))
+        if(object at data$storeData)
+            dfxy <- object at data$dfxy
+        else
+            dfxy <- eval(object at data$dfxy, envir = sys.frame(object at data$frame))
+        
+        ## axes limits
+        if(class(object) == "S2.corcircle") {
+            object at trellis.par$panel.background$col <- "transparent"
+            if(object at g.args$fullcircle) {
+                if(is.null(object at g.args$xlim) || !identical(object at s.misc$xfullcircle.update, object at g.args$fullcircle)) {
+                    minX <- -1
+                    maxX <- 1
+                } else {
+                    minX <- object at g.args$xlim[1]
+                    maxX <- object at g.args$xlim[2]
+                }
+                if(is.null(object at g.args$ylim) || !identical(object at s.misc$yfullcircle.update, object at g.args$fullcircle)) {
+                    minY <- -1
+                    maxY <- 1
+                } else {
+                    minY <- object at g.args$ylim[1]
+                    maxY <- object at g.args$ylim[2]
+                }
+            } else {
+                if(is.null(object at g.args$xlim) || !identical(object at s.misc$xfullcircle.update, object at g.args$fullcircle)) {
+                    minX <- min(dfxy[, object at data$xax])
+                    maxX <- max(dfxy[, object at data$xax])
+                } else {
+                    minX <- object at g.args$xlim[1]
+                    maxX <- object at g.args$xlim[2]
+                }
+                if(is.null(object at g.args$ylim) || !identical(object at s.misc$yfullcircle.update, object at g.args$fullcircle)) {
+                    minY <- min(dfxy[, object at data$yax])
+                    maxY <- max(dfxy[, object at data$yax])
+                } else {
+                    minY <- object at g.args$ylim[1]
+                    maxY <- object at g.args$ylim[2]
+                }
+            }
+        } else {
+            if(is.null(object at g.args$xlim)) {
+                minX <- min(dfxy[, object at data$xax])
+                maxX <- max(dfxy[, object at data$xax])
+            } else {
+                minX <- object at g.args$xlim[1]
+                maxX <- object at g.args$xlim[2]
+            }
+            if(is.null(object at g.args$ylim)) {
+                minY <- min(dfxy[, object at data$yax])
+                maxY <- max(dfxy[, object at data$yax])
+            } else {
+                minY <- object at g.args$ylim[1]
+                maxY <- object at g.args$ylim[2]
+            }
+        }
+        
+        limits <- setlimits2D(minX = minX, maxX = maxX, minY = minY, maxY = maxY, origin = rep(object at adeg.par$porigin$origin, le = 2),
+                             aspect.ratio = object at adeg.par$paxes$aspectratio, includeOr = object at adeg.par$porigin$include)
+        
+        if(is.null(object at g.args$xlim) || !identical(object at s.misc$xfullcircle.update, object at g.args$fullcircle))
+            object at g.args$xlim <- limits$xlim
+        if(is.null(object at g.args$ylim) || !identical(object at s.misc$yfullcircle.update, object at g.args$fullcircle))
+            object at g.args$ylim <- limits$ylim
+        
+        if(class(object) == "S2.corcircle") {
+            object at s.misc$xfullcircle.update <- object at g.args$fullcircle
+            object at s.misc$yfullcircle.update <- object at g.args$fullcircle
+        }
+        
+        ## grid locations and axes 
+        if(object at adeg.par$pgrid$draw || object at adeg.par$paxes$draw) {
+            ## axes division
+            if(class(object) != "S2.corcircle") {
+                if(object at adeg.par$porigin$include)
+                    object at s.misc$backgrid <- .getgrid(xlim = object at g.args$xlim, ylim = object at g.args$ylim, object at adeg.par$pgrid$nint, rep(object at adeg.par$porigin$origin, le = 2), asp = object at adeg.par$paxes$aspectratio)
+                else
+                    object at s.misc$backgrid <- .getgrid(xlim = object at g.args$xlim, ylim = object at g.args$ylim, object at adeg.par$pgrid$nint, asp = object at adeg.par$paxes$aspectratio)
+            }
+            
+            if(object at adeg.par$paxes$draw) {
+                ## parameters to plot axes
+                scalesandlab <- list(x = object at adeg.par$paxes$x, y = object at adeg.par$paxes$y)
+                if(is.null(scalesandlab$y$at)) {
+                    scalesandlab$y$at <- object at s.misc$backgrid[[3L]][!is.na(object at s.misc$backgrid[[3L]])]
+                    if(class(object) == "S2.corcircle")
+                        scalesandlab$y$at <- scalesandlab$y$at[(length(scalesandlab$y$at) / 2 + 1):length(scalesandlab$y$at)]
+                }
+                if(is.null(scalesandlab$x$at)) {
+                    scalesandlab$x$at <- object at s.misc$backgrid[[1L]][!is.na(object at s.misc$backgrid[[1L]])]
+                    if(class(object) == "S2.corcircle")
+                        scalesandlab$x$at <- scalesandlab$x$at[1:(length(scalesandlab$x$at) / 2)]
+                }
+            } else 
+                scalesandlab <- list(draw = FALSE) ## no axes
+        }
+        else
+            scalesandlab <- list(draw = FALSE) ## no axes
+        
+        if(object at adeg.par$paxes$aspectratio != "iso")
+            object at adeg.par$pgrid$text$cex <- 0 ## grid cell size has no meaning
+        
+        if(!is.null(object at g.args$Sp))
+          object at adeg.par$paxes$aspectratio <- ifelse(is.na(proj4string(object at g.args$Sp)) || is.projected(object at g.args$Sp), 1, 1/cos((mean(object at g.args$ylim) * pi)/180))
+        
+        ## if grid and axes are drawn, no text indication
+        if(object at adeg.par$pgrid$draw && object at adeg.par$paxes$draw)
+            object at adeg.par$pgrid$text$cex <- 0
+        object at g.args$scales <- scalesandlab
+        assign(name_obj, object, envir = parent.frame())
+    })
+
+
+setMethod(
+    f = "panelbase",
+    signature = "ADEg.S2",
+    definition = function(object, x, y) {
+        ## draw grid
+        lims <- current.panel.limits(unit = "native")
+        porigin <- object at adeg.par$porigin
+        porigin$origin <- rep(porigin$origin, length.out = 2)
+
+        if(class(object) == "S2.corcircle") 
+            grid.circle(x = 0, y = 0, r = 1, default.units = "native", gp = gpar(col = "black", fill = object at adeg.par$pbackground$col), draw = TRUE, name = "circleGrid")
+        
+        if(object at adeg.par$pgrid$draw) { ## if grid to draw
+            grid <- object at adeg.par$pgrid
+            locations <- object at s.misc$backgrid ## coordinates for the grid 
+            panel.segments(
+                x0 = c(locations$x0[!is.na(locations$x0)], rep(lims$xlim[1], sum(is.na(locations$x0)))),
+                x1 = c(locations$x1[!is.na(locations$x1)], rep(lims$xlim[2], sum(is.na(locations$x1)))),
+                y0 = c(rep(lims$ylim[1], sum(is.na(locations$y0))), locations$y0[!is.na(locations$y0)]),
+                y1 = c(rep(lims$ylim[2], sum(is.na(locations$y1))), locations$y1[!is.na(locations$y1)]),
+                col = grid$col, lty = grid$lty, lwd = grid$lwd)
+            
+            if(grid$text$cex > 0) {
+                text.pos <- .setposition(grid$text$pos)
+                textgrid <- textGrob(label = paste("d =", locations$d), x = text.pos$posi[1], y = text.pos$posi[2], just = text.pos$just, gp = gpar(cex = grid$text$cex, col = grid$text$col), name = "gridtext")
+                grid.rect(x = text.pos$posi[1], y = text.pos$posi[2], width = grobWidth(textgrid), height = grobHeight(textgrid),
+                          just = text.pos$just, gp = gpar(fill = ifelse(class(object) == "S2.corcircle", "transparent", object at adeg.par$pbackground$col), alpha = 1, col = "transparent"))
+                grid.draw(textgrid)
+            }
+        }
+        
+        if(porigin$draw && porigin$include & class(object) == "S2.corcircle") {
+            panel.segments(x0 = c(-1, porigin$origin[1]), x1 = c(1, porigin$origin[1]), y0 = c(porigin$origin[2], -1), y1 = c(porigin$origin[2], 1), col = porigin$col, lwd = porigin$lwd, lty = porigin$lty, alpha = porigin$alpha)
+            ## TODO: check last parameters valididy     
+        }
+        
+        if(porigin$draw && porigin$include & !class(object) == "S2.corcircle") {
+            panel.abline(h = porigin$origin[2], v = porigin$origin[1], col = porigin$col, lwd = porigin$lwd, lty = porigin$lty, alpha = porigin$alpha)
+            ## TODO: check last parameters valididy
+        }
+        
+        ## spatial object management
+        if(any(names(object at g.args) == "Sp")) {
+            do.call("adeg.panel.Spatial", args = c(list(SpObject = object at g.args$Sp, sp.layout = object at g.args$sp.layout), object at adeg.par$pSp))
+        }
+        else  ## no Sp but sp.layout
+            if(any(names(object at g.args) == "sp.layout"))
+              sppanel(lst = object at g.args$sp.layout)
+        
+        ## neighbouring object management
+        if(any(names(object at g.args) == "nbobject")) {
+            nbobj <- object at g.args$nbobject
+            if(!inherits(nbobj, "nb") & !inherits(nbobj, "listw"))
+                stop("wrong class for the nb object")
+            pnb <- object at adeg.par$pnb
+            do.call("adeg.panel.nb", args = list(nbobject = nbobj, coords = cbind(x, y), col.edge = pnb$edge$col, lwd = pnb$edge$lwd, lty = pnb$edge$lty, pch = pnb$node$pch, cex = pnb$node$cex, col.node = pnb$node$col, alpha = pnb$node$alpha))
+        }
+        callNextMethod()
+    })
+
+
+setMethod(
+    f = "setlatticecall",
+    signature = "ADEg.S2",
+    definition =  function(object) {
+        ## arguments recurrents de la liste, pas les limites car elles seront definis ensuite
+        name_obj <- deparse(substitute(object))
+
+        ## background and box
+        if(!inherits(object, "S2.corcircle"))
+            object at trellis.par$panel.background$col <- object at adeg.par$pbackground$col
+        if(!object at adeg.par$pbackground$box)
+            object at trellis.par$axis.line$col <- "transparent"
+        
+        arguments <- list(
+            par.settings = object at trellis.par,
+            scales = object at g.args$scales,
+            aspect = object at adeg.par$paxes$aspectratio,
+            key = createkey(object),
+            legend = createcolorkey(object),
+            axis = axis.L, ## see utils.R
+            panel = function(...) {
+                panelbase(object,...) ## grid,
+                panel(object,...) ## call to S2.panel function, for slabel and ADEg.S2 class of graphs
+            })
+
+        object at lattice.call$arguments <- arguments          
+        object at lattice.call$graphictype <- "xyplot"
+
+        ## get lattice arguments (set unspecified to NULL)
+        argnames <- c("main", "sub", "xlab", "ylab")
+        largs <- object at g.args[argnames]
+        names(largs) <- argnames
+        ## add xlim and ylim if not NULL
+        if("xlim" %in% names(object at g.args))
+            largs["xlim"] <- object at g.args["xlim"]
+        if("ylim" %in% names(object at g.args))
+            largs["ylim"] <- object at g.args["ylim"]
+        
+        object at lattice.call$arguments <- c(object at lattice.call$arguments, largs, list(strip = FALSE))
+        assign(name_obj, object, envir = parent.frame())
+    })
+
+
+## zoom without center
+setMethod(
+    f = "zoom",
+    signature = c("ADEg.S2", "numeric", "missing"),
+    definition  =  function(object, zoom, center) {
+        oldxlim <- object at g.args$xlim
+        oldylim <- object at g.args$ylim
+        if(length(zoom) != 1)
+            stop("zoom factor should be length 1")
+        diffx <- diff(oldxlim)
+        diffy <- diff(oldylim)
+        center <- c(oldxlim[1] + diffx / 2, oldylim[1] + diffy / 2)
+        diffx <- diffx / zoom
+        diffy <- diffy / zoom
+        object at g.args$xlim <- c(center[1] - diffx / 2, center[1] + diffx / 2)
+        object at g.args$ylim <- c(center[2] - diffy / 2, center[2] + diffy / 2)
+        if(object at adeg.par$pgrid$draw || object at adeg.par$paxes$draw)
+            object at s.misc$backgrid <- .getgrid(xlim = object at g.args$xlim, ylim = object at g.args$ylim, object at adeg.par$pgrid$nint, object at adeg.par$porigin$origin, asp = object at adeg.par$paxes$aspectratio)
+        prepare(object)
+        setlatticecall(object)
+        print(object)
+        invisible()
+    })
+
+
+## zoom with center
+setMethod(
+    f = "zoom",
+    signature = c("ADEg.S2", "numeric", "numeric"),
+    definition = function(object, zoom, center) {
+        if(length(center) != 2) 
+            stop("error, center should be length 2")
+        if(length(zoom) != 1) 
+            stop("zoom factor should be length 1")
+        diffx <- diff(object at g.args$xlim) / zoom
+        diffy <- diff(object at g.args$ylim) / zoom
+        object at g.args$xlim <- c(center[1] - diffx / 2, center[1] + diffx / 2)
+        object at g.args$ylim <- c(center[2] - diffy / 2, center[2] + diffy / 2)
+        if(object at adeg.par$pgrid$draw || object at adeg.par$paxes$draw)
+            object at s.misc$backgrid <- .getgrid(xlim = object at g.args$xlim, ylim = object at g.args$ylim, object at adeg.par$pgrid$nint, object at adeg.par$porigin$origin, asp = object at adeg.par$paxes$aspectratio)
+        prepare(object)
+        setlatticecall(object)
+        print(object)
+        invisible()
+    })
+
+
+setMethod(
+    f = "addhist",
+    signature = "ADEg.S2",
+    definition = function(object, bandwidth, gridsize = 60, kernel = "normal", cbreaks = 2, storeData = TRUE, plot = TRUE, pos = -1, ...) {
+        thecall <- .expand.call(match.call())
+        dfcall <- thecall$object
+        dfxycall <- substitute(dfcall at data$dfxy)
+        
+        if(!(inherits(object, "ADEg.S2")))
+            stop("Only implemented for 'ADEg.S2' object")
+        
+        if(storeData) {
+            dfxy <- object at data$dfxy
+            xax <- object at data$xax
+            yax <- object at data$yax
+        } else {
+            dfxy <- eval(object at data$dfxy, envir = sys.frame(object at data$frame))
+            xax <- eval(object at data$xax, envir = sys.frame(object at data$frame))
+            yax <- eval(object at data$yax, envir = sys.frame(object at data$frame))
+        }
+        
+        ## sorting parameters
+        graphsnames <- c("object", "densX", "densY", "link") 
+        sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+        params <- vector("list", 4)
+        names(params) <- graphsnames
+        sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+        update(object, sortparameters[[1]], plot = FALSE)
+        
+        ## setting positions
+        positions <- layout2position(matrix(c(2, 4, 1, 3), 2, 2, byrow = TRUE), c(3, 1) / 2, c(3, 1) / 2, FALSE)
+
+        ## grid computation
+        xlimX <- object at g.args$xlim
+        ylimY <- object at g.args$ylim
+        breaks <- object at s.misc$backgrid
+        cgrid <- breaks$d / cbreaks
+        bb1 <- range(breaks$x0[!is.na(breaks$x0)])
+        bb2 <- range(breaks$y0[!is.na(breaks$y0)])
+        breaksX <- seq(from = bb1[1], to = bb1[2], by = cgrid)
+        breaksY <- seq(from = bb2[1], to = bb2[2], by = cgrid)
+        while(min(breaksX) > xlimX[1])
+            breaksX <- c((min(breaksX) - cgrid), breaksX)
+        while(max(breaksX) < xlimX[2])
+            breaksX <- c(breaksX, (max(breaksX) + cgrid))
+        while(min(breaksY) > ylimY[1])
+            breaksY <- c((min(breaksY) - cgrid), breaksY)
+        while(max(breaksY) < ylimY[2])
+            breaksY <- c(breaksY, (max(breaksY) + cgrid))
+        
+        ## limits and graduation
+        dfxaxcall <- call("[", dfxycall, 1:NROW(eval(dfxycall)), substitute(xax))
+        dfxaxcallplus <- call("~", dfxaxcall, 1)
+        dfyaxcall <- call("[", dfxycall, 1:NROW(eval(dfxycall)), substitute(yax))
+        dfyaxcallplus <- call("~", dfyaxcall, 1)
+        limcalX <- hist(dfxy[, xax], breaksX, plot = FALSE)
+        limcalXcall <- call("hist", substitute(dfxaxcall), breaksX, plot = FALSE)
+        limcalY <- hist(dfxy[, yax], breaksY, plot = FALSE)
+        limcalYcall <- call("hist", substitute(dfyaxcall), breaksY, plot = FALSE)
+        
+        top <- 1.1 * max(c(limcalX$counts, limcalY$counts))
+        xlimY <- ylimX <- c(0, top)
+        drawLines <- pretty(0:top)
+        drawLines <- drawLines[-c(1, length(drawLines))]
+
+        if(!missing(bandwidth)) {
+            densiX <- bkde(dfxy[, xax], kernel = kernel, bandwidth = bandwidth, gridsize = gridsize)
+            densiXcall <- call("bkde", substitute(dfxaxcall), kernel = kernel, bandwidth = bandwidth, gridsize = gridsize)
+            densiY <- bkde(dfxy[, yax], kernel = kernel, bandwidth = bandwidth, gridsize = gridsize)
+            densiYcall <- call("bkde", substitute(dfyaxcall), kernel = kernel, bandwidth = bandwidth, gridsize = gridsize)
+        } else {
+            densiX <- bkde(dfxy[, xax], kernel = kernel, gridsize = gridsize)
+            densiXcall <- call("bkde", substitute(dfxaxcall), kernel = kernel, gridsize = gridsize)
+            densiY <- bkde(dfxy[, yax], kernel = kernel, gridsize = gridsize)
+            densiYcall <- call("bkde", substitute(dfyaxcall), kernel = kernel, gridsize = gridsize)
+        }
+        
+        ## trellis creation 
+        g2 <- xyplot(dfxy[, xax] ~ 1, xlim = xlimX, ylim = ylimX, horizontal = TRUE, scales = list(draw = FALSE), xlab = NULL, ylab = NULL, histValues = limcalX, 
+                     drawLines = drawLines, densi = densiX, params = sortparameters[[2]], 
+                     panel = function(histValues, horizontal, drawLines, densi, params) adeg.panel.hist(histValues = histValues, horizontal = horizontal, 
+                                                                                         drawLines = drawLines, densi = densi, params = params))
+        g2$call <- call("xyplot", dfxaxcallplus, xlim = substitute(xlimX), ylim = substitute(ylimX), horizontal = TRUE, scales = list(draw = FALSE), xlab = NULL, ylab = NULL, 
+                        histValues = limcalXcall, drawLines = substitute(drawLines), densi = substitute(densiXcall), params = sortparameters[[2]], 
+                        panel = function(histValues, horizontal, drawLines, densi, params) adeg.panel.hist(histValues = histValues, horizontal = horizontal, 
+                                                                                            drawLines = drawLines, densi = densi, params = params))
+        
+        
+        g3 <- xyplot(dfxy[, yax] ~ 1, xlim = xlimY, ylim = ylimY, horizontal = FALSE, scales = list(draw = FALSE), xlab = NULL, ylab = NULL, histValues = limcalY, 
+                     drawLines = drawLines, densi = densiY, params = sortparameters[[3]], 
+                     panel = function(histValues, horizontal, drawLines, densi, params) adeg.panel.hist(histValues = histValues, horizontal = horizontal, 
+                                                                                         drawLines = drawLines, densi = densi, params = params))
+        g3$call <- call("xyplot", dfyaxcallplus, xlim = substitute(xlimY), ylim = substitute(ylimY), horizontal = FALSE, scales = list(draw = FALSE), xlab = NULL, ylab = NULL, 
+                        histValues = limcalYcall, drawLines = substitute(drawLines), densi = substitute(densiYcall), params = sortparameters[[3]], 
+                        panel = function(histValues, horizontal, drawLines, densi, params) adeg.panel.hist(histValues = histValues, horizontal = horizontal, 
+                                                                                            drawLines = drawLines, densi = densi, params = params))
+        
+        
+        g4 <- xyplot(1 ~ 1, xlim = xlimY, ylim = ylimX, scales = list(draw = FALSE), xlab = NULL, ylab = NULL, drawLines = drawLines, params = sortparameters[[4]], 
+                     panel = function(drawLines, params) adeg.panel.join(drawLines = drawLines, params = params))
+        g4$call <- call("xyplot", 1 ~ 1, xlim = substitute(xlimY), ylim = substitute(ylimX), scales = list(draw = FALSE), xlab = NULL, ylab = NULL, drawLines = substitute(drawLines), 
+                        params = sortparameters[[4]], panel = function(drawLines, params) adeg.panel.join(drawLines = drawLines, params = params))
+        
+        ## ADEgS creation and display
+        obj <- new(Class = "ADEgS", ADEglist = list(object, g2, g3, g4), positions = positions, add = matrix(0, ncol = 4, nrow = 4), Call = match.call())
+        names(obj) <- graphsnames
+        if(plot)
+            print(obj)
+        invisible(obj)
+    })
+
+
+setMethod(
+    f = "gettrellis",
+    signature = "ADEg.S2",
+    definition = function(object) {
+        if(object at data$storeData) {
+            dfxy <- as.matrix(object at data$dfxy)
+            xax <- object at data$xax
+            yax <- object at data$yax
+        } else {
+            dfxy <- as.matrix(eval(object at data$dfxy, envir = sys.frame(object at data$frame)))
+            yax <- eval(object at data$yax, envir = sys.frame(object at data$frame))
+            xax <- eval(object at data$xax, envir = sys.frame(object at data$frame))
+        }
+        
+        tmptrellis <- do.call(what = object at lattice.call$graphictype, args = c(formula(dfxy[, yax] ~ dfxy[, xax]), object at lattice.call$arguments, environment()))
+        return(tmptrellis)
+    })
+
diff --git a/R/ADEg.T.R b/R/ADEg.T.R
new file mode 100644
index 0000000..2467f4c
--- /dev/null
+++ b/R/ADEg.T.R
@@ -0,0 +1,238 @@
+####################################################
+##              Table/matrix/dist plot            ##
+####################################################
+
+setClass(
+  Class = "ADEg.T",
+  contains = c("ADEg", "VIRTUAL"),
+  slots = c(data = "list")
+  )
+
+
+setMethod(
+  f = "initialize",
+  signature  = "ADEg.T",
+  definition = function(.Object, data = list(dftab = NULL, coordsx = NULL, coordsy = NULL, labelsx = NULL, labelsy = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, ...) ## ADEg initialize
+    .Object at data <- data
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "ADEg.T",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    if(object at data$storeData){
+      coordsx <- object at data$coordsx
+      coordsy <- object at data$coordsy
+    } else {
+      coordsx <- eval(object at data$coordsx, envir = sys.frame(object at data$frame))
+      coordsy <- eval(object at data$coordsy, envir = sys.frame(object at data$frame))
+    }
+
+    ## cell size
+    object at s.misc$axes$dx <- ifelse(length(coordsx) == 1, 1, diff(range(coordsx)) / length(coordsx))
+    object at s.misc$axes$dy <- ifelse(length(coordsy) == 1, 1, diff(range(coordsy)) / length(coordsy))
+    
+    ## default margins
+    if(object at adeg.par$ptable$x$pos == "top" & object at adeg.par$ptable$margin$top <= 5)
+      object at adeg.par$ptable$margin$top <- 12
+    if(object at adeg.par$ptable$x$pos == "bottom" & object at adeg.par$ptable$margin$bottom <= 5)
+      object at adeg.par$ptable$margin$bottom <- 12
+    
+    if(object at adeg.par$ptable$y$pos == "right" & object at adeg.par$ptable$margin$right <= 5)
+      object at adeg.par$ptable$margin$right <- 12
+    if(object at adeg.par$ptable$y$pos == "left" & object at adeg.par$ptable$margin$left <= 5)
+      object at adeg.par$ptable$margin$left <- 12
+    
+    object at g.args$xlim <- range(coordsx) + c(-1, 1) * object at s.misc$axes$dx
+    object at g.args$ylim <- range(coordsy) + c(-1, 1) * object at s.misc$axes$dy
+    
+    object at trellis.par <- c(object at trellis.par, list(clip = list(panel = "off"),
+        layout.heights = list(top.padding = object at adeg.par$ptable$margin$top, bottom.padding = object at adeg.par$ptable$margin$bottom),
+        layout.widths = list(left.padding = object at adeg.par$ptable$margin$left, right.padding = object at adeg.par$ptable$margin$right)))
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panelbase",
+  signature = "ADEg.T",
+  definition = function(object, x, y) {
+    callNextMethod()
+    
+    ## draw the box and the segments
+    grid <- object at adeg.par$pgrid
+    ## draw grid
+    if(object at data$storeData) {
+      xpos <- object at data$coordsx
+      ypos <- object at data$coordsy
+      labelsx <- object at data$labelsx
+      labelsy <- object at data$labelsy
+    } else {
+      xpos <- eval(object at data$coordsx, envir = sys.frame(object at data$frame))
+      ypos <- eval(object at data$coordsy, envir = sys.frame(object at data$frame))
+      labelsx <- eval(object at data$labelsx, envir = sys.frame(object at data$frame))
+      labelsy <- eval(object at data$labelsy, envir = sys.frame(object at data$frame))
+    }
+  
+    nx <- length(xpos)
+    ny <- length(ypos)
+
+    ## draw grid (except for T.image)
+    if(grid$draw & !inherits(object, "T.image"))
+      panel.segments(
+        x0 = c(xpos, rep(min(xpos)- object at s.misc$axes$dx, length.out = ny)),
+        x1 = c(xpos, rep(max(xpos) + object at s.misc$axes$dx, length.out = ny)),
+        y0 = c(rep(min(ypos) - object at s.misc$axes$dy, length.out = nx), ypos),
+        y1 = c(rep(max(ypos) + object at s.misc$axes$dy, length.out = nx), ypos),
+        col = grid$col, lwd = grid$lwd, lty = grid$lty)
+    
+    ## draw ticks
+    limis <- current.panel.limits()
+    ## if in ptable$x (or y) $tck; number without unit, considered as 'mm', otherwise used with the unit defined by user
+    dxticks <- convertHeight(if(is.unit(object at adeg.par$ptable$x$tck)) object at adeg.par$ptable$x$tck else unit(object at adeg.par$ptable$x$tck, "mm"), unitTo = "native", valueOnly = TRUE)
+    dyticks <- convertWidth(if(is.unit(object at adeg.par$ptable$y$tck)) object at adeg.par$ptable$y$tck else unit(object at adeg.par$ptable$y$tck, "mm"), unitTo = "native", valueOnly = TRUE)
+    ## get parameters
+    linespar <- modifyList(as.list(object at trellis.par$axis.line), trellis.par.get()$axis.line, keep.null = TRUE)
+    textspar <- modifyList(as.list(object at trellis.par$axis.text), trellis.par.get()$axis.text, keep.null = TRUE)
+    
+    if(textspar$cex > 0 & dyticks > 0) {
+      ## draw ticks for y
+      y0axes <- ypos
+      ## regular positions
+      y1axes <- seq(from = min(ypos), to = max(ypos), length.out = ny)[rank(ypos, ties.method = "first")]
+      yylab <- y1axes
+      drawing <- FALSE
+      
+      if(any(object at adeg.par$ptable$y$pos == "right")) {
+        if(any(is.na(object at adeg.par$ptable$y$adj)))
+          adj <- c(0, 0.5)
+        else
+          adj <- object at adeg.par$ptable$y$adj
+        x0axes <- limis$xlim[2]
+        x1axes <- limis$xlim[2] + dyticks
+        if(textspar$cex)
+          xxlab <- limis$xlim[2] + 1.1 * dyticks
+        drawing <- TRUE
+      }
+      
+      if(any(object at adeg.par$ptable$y$pos == "left")) {
+        if(any(is.na(object at adeg.par$ptable$y$adj)))
+          adj <- c(1, 0.5)
+        else
+          adj <- object at adeg.par$ptable$y$adj
+        x0axes <- limis$xlim[1]
+        x1axes <- limis$xlim[1] - dyticks
+        if(textspar$cex)
+          xxlab <- limis$xlim[1] - 1.1 * dyticks
+        drawing <- TRUE
+      }
+      if(drawing) {
+        panel.segments(x0 = x0axes, y0 = y0axes, x1 = x1axes, y1 = y1axes,
+                       lwd = linespar$lwd, lty = linespar$lty, alpha = linespar$alpha, col = linespar$col)
+        if(textspar$cex)
+          panel.text(labels = labelsy, x = xxlab, y = yylab, cex = textspar$cex, col = textspar$col, font = textspar$font,
+                     lineheight = textspar$lineheight, alpha = textspar$alpha, adj = adj, srt = object at adeg.par$ptable$x$srt)
+      }
+    }
+    
+    if(textspar$cex > 0 & dxticks > 0) {
+      ## draw ticks for x
+      x0axes <- xpos
+      ## regular positions
+      x1axes <- seq(from = min(xpos), to = max(xpos), length.out = nx)[rank(xpos, ties.method = "first")]
+      xxlab <- x1axes
+      drawing <- FALSE
+      
+      if(any(object at adeg.par$ptable$x$pos == "top")) {
+        if(any(is.na(object at adeg.par$ptable$x$adj)))
+          adj <- c(0, 0.5)
+        else
+          adj <- object at adeg.par$ptable$x$adj
+        y0axes <- limis$ylim[2]
+        y1axes <- limis$ylim[2] + dxticks
+        if(textspar$cex > 0)
+          yylab <- limis$ylim[2] + 1.1 * dxticks
+        drawing <- TRUE
+      }
+      
+      if(any(object at adeg.par$ptable$x$pos == "bottom")) {
+        if(any(is.na(object at adeg.par$ptable$x$adj)))
+          adj <- c(1, 0.5)
+        else
+          adj <- object at adeg.par$ptable$x$adj
+        y0axes <- limis$ylim[1]
+        y1axes <- limis$ylim[1] - dxticks
+        if(textspar$cex > 0)
+          yylab <- limis$ylim[1] - 1.1 * dxticks
+        drawing <- TRUE
+      }
+      
+      if(drawing) {
+        panel.segments(x0 = x0axes, y0 = y0axes, x1 = x1axes, y1 = y1axes,
+                       lwd = linespar$lwd, lty = linespar$lty, alpha = linespar$alpha, col = linespar$col)
+        if(textspar$cex)
+          panel.text(labels = labelsx, x = xxlab, y = yylab, cex = textspar$cex, col = textspar$col, font = textspar$font,
+                     lineheight = textspar$lineheight, alpha = textspar$alpha, adj = adj, srt = object at adeg.par$ptable$y$srt)
+      }
+    }
+  })
+
+
+setMethod(
+  f = "setlatticecall",
+  signature = "ADEg.T",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    ## background and box
+    object at trellis.par$panel.background$col <- object at adeg.par$pbackground$col
+    if(!object at adeg.par$pbackground$box)
+      object at trellis.par$axis.line$col <- "transparent"
+    
+    arguments <- list(
+      par.settings = object at trellis.par,
+      key = createkey(object),
+      legend = createcolorkey(object),
+      scales = list(draw = FALSE),
+      panel = function(...) {
+        panelbase(object, ...)
+        panel(object, ...)
+      })
+    
+    object at lattice.call$arguments <- arguments
+    object at lattice.call$graphictype <- "xyplot"
+    
+    ## get lattice arguments (set unspecified to NULL)
+    argnames <- c("main", "sub", "xlab", "ylab")
+    largs <- object at g.args[argnames]
+    names(largs) <- argnames
+    ## add xlim and ylim if not NULL
+    if("xlim" %in% names(object at g.args))
+      largs["xlim"] <- object at g.args["xlim"]
+    if("ylim" %in% names(object at g.args))
+      largs["ylim"] <- object at g.args["ylim"]
+    
+    object at lattice.call$arguments <- c(object at lattice.call$arguments, largs, list(strip = FALSE))
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "gettrellis",
+  signature = "ADEg.T",
+  definition = function(object) {
+    if(object at data$storeData) {
+      xdata <- object at data$coordsx
+      ydata <- object at data$coordsy
+    } else {
+      xdata <- eval(object at data$coordsx, envir = sys.frame(object at data$frame))
+      ydata <- eval(object at data$coordsy, envir = sys.frame(object at data$frame))
+    }
+    
+    tmptrellis <- do.call(what = object at lattice.call$graphictype, args = c(formula(ydata ~ xdata), object at lattice.call$arguments, environment()))
+    return(tmptrellis)                            
+  })
diff --git a/R/ADEg.Tr.R b/R/ADEg.Tr.R
new file mode 100644
index 0000000..81c2906
--- /dev/null
+++ b/R/ADEg.Tr.R
@@ -0,0 +1,173 @@
+setClass(
+    Class = "ADEg.Tr",
+    contains = c("ADEg", "VIRTUAL"),
+    slots = c(data = "list")
+    )
+
+
+setMethod(
+    f = "initialize",
+    signature  = "ADEg.Tr",
+    definition = function(.Object, data = list(dfxyz = NULL, frame = 0, storeData = TRUE), ...) {
+        .Object <- callNextMethod(.Object, ...) ## ADEg initialize
+        .Object at data <- data
+        return(.Object)
+    })
+
+
+setMethod(
+    f = "prepare",
+    signature = "ADEg.Tr",
+    definition = function(object) {
+        name_obj <- deparse(substitute(object))
+
+        if(object at data$storeData)
+            df <- object at data$dfxyz
+        else 
+            df <- eval(object at data$dfxyz, envir = sys.frame(object at data$frame))
+
+        ## define limits
+        if(is.null(object at g.args$xlim))
+            object at g.args$xlim <- c(-0.8, 0.8)
+        if(is.null(object at g.args$ylim))
+            object at g.args$ylim <- c(-0.6, 1)
+        
+        ## grid computation
+        if(is.null(object at g.args$max3d))
+            object at g.args$max3d <- .trranges(df = df, adjust = object at g.args$adjust)$maxi
+        if(is.null(object at g.args$min3d))
+            object at g.args$min3d <- .trranges(df = df, adjust = object at g.args$adjust)$mini
+
+        valuLim <- .trranges(df = df, adjust = object at g.args$adjust, min3 = object at g.args$min3d, max3 = object at g.args$max3d)
+
+        ## coordinates for the triangle vertices
+        A <- c(-1 / sqrt(2), -1 / sqrt(6))
+        B <- c(1 / sqrt(2), -1 / sqrt(6))
+        C <- c(0, 2 / sqrt(6))
+        object at s.misc$cornerp <- list(A = A, B = B, C = C)
+        
+        ## coordinates for grid and axes
+        ng <- object at adeg.par$pgrid$nint + 1 ## number of grid lines
+        pts1 <- pts2 <- pts3 <- c()
+        vdivision <- mapply(FUN = function(min, max) seq(min, max, length.out = ng), min = valuLim$mini, max = valuLim$maxi) ## 3 columns: one per axes    
+
+        ## where to draw the division
+        indented <- seq(0, 1, length.out = nrow(vdivision))[-c(1, nrow(vdivision))]
+
+        ## axis 1 (A to B)
+        pts1 <- matrix(rep(A, length(indented)), ncol = 2, byrow = TRUE) + indented * (matrix(rep(B, length(indented)), ncol = 2, byrow = TRUE) - matrix(rep(A, length(indented)), ncol = 2, byrow = TRUE)) 
+        ##axis 2 (A to C)
+        pts2 <- matrix(rep(C, length(indented)), ncol = 2, byrow = TRUE) + indented * (matrix(rep(A, length(indented)), ncol = 2, byrow = TRUE) - matrix(rep(C, length(indented)), ncol = 2, byrow = TRUE))
+        ## axis 3 (B to C)
+        pts3 <- matrix(rep(B, length(indented)), ncol = 2, byrow = TRUE) + indented * (matrix(rep(C, length(indented)), ncol = 2, byrow = TRUE) - matrix(rep(B, length(indented)), ncol = 2, byrow = TRUE)) 
+        
+        object at s.misc$lgrid <- list(pts1 = pts1, pts2 = pts2, pts3 = pts3, posgrid = vdivision)
+        assign(name_obj, object, envir = parent.frame())
+    })
+
+
+setMethod(
+    f = "panelbase",
+    signature = "ADEg.Tr",
+    definition = function(object, x, y) {
+        callNextMethod()
+        ## draw triangle (A -> B , B -> C,  C -> A)
+        ## small triangle: points distribution
+        
+        ## triangle vertices
+        dfcorner <- rbind(object at s.misc$cornerp$A, object at s.misc$cornerp$B, object at s.misc$cornerp$C, object at s.misc$cornerp$A)
+        
+        panel.polygon(dfcorner, col = object at adeg.par$pbackground$col, border = if(object at adeg.par$pbackground$box) col = "#000000" else "transparent") ## not really useful (only  for arguments consistency)
+
+        ## size of the grid
+        nn <- sapply(object at s.misc$lgrid, nrow)[-4]
+        ## draw grid
+        if(object at adeg.par$pgrid$draw)
+            panel.segments(x0 = c(rep(object at s.misc$lgrid[[1L]][, 1], 2), object at s.misc$lgrid[[2L]][, 1]), 
+                           x1 = c(rev(object at s.misc$lgrid[[2L]][, 1]), rep(rev(object at s.misc$lgrid[[3L]][, 1]), 2)), 
+                           y0 = c(rep(object at s.misc$lgrid[[1L]][, 2], 2),object at s.misc$lgrid[[2L]][, 2]), 
+                           y1 = c(rev(object at s.misc$lgrid[[2L]][, 2]), rep(rev(object at s.misc$lgrid[[3L]][, 2]), 2)),
+                           lwd = object at adeg.par$pgrid$lwd,
+                           col = object at adeg.par$pgrid$col,
+                           lty = object at adeg.par$pgrid$lty)
+
+        ## draw axes
+        axis.text2 <- list()
+        axis.text <- trellis.par.get("axis.text")
+        axis.text2[c("cex", "col")] <- object at adeg.par$pgrid$text[c("cex", "col")]
+        division <- object at s.misc$lgrid$posgrid[-c(1, length(object at s.misc$lgrid$posgrid))]
+        pos <- c(1, 3, 3)
+        srt <- c(0, 60, -60)
+
+        ## get axes names
+        if(object at data$storeData)
+            axisN <- colnames(object at data$dfxyz)[c(2, 1, 3)]
+        else
+            axisN <- colnames(eval(object at data$dfxyz, envir = sys.frame(object at data$frame)))[c(2, 1, 3)]
+        
+        lab <- apply(object at s.misc$lgrid$posgrid, 2, as.character)
+        labels <- lab[-c(1, nrow(lab)), ] ## without corner
+        
+        ## final limits for axes
+        lcorners <- lab[c(1, nrow(lab)), ] ## corner lab (limits)
+        orderCplot <- dfcorner[c(3, 1, 1, 2, 2, 3), ] ## ordre dessin label, selon row de dfcorner, a reprendre
+        posCplot <- rep(c(2, 1, 4), each = 2)
+        order_lab <- c(2, 1, 3)
+        for(i in 1:3) { ## for the three axis
+            ## ticks
+            if(object at adeg.par$paxes$draw)
+                do.call("panel.text", c(list(labels = labels[, order_lab[i]], x = object at s.misc$lgrid[[i]][, 1], y = object at s.misc$lgrid[[i]][, 2], pos = pos[i], srt = srt[i]), axis.text2))
+            ptlab <- object at s.misc$lgrid[[i]][1, ] + (object at s.misc$lgrid[[i]][nn[i], ] - object at s.misc$lgrid[[i]][1, ]) / 2
+            
+            ## axis names
+            do.call("panel.text", args = c(list(labels = axisN[i], x = ptlab[1], y = ptlab[2], srt = srt[i], pos = pos[i]), axis.text))
+        }
+        do.call("panel.text", c(list(x = orderCplot[, 1], y = orderCplot[, 2], lab = lcorners, pos = posCplot), axis.text2))
+    })
+
+
+setMethod(
+    f = "gettrellis",
+    signature = "ADEg.Tr",
+    definition = function(object) {
+        tmp_trellis <- do.call(what = object at lattice.call$graphictype, args = c(formula(1 ~ 1), object at lattice.call$arguments, environment()))
+        return(tmp_trellis)
+    })
+
+
+setMethod(
+    f = "setlatticecall", 
+    signature = "ADEg.Tr",
+    definition = function(object) {
+        name_obj <- deparse(substitute(object))
+
+        ## background and box
+        ## object at trellis.par$panel.background$col <- object at adeg.par$pbackground$col
+        if(!object at adeg.par$pbackground$box)
+            object at trellis.par$axis.line$col <- "transparent"
+
+        arguments = list(
+            par.settings = object at trellis.par,
+            scales = if(!is.null(object at g.args$scales)) object at g.args$scales else list(draw = FALSE),
+            key = createkey(object),
+            aspect = object at adeg.par$paxes$aspectratio,
+            panel = function(...) {
+                panelbase(object, ...)
+                panel(object, ...)
+            })
+        object at lattice.call$arguments <- arguments
+        object at lattice.call$graphictype <- "xyplot"
+        
+        ## get lattice arguments (set unspecified to NULL)
+        argnames <- c("main", "sub", "xlab", "ylab")
+        largs <- object at g.args[argnames]
+        names(largs) <- argnames
+        ## add xlim and ylim if not NULL
+        if("xlim" %in% names(object at g.args))
+            largs["xlim"] <- object at g.args["xlim"]
+        if("ylim" %in% names(object at g.args))
+            largs["ylim"] <- object at g.args["ylim"]
+        
+        object at lattice.call$arguments <- c(object at lattice.call$arguments, largs, list(strip = FALSE))
+        assign(name_obj, object, envir = parent.frame())
+    })
diff --git a/R/ADEgS.R b/R/ADEgS.R
new file mode 100644
index 0000000..814bf3b
--- /dev/null
+++ b/R/ADEgS.R
@@ -0,0 +1,637 @@
+##############################################
+##               general class              ##
+##############################################
+
+setClass(
+  Class = "ADEgS",
+  slots = c(
+    ADEglist = "list",
+    positions = "matrix",
+    add = "matrix",  ## n*n, if xij = 1, j superposed to i
+    Call = "call"),
+  ## slots checking
+  validity = function(object) {
+    ng <- length(object at ADEglist)
+    add <- object at add
+    if(ncol(object at positions) != 4)
+      stop("wrong positions matrix, only 4 columns expected (x0, y0, x1, y1)")
+    if(nrow(object at positions) != ng)
+      stop("not enough positions: rows number of the positions matrix should be equal to the number of graphics in the ADEglist")
+    ## checking add:
+    if((NROW(add) != NCOL(add)) | (NCOL(add) != ng))
+      stop("add matrix dimensions are not equal to the number of graphics in ADEglist")
+    if(any(add != 0 & add != 1))
+      stop("add matrix can only contain 0/1 values")
+    for(i in 1:ng) {
+      j <- 1:i
+      if(any(add[i, j] != 0))
+        stop("upper diagonal matrix expected for add, only 0 are allowed for xij, when j > = i")
+    }
+    return(TRUE)
+  })
+
+##############################################          
+##                 initialize               ##
+##############################################       
+
+setMethod(
+  f = "initialize",
+  signature = "ADEgS",
+  function(.Object, ADEglist, positions, add, Call) {
+    ## add linking
+    superpose <- list()
+    ng <- length(ADEglist)
+    for(i in 1:ng) {
+      superpose <- c(superpose, list(which(add[, i] == 1)))  ## where i is superposed to 1
+      if(length((superpose[[i]]))) {
+        for(j in superpose[[i]]) {
+          add[superpose[[j]], i] <- 1
+          superpose[[i]] <- c(superpose[[i]], superpose[[j]])
+        }}}
+    .Object at add <- add
+    
+    ## check names of the list ADEglist
+    if(is.null(names(ADEglist)))
+      names(ADEglist) <- paste("g", lapply(1:length(ADEglist), function(i) i), sep="")
+    else
+      names(ADEglist) <- make.names(names(ADEglist),unique = TRUE)
+    
+    ## assignation
+    .Object at ADEglist <- ADEglist
+    .Object at positions <- positions
+    .Object at add <- add
+    .Object at Call <- Call
+    ## checking validations
+    validObject(.Object)
+    return(.Object)
+  })
+
+
+setClassUnion(name = "ADEgORADEgSORtrellis", members = c("ADEg", "ADEgS", "trellis"))
+
+
+##############################################          
+##      Get elements/information            ##
+##############################################
+
+setMethod(
+  f = "getcall",
+  signature = "ADEgS",
+  definition = function(object) {
+    return(object at Call)
+  })
+
+
+setMethod(
+  f = "getgraphics",
+  signature = "ADEgS",
+  definition = function(object) {
+    return(object at ADEglist)
+  })
+
+setMethod(
+  f = "getpositions",
+  signature = "ADEgS",
+  definition = function(object) {	
+    return(object at positions)
+  })
+
+
+setMethod(
+  f = "length",
+  signature = "ADEgS",
+  definition = function(x) {
+    return(length(x at ADEglist))
+  })
+
+
+setMethod(
+  f = "names",
+  signature = "ADEgS",
+  definition = function(x) {
+    return(names(x at ADEglist))
+  })
+
+
+setMethod(
+  f = "names<-",
+  signature = c("ADEgS", "character"),
+  definition = function(x, value) {
+    nameobj <- deparse(substitute(x))
+    names(x at ADEglist) <- value
+    x
+  })
+
+##############################################          
+##             Extract graphics             ##
+##############################################
+
+## [: if drop =TRUE can return a ADEg or a length-1 ADEgS
+## else return a ADEgS no manipulation is made on the positions
+
+setMethod(
+  f = "[",
+  signature = c("ADEgS", "numeric", "missing", "logical"),
+  definition = function(x, i, j, drop = TRUE) {
+    if(drop && length(i) == 1)
+      return(x at ADEglist[[i]])   ## return(adeG)
+    else
+      return(new(Class = "ADEgS", ADEglist = x at ADEglist[i], positions = x at positions[i, , drop = drop], add = x at add[i, i, drop = drop], Call = match.call()))
+  })
+
+
+setMethod(
+  f = "[",
+  signature = c("ADEgS", "numeric", "missing", "missing"),
+  definition = function(x, i, j, drop) {
+    object <- x[i, drop = FALSE]
+    object at Call <- match.call()
+    return(object)
+  })
+
+
+setMethod(
+  f = "$",
+  signature = "ADEgS",
+  definition = function(x, name) {
+    invisible(x at ADEglist[[name]])
+  })
+
+setMethod(
+  f = "[[",
+  signature = c("ADEgS", "numeric", "missing"),
+  definition = function(x, i, j, ...) {
+    invisible(x at ADEglist[[i]])
+  })
+
+
+setMethod(
+  f = "[[",
+  signature = c("ADEgS", "character", "missing"),
+  definition = function(x, i, j, ...) {
+    invisible(x at ADEglist[[i]])
+  })
+
+setMethod(
+  f = "[[<-",
+  signature = c("ADEgS", "numeric", "missing", "ADEg"),
+  definition = function(x, i, j, ..., value) {
+    x at ADEglist[[i]] <- value
+    invisible(x)
+  })
+
+setMethod(
+  f = "[[<-",
+  signature = c("ADEgS", "numeric", "missing", "ADEgS"),
+  definition = function(x, i, j, ..., value) {
+    x at ADEglist[[i]] <- value
+    invisible(x)
+  })
+
+##############################################          
+##               superposition              ##
+##############################################
+
+setMethod(
+  f = "superpose",
+  signature = c("ADEgS", "ADEgORtrellis", "numeric", "logical"),
+  definition = function(g1, g2, which, plot) {
+    ## new ADEgS
+    ngraph <- length(g1)
+    if(which > ngraph)
+        stop("Values in 'which' should be lower than the length of g1")
+    
+    if(!inherits(g1[[which]], "ADEg")) 
+      stop("superposition is only available between two ADEg")
+    addi <- cbind(rbind(g1 at add, rep(0, ngraph)), rep(0, ngraph + 1))
+    addi[which, ngraph + 1] <- 1  ## new graph superpose to which
+    ADEglist <- g1 at ADEglist
+    ADEglist[[ngraph + 1]] <- g2
+    ADEgS <- new(Class = "ADEgS", ADEglist = ADEglist, positions = rbind(g1 at positions, g1 at positions[which,]), add = addi, Call = match.call())
+    if(plot) 
+      print(ADEgS)
+    invisible(ADEgS)
+  })
+
+
+setMethod(
+  f = "superpose",
+  signature = c("ADEgS", "ADEgORtrellis", "numeric", "ANY"),
+  definition = function(g1, g2, which, plot) {
+    objectnew <- superpose(g1, g2, which = which, plot = FALSE)
+    objectnew at Call <- match.call()
+    if(plot)
+      print(objectnew)
+    invisible(objectnew)            
+  })
+
+
+setMethod(
+  f = "superpose",
+  signature = c("ADEgS", "ADEgORtrellis", "missing", "ANY"),
+  definition = function(g1, g2, which, plot) {
+    if(!inherits(g1[[length(g1)]], "ADEg"))
+      stop("superposition is only available between two ADEg")
+    objectnew <- superpose(g1, g2, which = length(g1), plot = FALSE)
+    objectnew at Call <- match.call()
+    if(plot)
+      print(objectnew)
+    invisible(objectnew)
+  })
+
+
+setMethod(
+  f = "superpose",
+  signature = c("ADEgS", "ADEgS", "missing", "ANY"),
+  definition = function(g1, g2, which, plot) {
+    ## superpose two ADEgS which have the same number of graphics and the same positions 
+    if(length(g1) != length(g2))
+      stop("The two ADEgS objects should contain the same number of graphics")
+    if(!isTRUE(all.equal(g1 at positions, g2 at positions, check.attributes = FALSE)))
+      stop("The two ADEgS objects should have the same 'positions' slot")
+    
+    f1 <- function(x, y) {
+      if(inherits(x, "ADEg")) {
+        addi <- matrix(0, 2, 2)
+        addi[1,2] <- 1
+        thecall <- call("superpose", x at Call, y at Call)
+        obj <- new(Class = "ADEgS", ADEglist = list(x, y), positions = matrix(rep(c(0, 1), each = 4), 2, 4), add = addi, Call = thecall)
+      } else if(inherits(x, "ADEgS")) {
+        addi <- x at add
+        ng <- ncol(addi)
+        posi <- x at positions
+        
+        ## check that positions in posi are all equal and one 1 in each column of addi (i.e. graphs are still superposed)
+        checkadd <- all(colSums(addi[, -1, drop = FALSE]) > 0) 
+        checkpos <- isTRUE(all.equal(matrix(posi[1, ], nrow = nrow(posi), ncol = ncol(posi), byrow = TRUE), posi))
+        if(!checkpos | !checkadd)
+          stop("ADEgS object should contain only superposition")
+        
+        ## superpose
+        addi <- rbind(addi, rep(0, ng))
+        addi <- cbind(addi, rep(0, ng + 1))
+        addi[ng, ng + 1] <- 1
+        
+        posi <- rbind(posi, posi[1,])
+        thecall <- call("superpose", x at Call, y at Call)
+        obj <- new(Class = "ADEgS", ADEglist = c(x at ADEglist, list(y)), positions = posi, add = addi, Call = thecall)
+      }
+      invisible(obj)
+    }
+    
+    res <- lapply(1:length(g1), FUN = function(i) {f1(g1[[i]], g2[[i]])})
+    obj <- new(Class = "ADEgS", ADEglist = res, positions = g1 at positions, add = g1 at add, Call = match.call())
+    
+    if(plot)
+      print(obj)
+    invisible(obj)
+  })
+
+  
+setMethod(
+  f = "+",
+  signature = c("ADEgS", "ADEg"),
+  definition = function(e1, e2) {
+    newobj <- superpose(e1, e2, plot = TRUE)
+    newobj at Call <- match.call()
+    return(newobj)
+  })
+
+
+setMethod(
+  f = "+",
+  signature = c("ADEg", "ADEgS"),
+  definition = function(e1, e2) {
+    newobj <- superpose(e2, e1, plot = TRUE)
+    warning("the second graph is below the first one ; the reverse situation is not yet implemented", call. = FALSE)
+    newobj at Call <- match.call()
+    return(newobj)
+  })
+
+
+setMethod(
+  f = "cbindADEg", 
+  signature = c("ADEgORADEgSORtrellis", "ADEgORADEgSORtrellis"),
+  definition = function(g1, g2, ..., plot = FALSE) {
+  	if(try(is.list(...), silent = TRUE) == TRUE)
+      glist <- as.list(c(g1, g2, ...))
+   
+	  else
+	    glist <- list(g1, g2, ...)
+    
+    nbg <- length(glist)
+    obj <- ADEgS(adeglist = glist, layout = c(1, nbg), add = matrix(0, ncol = nbg, nrow = nbg), plot = FALSE)
+    obj at Call <- match.call()
+
+    if(plot)
+      print(obj)
+    invisible(obj)
+  })
+
+
+setMethod(
+  f = "rbindADEg", 
+  signature = c("ADEgORADEgSORtrellis", "ADEgORADEgSORtrellis"),
+  definition = function(g1, g2, ..., plot = FALSE) {
+  	if(try(is.list(...), silent = TRUE) == TRUE)
+      glist <- as.list(c(g1, g2, ...))
+	  else
+	    glist <- list(g1, g2, ...)
+    
+    nbg <- length(glist)
+    obj <- ADEgS(adeglist = glist, layout = c(nbg, 1), add = matrix(0, ncol = nbg, nrow = nbg), plot = FALSE)
+    obj at Call <- match.call()
+    
+    if(plot)
+      print(obj)
+    invisible(obj)
+  })
+
+
+##############################################        
+##                   insertion              ##
+##############################################
+
+setMethod(
+  f = "insert", 
+  signature = c("ADEgS", "missing"),
+  definition = function(graphics, oldgraphics, posi, ratio, inset, plot, which, dispatch) {
+    positions <- .getposition(posi, w = ratio, h = ratio) + inset
+    currentgraphic <- get("currentadeg", envir = .ADEgEnv)
+    if(!(length(currentgraphic)))
+      stop("no existing graphics")
+    else
+      newADEgS <- insert(graphics = graphics, oldgraphics = currentgraphic, posi = posi, ratio = ratio, inset = inset, plot = plot, which = which, dispatch = dispatch)
+    
+    if(plot)
+      print(newADEgS[length(newADEgS)], newpage = FALSE)
+    assign("currentadeg", newADEgS, envir = .ADEgEnv)
+    invisible(newADEgS)
+  })
+
+
+setMethod(
+  f = "insert", 
+  signature = c("ADEgS", "ADEg"),
+  definition = function(graphics, oldgraphics, posi, ratio, inset, plot) {
+    positions <- .getposition(posi, w = ratio, h = ratio) + inset
+    thecall <- call("insert", graphics at Call, oldgraphics at Call)
+    newADEgS <- new(Class = "ADEgS", ADEglist = list(oldgraphics, graphics), positions = rbind(c(0, 0, 1, 1), positions), add = matrix(0, ncol = 2, nrow = 2), thecall)
+    if(plot)      
+      print(newADEgS)
+    
+    assign("currentadeg", newADEgS, envir = .ADEgEnv)
+    invisible(newADEgS)
+  })
+
+
+setMethod(
+  f = "insert", 
+  signature = c("ADEgORtrellis", "ADEgS"),
+  definition = function(graphics, oldgraphics, posi, ratio, inset, plot, which) {
+    thecall <- call("insert", graphics at Call, oldgraphics at Call)
+    if(missing(which)) {
+      positions <- .getposition(posi, w = ratio, h = ratio) + inset
+      newADEgS <- new(Class = "ADEgS", ADEglist = c(oldgraphics at ADEglist, list(graphics)), positions = rbind(oldgraphics at positions, positions), add = rbind(cbind(oldgraphics at add, rep(0, length.out = nrow(oldgraphics at add))), rep(0, length.out = ncol(oldgraphics at add) + 1)), Call = thecall)
+    } else {
+      l <- sapply(1:length(oldgraphics), FUN = function(i) {if(i %in% which) {insert(graphics, oldgraphics at ADEglist[[i]], posi = posi, ratio = ratio, inset = inset, plot = FALSE)} else oldgraphics at ADEglist[[i]]})
+      newADEgS <- new(Class = "ADEgS", ADEglist = l, positions = oldgraphics at positions, add = oldgraphics at add, Call = thecall)
+    }
+    
+    if(plot)
+      print(newADEgS)
+    assign("currentadeg", newADEgS, envir = .ADEgEnv)
+    invisible(newADEgS)
+  })
+
+
+setMethod(
+  f = "insert", 
+  signature = c("ADEgS", "ADEgS"),
+  definition = function(graphics, oldgraphics, posi, ratio, inset, plot, which, dispatch) {
+    thecall <- call("insert", graphics at Call, oldgraphics at Call)
+    if(!dispatch){
+      if(missing(which)) {
+        positions <- .getposition(posi, w = ratio, h = ratio) + inset
+        newADEgS <- new(Class = "ADEgS", ADEglist = c(oldgraphics at ADEglist, list(graphics)), positions = rbind(oldgraphics at positions, positions), add = rbind(cbind(oldgraphics at add, rep(0, length.out = nrow(oldgraphics at add))), rep(0, length.out = ncol(oldgraphics at add) + 1)), Call = thecall)
+      } else {
+        l <- sapply(1:length(oldgraphics), FUN = function(i) {if(i %in% which) {insert(graphics, oldgraphics at ADEglist[[i]], posi = posi, ratio = ratio, inset = inset, plot = FALSE)} else oldgraphics at ADEglist[[i]]})
+        newADEgS <- new(Class = "ADEgS", ADEglist = l, positions = oldgraphics at positions, add = oldgraphics at add, Call = thecall)
+      }
+    } else {
+      if(length(graphics) != length(oldgraphics))
+        stop("dispatch option is not allowed with ADEgS object of different length")
+      else {
+        l <- sapply(1:length(oldgraphics), FUN = function(i) {insert(graphics at ADEglist[[i]], oldgraphics at ADEglist[[i]], posi = posi, ratio = ratio, inset = inset, plot = FALSE)})
+        newADEgS <- new(Class = "ADEgS", ADEglist = l, positions = oldgraphics at positions, add = oldgraphics at add, Call = thecall)
+      }
+    }
+    
+    if(plot)
+      print(newADEgS)
+    assign("currentadeg", newADEgS, envir = .ADEgEnv)
+    invisible(newADEgS)
+  })
+
+##############################################          
+##                  Update                  ##
+##############################################
+
+## update the modified parameters
+setMethod(
+  f = "update",
+  signature = "ADEgS",
+  definition = function(object, ..., plot = TRUE) {
+    nameobj <- deparse(substitute(object, env = parent.frame()))
+    ## object is in parent.frame() because 'update' method pattern is different with 'update' generic method pattern
+    ## see https://stat.ethz.ch/pipermail/r-help/2008-January/152296.html
+    
+    slots <- list()
+    slots$names <- names(object)
+    slots$positions <- object at positions
+    
+    ## extract specific slots used in function call
+    pattern <- c("names", "positions")
+    lpattern <- as.list(rep("", length(pattern)))
+    names(lpattern) <- pattern
+    
+    ## sort parameters
+    sep <- separation(..., pattern = lpattern)
+    slots <- modifyList(slots, sep[[1]], keep.null = TRUE)
+    sep[[2]] <- sortparamADEgS(sep[[2]], graphsnames = slots$names)
+
+    ADEglist <- sapply(1:length(object at ADEglist), FUN = function(x) {if(inherits(object at ADEglist[[x]], "ADEg") | inherits(object at ADEglist[[x]], "ADEgS")) update(object at ADEglist[[x]], plot = FALSE, sep[[2]][[x]]) else do.call("update", c(list(object = object at ADEglist[[x]]), sep[[2]][[x]]))})
+    object <- new("ADEgS", ADEglist = ADEglist, positions = slots$positions, add = object at add, Call = match.call())
+    names(object) <- slots$names
+    
+    if(plot)
+      print(object)
+    assign(nameobj, object, envir = parent.frame(n = 2))
+    ## see also https://stat.ethz.ch/pipermail/r-help/2008-January/152296.html
+    
+    assign("currentadeg", object, envir = .ADEgEnv)
+  })
+
+##############################################          
+##                   Display                ##
+##############################################
+
+setMethod(
+  f = "show",
+  signature = "ADEgS",
+  definition = function(object) {
+    print(object)
+  })
+
+
+setMethod(
+  f = "plot",
+  signature = c("ADEgS", "ANY"),
+  definition = function(x, y) {
+    print(x)
+  })
+
+
+setMethod(
+  f = "print",
+  signature = "ADEgS",
+  definition = function(x, closeViewport = TRUE, square = NULL) {
+    oldtextcex <- trellis.par.get("fontsize")$text
+    oldpointcex <- trellis.par.get("fontsize")$points
+    oldmarginH <- trellis.par.get("layout.heights")
+    oldmarginW <- trellis.par.get("layout.widths")
+    
+    trellis.par.set(layout.heights = list(top.padding = .2 + oldmarginH$top.padding, bottom.padding = .2 + oldmarginH$bottom.padding), layout.widths = list(left.padding = .2 + oldmarginW$left.padding, right.padding = .2 + oldmarginW$right.padding))
+    on.exit(trellis.par.set(list("fontsize" = list("text" = oldtextcex, "points" = oldpointcex), "layout.widths" = list("left.padding" = oldmarginW$left.padding, "right.padding" = oldmarginW$right.padding), "layout.heights" = list("top.padding" = oldmarginH$top.padding, "bottom.padding" = oldmarginH$bottom.padding))))
+    
+    gettextsize <- function(widG, heigG) {
+      ## Adjust text size to viewport size
+      if(widG < 1 / 2 || heigG < 1 / 2)
+        return(0.66 / 1.25)
+      if(widG == 1 / 2 && heigG == 1 / 2)
+        return(0.83 / 1.25)
+      if(widG == 1 && heigG == 1)
+        return(1)
+      else return(1 / 1.25)              
+    }
+    
+    getxscale <- function(object) {
+      ## Obtain limits for x
+      if(inherits(object, "ADEg"))
+        object <- gettrellis(object)
+      if(class(object) == "trellis") {
+        res <- object$x.limits
+      } else {
+        res <- c(0, 1)
+      }
+      return(res)
+    }
+    
+    getyscale <- function(object) {
+      ## Obtain limits for y
+      if(inherits(object, "ADEg"))
+        object <- gettrellis(object)
+      if(class(object) == "trellis") {
+        res <- object$y.limits
+      } else {
+        res <- c(0, 1)
+      }
+      return(res)
+    }
+    
+    printADEGs <- function(adegobject, closeViewport, square) {
+      if(closeViewport)
+        grid.newpage()
+      
+      positions <- adegobject at positions
+      listG <- adegobject at ADEglist
+      
+      ## create the list of viewport and push it
+      unit.vpL <- "npc"
+      if(isTRUE(square))
+        unit.vpL <- "snpc"
+      
+      vpL <- do.call("vpList", lapply(1:length(listG), function(i) do.call("viewport", args = list(x = positions[i, 1], y = positions[i, 2], width = positions[i, 3] - positions[i, 1], height = positions[i, 4] - positions[i, 2], just = c(0, 0), name = names(listG)[i], xscale = getxscale(listG[[i]]), yscale = getyscale(listG[[i]]), default.units = unit.vpL))))
+      pushViewport(vpL)
+      
+      upViewport(0)
+      width.root <- convertWidth(unit(1, unit.vpL), "inches", valueOnly = TRUE)
+      height.root <- convertHeight(unit(1, unit.vpL), "inches", valueOnly = TRUE)
+      
+      for(i in 1:length(listG)) {
+        object <- listG[[i]]
+        seekViewport(names(listG)[i])
+        
+        if(inherits(object, "ADEg") | class(object) == "trellis") {
+          if(inherits(object, "ADEg"))
+            trobject <- gettrellis(object)
+          else
+            trobject <- object
+          
+          square.i <- ifelse(is.null(square), !trobject$aspect.fill, square)
+          unit.vpi <- "npc"
+          if(isTRUE(square.i))
+            unit.vpi <- "snpc"
+          
+          vp <- viewport(x = 0, y = 0, width = 1, height = 1, just = c(0, 0), name = "current", xscale = getxscale(listG[[i]]), yscale = getyscale(listG[[i]]), default.units = unit.vpi)
+          pushViewport(vp)
+
+          width.current <- convertWidth(unit(1, unit.vpi), "inches", valueOnly = TRUE)
+          height.current <- convertHeight(unit(1, unit.vpi), "inches", valueOnly = TRUE)
+          ratio.width <- width.current / width.root
+          ratio.height <- height.current / height.root
+          
+          cst <- gettextsize(ratio.width, ratio.height)
+          sup <- adegobject at add[, i]
+          trellis.par.set(list("fontsize" = list("text" = oldtextcex * cst, "points" = oldpointcex * cst)))
+          if(any(sup == 1))
+            printSuperpose(g1 = object, refg = listG[[which(adegobject at add[, i] == 1)[1]]])
+          else
+            print(object, newpage = FALSE)
+          
+          popViewport()
+          
+        } else if(inherits(object, "ADEgS")) {
+          names(object) <- paste(names(listG)[i], names(object), sep = ".")
+          printADEGs(object, closeViewport = FALSE, square = square)
+        } else {
+          stop(paste("Not implemented for class:", class(object), sep = " "))
+        }
+        popViewport()
+      }
+    }
+    
+    printADEGs(x, closeViewport = closeViewport, square = square)
+    assign("currentadeg", x, envir = .ADEgEnv)
+  })
+
+
+##############################################          
+##                   Creation               ##
+##############################################
+
+ADEgS <- function(adeglist, positions, layout, add = NULL, plot = TRUE) {
+  
+  m <- matrix(0, length(adeglist), length(adeglist))
+  
+  if(missing(layout) & (is.null(add) | identical(add, m)) & missing(positions))
+    layout <- .n2mfrow(length(adeglist))
+  
+  if(missing(positions) & !missing(layout)) {
+    if(is.list(layout)) ## in layout: width and heights informations, layout is a list
+      positions <- do.call("layout2position", layout)
+    else
+      positions <- layout2position(layout, ng = length(adeglist))
+  }
+  
+  if(missing(positions)) 
+    positions <- matrix(rep(c(0, 0, 1, 1), length.out = length(adeglist) * 4), byrow = TRUE, ncol = 4)
+  
+  if(is.null(add))
+    add <- m
+  
+  ADEgObject <- new(Class = "ADEgS", ADEglist = adeglist, positions = positions, add = add, Call = match.call())
+  if(plot)
+    print(ADEgObject)
+  invisible(ADEgObject)
+}
diff --git a/R/C1.barchart.R b/R/C1.barchart.R
new file mode 100644
index 0000000..2e98c33
--- /dev/null
+++ b/R/C1.barchart.R
@@ -0,0 +1,172 @@
+setClass(
+  Class = "C1.barchart",
+  contains = "ADEg.C1"
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "C1.barchart",
+  definition = function(.Object, data = list(score = NULL, labels = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.C1 initialize
+    .Object at data$labels <- data$labels
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "C1.barchart",
+  definition = function(object) {
+    nameobj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    if(object at data$storeData)
+      score <- object at data$score
+    else
+      score <- eval(object at data$score, envir = sys.frame(object at data$frame))
+    
+    score <- as.matrix(score)[, 1]  ## to manage 'score' when it is a data.frame with only one column
+    
+    ## change default for some parameters
+    if(adegtot$p1d$horizontal && is.null(object at adeg.par$plabels$srt))
+      adegtot$plabels$srt <- 0
+    else if(!adegtot$p1d$horizontal && is.null(object at adeg.par$plabels$srt))
+      adegtot$plabels$srt <- 90
+    if(is.null(object at adeg.par$plabels$boxes$draw))
+      adegtot$plabels$boxes$draw <- FALSE
+    adegtot$p1d$rug$draw <- FALSE
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    if(object at adeg.par$p1d$horizontal && is.null(object at g.args$ylim))
+	    object at g.args$ylim <- c(0, length(score) + 1)
+    if(!object at adeg.par$p1d$horizontal && is.null(object at g.args$xlim))
+	    object at g.args$xlim <- c(0, length(score) + 1)
+    
+    assign(nameobj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "C1.barchart",
+  definition = function(object, x, y) {
+    ## Drawing barchart
+    ## x is the index
+    ## y is the score
+   
+    ## get some parameters    
+    pscore <- object at adeg.par$p1d
+    ppoly <- lapply(object at adeg.par$ppolygons, FUN = function(x) {rep(x, length.out = length(x))})
+    plabels <- lapply(object at adeg.par$plabels, FUN = function(x) {rep(x, length.out = length(x))})
+    
+    if(object at data$storeData)
+      labels <- object at data$labels
+    else
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+        
+    ## manage string rotation
+    srt <- 0
+    if(is.numeric(plabels$srt[1]))
+      srt <- plabels$srt[1]
+    else {
+      if(plabels$srt[1] == "horizontal")
+        srt <- 0
+      else if(plabels$srt[1] == "vertical")
+        srt <- 90
+    }
+     
+  	## lims <- current.panel.limits(unit = "native")
+    
+    ## Starts the display
+    ## depends on the parametres horizontal
+    ## reverse and rug.draw are always considered as FALSE
+    if(pscore$horizontal) {
+      x.tmp <- y
+      y.tmp <- 1:length(x)
+    } else {
+      x.tmp <- 1:length(x)
+      y.tmp <- y
+    }
+    
+    panel.barchart(x.tmp, y.tmp, horizontal = pscore$horizontal, box.width = 0.9, origin = 0, reference = FALSE,
+                   border = ppoly$border, col = ppoly$col, lty = ppoly$lty, lwd = ppoly$lwd, alpha = ppoly$alpha)
+    ## panel.text(x.tmp, y.tmp, labels)
+    if(!is.null(labels)) {
+      if(abs(sin(srt)) > sin(45)) {
+        ## almost vertical labels
+        if(pscore$horizontal)
+          width <- stringWidth("h")
+        else
+          width <- stringWidth(labels) + stringWidth("h")
+        
+        width <- rep(plabels$cex, length.out = length(labels)) * convertUnit(width, "native", typeFrom = "dimension", axisFrom = "x", axisTo = "y", valueOnly = TRUE) / 2 
+      } else {
+        ## almost horizont labels
+        if(pscore$horizontal)
+          width <- stringWidth(labels) + stringWidth("h")
+        else
+          width <- stringWidth("h")
+        
+        width <- rep(plabels$cex, length.out = length(labels)) * convertUnit(width, "native", typeFrom = "dimension", axisFrom = "x", valueOnly = TRUE) / 2 
+      }
+      
+      if(pscore$horizontal)
+        adeg.panel.label(x = x.tmp + width * sign(x.tmp), y = y.tmp, labels = labels, plabels = plabels)
+      else
+        adeg.panel.label(x = x.tmp, y = y.tmp + width * sign(y.tmp), labels = labels, plabels = plabels)
+    }
+  })
+
+
+s1d.barchart <- function(score, labels = NULL, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  score <- eval(thecall$score, envir = sys.frame(sys.nframe() + pos))
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    if(NCOL(score) == 1)
+      object <- multi.facets.C1(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple scores")
+  }
+  
+  ## multiple scores
+  else if(NCOL(score) > 1) {
+    object <- multi.score.C1(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    if(storeData)
+    	tmp_data <- list(score = score, labels = labels, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(score = thecall$score, labels = thecall$labels, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "C1.barchart", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = sortparameters$g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object) 
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  if(!add & plot)
+    print(object)
+  invisible(object)  
+}
diff --git a/R/C1.curve.R b/R/C1.curve.R
new file mode 100644
index 0000000..77820e1
--- /dev/null
+++ b/R/C1.curve.R
@@ -0,0 +1,124 @@
+setClass(
+  Class = "C1.curve",
+  contains = "ADEg.C1"
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "C1.curve",
+  definition = function(.Object, data = list(score = NULL, at = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.C1 initialize
+    .Object at data$at <- data$at
+    validObject(.Object)
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "C1.curve",
+  definition = function(object) {
+    nameobj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    if(object at data$storeData)
+      at <- object at data$at
+    else
+      at <- eval(object at data$at, envir = sys.frame(object at data$frame))
+    
+    ## change some defaults
+    adegtot$p1d$rug$draw <- FALSE
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    if(object at adeg.par$p1d$horizontal && is.null(object at g.args$ylim))
+      object at g.args$ylim <- setlimits1D(min(at), max(at), 0, FALSE)
+    if(!object at adeg.par$p1d$horizontal && is.null(object at g.args$xlim))
+      object at g.args$xlim <- setlimits1D(min(at), max(at), 0, FALSE)
+    
+    assign(nameobj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "C1.curve",
+  definition = function(object, x, y) {
+    ## Drawing dotchart
+    ## x is the index
+    ## y is the score
+    
+    ## get some parameters    
+    pscore <- object at adeg.par$p1d
+    ppoints <- lapply(object at adeg.par$ppoints, FUN = function(x) {rep(x, length.out = length(x))})
+    plines <- lapply(object at adeg.par$plines, FUN = function(x) {rep(x, length.out = length(x))})
+    
+    ## reorder the values
+    y <- y[order(x)]
+    x <- sort(x)
+    
+    ## Starts the display
+    ## depends on the parametres horizontal
+    ## rug.draw and reverse are always considered as FALSE
+    
+    if(pscore$horizontal) {
+      x.tmp <- y
+      y.tmp <- x
+    } else {
+      x.tmp <- x
+      y.tmp <- y
+    }
+    
+    panel.lines(x = x.tmp, y = y.tmp, lwd = plines$lwd, lty = plines$lty, col = plines$col)
+    panel.points(x = x.tmp, y = y.tmp, pch = ppoints$pch, cex = ppoints$cex, col = ppoints$col, alpha = ppoints$alpha)
+  })
+
+
+s1d.curve <- function(score, at = 1:NROW(score), facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    if(NCOL(score) == 1)
+      object <- multi.facets.C1(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple scores")
+  }
+  
+  ## multiple scores
+  else if(NCOL(score) > 1) {
+    object <- multi.score.C1(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    if(storeData)
+    	tmp_data <- list(score = score, at = at, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(score = thecall$score, at = thecall$at, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "C1.curve", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = sortparameters$g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object) 
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  if(!add & plot)
+    print(object)
+  invisible(object)  
+}
diff --git a/R/C1.curves.R b/R/C1.curves.R
new file mode 100644
index 0000000..c01ab48
--- /dev/null
+++ b/R/C1.curves.R
@@ -0,0 +1,83 @@
+setClass(
+  Class = "C1.curves",
+  contains = "C1.curve"
+)
+
+setMethod(
+  f = "panel",
+  signature = "C1.curves",
+  definition = function(object, x, y) {
+    ## Drawing dotchart
+    ## x is the index
+    ## y is the score
+    
+    ## get some parameters
+    nr <- NROW(object at data$score)
+    nc <- NCOL(object at data$score)
+      
+    pscore <- object at adeg.par$p1d
+    ppoints <- lapply(object at adeg.par$ppoints, FUN = function(x) {rep(rep(x, length.out = nc), each = nr)})
+    plines <- lapply(object at adeg.par$plines, FUN = function(x) {rep(rep(x, length.out = nc), each = nr)})
+    
+    ymat <- matrix(y, nrow =  nr, ncol = nc)
+    ## reorder the values
+    y <- as.vector(ymat[order(x), ])
+    x <- sort(x)
+    
+    ## Starts the display
+    ## depends on the parametres horizontal
+    ## rug.draw and reverse are always considered as FALSE
+    
+    for(i in 1:nc){
+        idx <- (i - 1)*nr + (1:nr)
+        if(pscore$horizontal) {
+        x.tmp <- y[idx]
+        y.tmp <- x
+        } else {
+        x.tmp <- x
+        y.tmp <- y[idx]
+        }
+    
+        panel.lines(x = x.tmp, y = y.tmp, lwd = plines$lwd[idx], lty = plines$lty[idx], col = plines$col[idx])
+        panel.points(x = x.tmp, y = y.tmp, pch = ppoints$pch[idx], cex = ppoints$cex[idx], col = ppoints$col[idx], alpha = ppoints$alpha[idx])
+    }
+     })
+
+
+s1d.curves <- function(score, at = 1:NROW(score), facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    if(NCOL(score) == 1)
+      object <- multi.facets.C1(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple scores")
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    if(storeData)
+    	tmp_data <- list(score = score, at = at, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(score = thecall$score, at = thecall$at, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "C1.curves", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = sortparameters$g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object) 
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  if(!add & plot)
+    print(object)
+  invisible(object)  
+}
diff --git a/R/C1.density.R b/R/C1.density.R
new file mode 100644
index 0000000..2c4a6e7
--- /dev/null
+++ b/R/C1.density.R
@@ -0,0 +1,249 @@
+#####################################################################
+## S1.density to compare with S1.gauss afterwards                  ##
+## TODO: reverse/vertical mettre a l'echelle distribution calculee ##
+## Dans l'idée S1.density plutot si pas de factor...               ##
+#####################################################################
+
+setClass(
+  Class = "C1.density",
+  contains = "ADEg.C1"
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "C1.density",
+  definition = function(.Object, data = list(score = NULL, fac = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.C1 initialize
+    .Object at data$fac <- data$fac
+    return(.Object)
+  })
+
+
+### densities calculations according to user parameters and score/factor
+setMethod(
+  f = "prepare",
+  signature = "C1.density",
+  definition = function(object) {
+    nameobj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    if(object at data$storeData) {
+      fac <- object at data$fac
+      score <- object at data$score
+    } else {
+      fac <- eval(object at data$fac, envir = sys.frame(object at data$frame))
+      score <- eval(object at data$score, envir = sys.frame(object at data$frame))
+    }
+    score <- as.matrix(score)[, 1]  ## to manage 'score' when it is a data.frame with only one column
+    nlev <- nlevels(as.factor(fac))
+    
+    ## If axes are plotted, put a label for axis
+    if(adegtot$paxes$draw) {
+      if(is.null(object at g.args$xlab) & !adegtot$p1d$horizontal)
+        object at g.args$xlab <- "density"
+      if(is.null(object at g.args$ylab) & adegtot$p1d$horizontal)
+        object at g.args$ylab <- "density"
+    }
+    
+    if(is.logical(object at g.args$col)) {
+      if(object at g.args$col)
+        adegtot$plabels$col <- adegtot$plabels$boxes$col <- adegtot$plines$col <- adegtot$ppolygons$col <- adegtot$ppolygons$border <- adegtot$ppalette$quali(nlev) 
+    } else
+      adegtot$plabels$col <- adegtot$plabels$boxes$col <- adegtot$plines$col <- adegtot$ppolygons$col <- adegtot$ppolygons$border <- rep(object at g.args$col, length.out = nlev)
+    
+    ## if fill is FALSE, polygons density curves are transparent
+    if(!object at g.args$fill)
+      adegtot$ppolygons$col <- "transparent"
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    scores <- split(score, fac)
+    densit <- vector(mode = "list", length = length(scores))
+    names(densit) <- names(scores)
+    ## estimate density for each level of the factor
+    for(i in 1:length(scores)) {
+      if(length(scores[[i]]) == 0) {
+        ## no data in the given level
+        densit[[i]] <- list(x = NA, y = NA)
+      } else {
+        if(!is.null(object at g.args$bandwidth))
+          densit[[i]] <- bkde(scores[[i]], kernel = object at g.args$kernel, bandwidth = object at g.args$bandwidth, gridsize = object at g.args$gridsize)
+        else
+          densit[[i]] <- bkde(scores[[i]], kernel = object at g.args$kernel, gridsize = object at g.args$gridsize)        
+      }
+    }
+   
+    lead <- ifelse(object at adeg.par$p1d$reverse, 1 , -1)
+    
+    if(object at adeg.par$p1d$horizontal && is.null(object at g.args$ylim))
+      object at g.args$ylim <- c(0, max(sapply(densit, FUN = function(x) {ifelse(is.na(x$y[1]), 0, max(x$y))}) / 0.85))
+    if(object at adeg.par$p1d$horizontal) {
+    	ref <- ifelse(object at adeg.par$p1d$reverse, 2, 1)
+      margin <- object at g.args$ylim[ref]
+      if(object at adeg.par$p1d$rug$draw)
+        margin <- object at adeg.par$p1d$rug$margin * abs(diff(object at g.args$ylim))
+      object at s.misc$rug <- object at g.args$ylim[ref]
+      object at g.args$ylim[ref] <- object at g.args$ylim[ref] + lead * margin
+    }
+    
+    if(!object at adeg.par$p1d$horizontal && is.null(object at g.args$xlim))
+      object at g.args$xlim <- c(0, max(sapply(densit, FUN = function(x) {ifelse(is.na(x$y[1]), 0, max(x$y))}) / 0.85))
+    if(!object at adeg.par$p1d$horizontal) {
+      ref <- ifelse(object at adeg.par$p1d$reverse, 2, 1)
+      margin <- object at g.args$xlim[ref]
+      if(object at adeg.par$p1d$rug$draw)
+        margin <- object at adeg.par$p1d$rug$margin * abs(diff(object at g.args$xlim))
+      object at s.misc$rug <- object at g.args$xlim[ref]
+      object at g.args$xlim[ref] <- object at g.args$xlim[ref] + lead * margin
+    }
+    
+    object at stats$densit <- densit
+    assign(nameobj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "C1.density",
+  definition = function(object, x, y) {
+    ## Drawing densities as polygons (filled or not)
+    ## one polygon per level
+    ## y is the score
+
+    ## get some parameters
+    pscore <- object at adeg.par$p1d
+    curvess <- object at stats$densit
+    labels <- names(curvess)
+    lims <- current.panel.limits(unit = "native")
+   
+    if(object at data$storeData)
+      fac <- object at data$fac
+    else
+      fac <- eval(object at data$fac, envir = sys.frame(object at data$frame))
+    nlev <- nlevels(as.factor(fac))
+   
+    ppoly <- lapply(object at adeg.par$ppolygons, FUN = function(x) rep(x, length.out = nlev))
+    plabels <- lapply(object at adeg.par$plabels, FUN = function(x) rep(x, length.out = nlev))
+    
+    y <- split(y, fac)
+        
+    ## manage string rotation
+    srt <- 0
+    if(is.numeric(plabels$srt[1]))
+      srt <- plabels$srt[1]
+    else{
+      if(plabels$srt[1] == "horizontal")
+        srt <- 0
+      else if(plabels$srt[1] == "vertical")
+        srt <- 90
+    }
+ 
+    ##  Starts the display
+    ## depends on the parametres horizontal and reverse
+    lead <- ifelse(pscore$reverse, -1, 1)
+    if(pscore$horizontal) {
+      ## horizontal drawing
+      margin <- 0
+      if(pscore$rug$draw)
+        margin <- if(is.unit(pscore$rug$margin)) convertUnit(pscore$rug$margin, typeFrom = "dimension", unitTo = "native", axisFrom = "y", valueOnly = TRUE) else pscore$rug$margin
+      margin <- ifelse(pscore$reverse, lims$ylim[2], lims$ylim[1]) + lead * margin
+      
+      for(i in 1:nlev) {
+        if(!is.na(curvess[[i]]$y[1])) {
+          y <- margin + lead * curvess[[i]]$y
+          panel.polygon(x = c(min(curvess[[i]]$x), curvess[[i]]$x, max(curvess[[i]]$y)), y = c(margin, y, margin), border = ppoly$border[i],
+                        col = ppoly$col[i], lty = ppoly$lty[i], lwd = ppoly$lwd[i], alpha = ppoly$alpha[i])
+          if(nlev > 1) {
+            ## indicate levels names for each curve
+            ymaxindex <- which.max(curvess[[i]]$y) ## places at the maximum
+            panel.text(x = curvess[[i]]$x[ymaxindex], y = y[ymaxindex], labels = names(curvess)[i], pos = ifelse(pscore$reverse, 1, 3), col = plabels$col[i],
+                       cex = plabels$cex[i], alpha = plabels$alpha[i], srt = srt)
+          }
+        }
+      }
+    } else {
+      ## vertical drawing
+      margin <- 0
+      if(pscore$rug$draw)
+        margin <- if(is.unit(pscore$rug$margin)) convertUnit(pscore$rug$margin, typeFrom = "dimension", unitTo = "native", axisFrom = "x", valueOnly = TRUE) else pscore$rug$margin
+      margin <- ifelse(pscore$reverse, lims$xlim[2], lims$xlim[1]) + lead * margin
+   
+      for(i in 1:nlev) {
+        if(!is.na(curvess[[i]]$y[1])) {
+          x <- margin + lead * curvess[[i]]$y
+          panel.polygon(x = c(margin, x, margin), y = c(min(curvess[[i]]$x), curvess[[i]]$x, max(curvess[[i]]$x)), border = ppoly$border[i],
+                        col = ppoly$col[i], lty = ppoly$lty[i], lwd = ppoly$lwd[i], alpha = ppoly$alpha[i])
+          if(nlev > 1) {
+            ## indicate levels names for each curve
+            xmaxindex <- which.max(curvess[[i]]$y)
+            panel.text(x = x[xmaxindex], y = curvess[[i]]$x[xmaxindex], labels = names(curvess)[i], pos = ifelse(pscore$reverse, 2, 4), col = plabels$col[i], cex = plabels$cex[i], alpha = plabels$alpha[i], srt = srt)
+          }
+        }
+      }      
+    }        
+  })
+
+
+## s1d.density: user function
+## kernel, bandwidth and gridsize directly passed to the bkde function (for density calculation)
+## if fill is FALSE, polygons density curves are transparent
+s1d.density <- function(score, fac = gl(1, NROW(score)), kernel = c("normal", "box", "epanech", "biweight", "triweight"), bandwidth = NULL, gridsize = 450, col = TRUE, fill = TRUE, facets = NULL,
+                        plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+
+	thecall <- .expand.call(match.call())
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    if(NCOL(score) == 1 & NCOL(fac) == 1)
+      object <- multi.facets.C1(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple scores and/or multiple fac")
+  }
+  
+  ## multiple scores
+  else if(NCOL(score) > 1) {
+    if(NCOL(fac) == 1)
+      object <- multi.score.C1(thecall)
+    else 
+      stop("Multiple scores are not allowed with multiple fac")
+  }
+  
+  ## multiple fac
+  else if(NCOL(fac) > 1) {
+    object <- multi.variables.C1(thecall, "fac")
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(kernel = match.arg(kernel), bandwidth = bandwidth, gridsize = gridsize, fill = fill, col = col))
+    if(storeData)
+    	tmp_data <- list(score = score, fac = fac, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(score = thecall$score, fac = thecall$fac, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "C1.density", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+
+    ## preparation
+    prepare(object) 
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(!add & plot)
+    print(object)
+  invisible(object)  
+}
diff --git a/R/C1.dotplot.R b/R/C1.dotplot.R
new file mode 100644
index 0000000..34c267d
--- /dev/null
+++ b/R/C1.dotplot.R
@@ -0,0 +1,125 @@
+setClass(
+  Class = "C1.dotplot",
+  contains = "ADEg.C1"
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "C1.dotplot",
+  definition = function(.Object, data = list(score = NULL, at = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.C1 initialize
+    .Object at data$at <- data$at
+    validObject(.Object)
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "C1.dotplot",
+  definition = function(object) {
+    nameobj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    if(object at data$storeData)
+      at <- object at data$at
+    else
+      at <- eval(object at data$at, envir = sys.frame(object at data$frame))
+    
+    ## change some defaults
+    adegtot$p1d$rug$draw <- FALSE
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    if(object at adeg.par$p1d$horizontal && is.null(object at g.args$ylim))
+      object at g.args$ylim <- setlimits1D(min(at), max(at), 0, FALSE)  
+    if(!object at adeg.par$p1d$horizontal && is.null(object at g.args$xlim))
+      object at g.args$xlim <- setlimits1D(min(at), max(at), 0, FALSE)
+    
+    assign(nameobj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "C1.dotplot",
+  definition = function(object, x, y) {
+    ## Drawing dotchart
+    ## x is the index
+    ## y is the score
+    
+    ## get some parameters    
+    pscore <- object at adeg.par$p1d
+    ppoints <- lapply(object at adeg.par$ppoints, FUN = function(x) {rep(x, length.out = length(x))})
+    plines <- lapply(object at adeg.par$plines, FUN = function(x) {rep(x, length.out = length(x))})
+    
+    ## reorder the values
+    y <- y[order(x)]
+    x <- sort(x)
+    
+    ## Starts the display
+    ## depends on the parametres horizontal
+    ## rug.draw and reverse are always considered as FALSE
+    
+    if(pscore$horizontal) {
+      x.tmp <- y
+      y.tmp <- x
+      panel.segments(object at adeg.par$porigin$origin[1], y.tmp, x.tmp, y.tmp, lwd = plines$lwd, lty = plines$lty, col = plines$col)
+    } else {
+      x.tmp <- x
+      y.tmp <- y
+      panel.segments(x.tmp, object at adeg.par$porigin$origin[1], x.tmp, y.tmp, lwd = plines$lwd, lty = plines$lty, col = plines$col)
+    }
+    
+    panel.dotplot(x = x.tmp, y = y.tmp, horizontal = pscore$horizontal, pch = ppoints$pch, cex = ppoints$cex, col = ppoints$col, alpha = ppoints$alpha, col.line = "transparent")
+  })
+
+
+s1d.dotplot <- function(score, at = 1:NROW(score), facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    if(NCOL(score) == 1)
+      object <- multi.facets.C1(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple scores")
+  }
+  
+  ## multiple scores
+  else if(NCOL(score) > 1) {
+    object <- multi.score.C1(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    if(storeData)
+    	tmp_data <- list(score = score, at = at, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(score = thecall$score, at = thecall$at, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "C1.dotplot", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = sortparameters$g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object) 
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  if(!add & plot)
+    print(object)
+  invisible(object)  
+}
diff --git a/R/C1.gauss.R b/R/C1.gauss.R
new file mode 100644
index 0000000..ae90eb0
--- /dev/null
+++ b/R/C1.gauss.R
@@ -0,0 +1,249 @@
+#########################################################
+## C1.gauss: here assumption: gaussian distribution   ###
+#########################################################
+
+setClass(
+  Class = "C1.gauss",
+  contains = "ADEg.C1"
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "C1.gauss",
+  definition = function(.Object, data = list(score = NULL, fac = NULL, wt = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.C1 initialize
+    .Object at data$fac <- data$fac
+    .Object at data$wt <- data$wt
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "C1.gauss",
+  definition = function(object) {
+    nameobj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    if(object at data$storeData) {
+      fac <- object at data$fac
+      score <- object at data$score
+      wt <- object at data$wt
+    } else {
+      fac <- eval(object at data$fac, envir = sys.frame(object at data$frame))
+      score <- eval(object at data$score, envir = sys.frame(object at data$frame))
+      wt <- eval(object at data$wt, envir = sys.frame(object at data$frame))
+    }
+    nlev <- nlevels(as.factor(fac))
+     
+    ## If axes are plotted, put a label for axis
+    if(adegtot$paxes$draw) {
+      if(is.null(object at g.args$xlab) & !adegtot$p1d$horizontal)
+        object at g.args$xlab <- "density"
+      if(is.null(object at g.args$ylab) & adegtot$p1d$horizontal)
+        object at g.args$ylab <- "density"
+    }
+    
+    if(is.logical(object at g.args$col)) {
+      if(object at g.args$col)
+        adegtot$plabels$col <- adegtot$plabels$boxes$col <- adegtot$plines$col <- adegtot$ppolygons$col <- adegtot$ppolygons$border <- adegtot$ppalette$quali(nlev) 
+    } else
+      adegtot$plabels$col <- adegtot$plabels$boxes$col <- adegtot$plines$col <- adegtot$ppolygons$col <- adegtot$ppolygons$border <- rep(object at g.args$col, length.out = nlev)
+    
+    ## if fill is FALSE, polygons density curves are transparent
+    if(!object at g.args$fill)
+      adegtot$ppolygons$col <- "transparent"
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+   
+    ## statistics calculus
+    object at stats$means <- meanfacwt(score, fac, wt)
+    object at stats$var <- varfacwt(score, fac)
+    
+    ## here steps fixed, could be a argument of s1d.gauss
+    steps <- object at g.args$steps
+    nind <- table(fac)
+    gausscurv <- list()
+    if(object at adeg.par$p1d$horizontal)
+      xx <- seq(from = object at g.args$xlim[1], to = object at g.args$xlim[2], length.out = steps)
+    else
+      xx <- seq(from = object at g.args$ylim[1], to = object at g.args$ylim[2], length.out = steps)
+    
+    for(i in 1:nlev) {
+      if(nind[i] == 0)
+        gausscurv[[i]] <- NA
+      else
+        gausscurv[[i]] <- dnorm(xx, mean = object at stats$means[i], sd = sqrt(object at stats$var[i]))
+    }
+    names(gausscurv) <- levels(fac)
+    
+    lead <- ifelse(object at adeg.par$p1d$reverse, 1 , -1)
+    
+    if(object at adeg.par$p1d$horizontal && is.null(object at g.args$ylim))
+      object at g.args$ylim <- c(0, max(sapply(gausscurv, FUN = function(x) {ifelse(is.na(x[1]), 0, max(x)) / 0.85})))
+    if(object at adeg.par$p1d$horizontal) {
+    	ref <- ifelse(object at adeg.par$p1d$reverse, 2, 1)
+      margin <- object at g.args$ylim[ref]
+      if(object at adeg.par$p1d$rug$draw)
+        margin <- object at adeg.par$p1d$rug$margin * abs(diff(object at g.args$ylim))
+      object at s.misc$rug <- object at g.args$ylim[ref]
+      object at g.args$ylim[ref] <- object at g.args$ylim[ref] + lead * margin
+    }
+    
+    if(!object at adeg.par$p1d$horizontal && is.null(object at g.args$xlim))
+      object at g.args$xlim <- c(0, max(sapply(gausscurv, FUN = function(x) {ifelse(is.na(x[1]), 0, max(x)) / 0.85})))
+    if(!object at adeg.par$p1d$horizontal) {
+      ref <- ifelse(object at adeg.par$p1d$reverse, 2, 1)
+      margin <- object at g.args$xlim[ref]
+      if(object at adeg.par$p1d$rug$draw)
+        margin <- object at adeg.par$p1d$rug$margin * abs(diff(object at g.args$xlim))
+      object at s.misc$rug <- object at g.args$xlim[ref]
+      object at g.args$xlim[ref] <- object at g.args$xlim[ref] + lead * margin
+    }
+    
+    object at stats$gausscurves <- gausscurv
+    assign(nameobj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "C1.gauss",
+  definition = function(object, x, y) {
+    ## Drawing gauss curves as polygons (filled or not)
+    ## one polygon per level
+    ## y is the score
+
+    ## get some parameters
+    pscore <- object at adeg.par$p1d
+    curvess <- object at stats$gausscurves
+    labels <- names(curvess)
+    lims <- current.panel.limits(unit = "native")
+    
+    if(object at data$storeData)
+      fac <- object at data$fac
+    else
+      fac <- eval(object at data$fac, envir = sys.frame(object at data$frame))
+    nlev <- nlevels(as.factor(fac))
+       
+    ppoly <- lapply(object at adeg.par$ppolygons, FUN = function(x) rep(x, length.out = nlev))
+    plabels <- lapply(object at adeg.par$plabels, FUN = function(x) rep(x, length.out = nlev))
+
+    ## manage string rotation
+    srt <- 0
+    if(is.numeric(plabels$srt[1]))
+      srt <- plabels$srt[1]
+    else {
+      if(plabels$srt[1] == "horizontal")
+        srt <- 0
+      else if(plabels$srt[1] == "vertical")
+        srt <- 90
+    }
+    
+    ## Starts the display
+    ## depends on the parametres horizontal and reverse
+    lead <- ifelse(pscore$reverse, -1, 1)   
+    if(pscore$horizontal) {
+      ## horizontal drawing
+      margin <- 0
+      xx <- seq(from = lims$xlim[1], to = lims$xlim[2], length.out = object at g.args$steps)
+      if(pscore$rug$draw)
+        margin <- if(is.unit(pscore$rug$margin)) convertUnit(pscore$rug$margin, typeFrom = "dimension", unitTo = "native", axisFrom = "y", valueOnly = TRUE) else pscore$rug$margin
+      margin <- ifelse(pscore$reverse, lims$ylim[2], lims$ylim[1]) + lead * margin
+       
+      for(i in 1:nlev) {
+        if(!is.na(curvess[[i]][1])) {
+          y <- margin + lead * curvess[[i]]
+          panel.polygon(x = c(lims$xlim[1], xx, lims$xlim[2]), y = c(margin, y, margin) , border = ppoly$border[i],
+                        col = ppoly$col[i], lty = ppoly$lty[i], lwd = ppoly$lwd[i], alpha = ppoly$alpha[i])
+          if(nlev > 1) {
+            ## indicate levels names for each curve
+            ymaxindex <- which.max(curvess[[i]]) ## places at the maximum
+            panel.text(x = xx[ymaxindex], y = y[ymaxindex], labels = names(curvess)[i], pos = ifelse(pscore$reverse, 1, 3), col = plabels$col[i],
+                       cex = plabels$cex[i], alpha = plabels$alpha[i], srt = srt)
+          }
+        }
+      }
+    } else {
+      ## vertical drawing
+      margin <- 0
+      yy <- seq(from = lims$ylim[1], to = lims$ylim[2], length.out = object at g.args$steps)
+      if(pscore$rug$draw)
+        margin <- if(is.unit(pscore$rug$margin)) convertUnit(pscore$rug$margin, typeFrom = "dimension", unitTo = "native", axisFrom = "x", valueOnly = TRUE) else pscore$rug$margin
+      margin <- ifelse(pscore$reverse, lims$xlim[2], lims$xlim[1]) + lead * margin
+      for(i in 1:nlev) {
+        if(!is.na(curvess[[i]][1])) {
+          x <- margin + lead * curvess[[i]]
+          panel.polygon(x = c(margin, x, margin), y = c(lims$ylim[1], yy, lims$ylim[2]), border = ppoly$border[i],
+                        col = ppoly$col[i], lty = ppoly$lty[i], lwd = ppoly$lwd[i], alpha = ppoly$alpha[i])
+          if(nlev > 1) {
+            xmaxindex <- which.max(curvess[[i]])
+            panel.text(x = x[xmaxindex], y = yy[xmaxindex], labels = names(curvess)[i], col = plabels$col[i], pos = ifelse(pscore$reverse, 2, 4),
+                       cex = plabels$cex[i], alpha = plabels$alpha[i], srt = srt)
+          }
+        }
+      }
+    }
+  })
+
+
+s1d.gauss <- function(score, fac = gl(1, NROW(score)), wt = rep(1, NROW(score)), steps = 200, col = TRUE, fill = TRUE, facets = NULL,
+                      plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+                      
+  thecall <- .expand.call(match.call())
+  
+  ## parameters management
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    if(NCOL(score) == 1 & NCOL(fac) == 1)
+      object <- multi.facets.C1(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple scores and/or multiple fac")
+  }
+  
+  ## multiple scores
+  else if(NCOL(score) > 1) {
+    if(NCOL(fac) == 1)
+      object <- multi.score.C1(thecall)
+    else 
+      stop("Multiple scores are not allowed with multiple fac")
+  }
+  
+  ## multiple fac
+  else if(NCOL(fac) > 1) {
+    object <- multi.variables.C1(thecall, "fac")
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(steps = steps, fill = fill, col = col))
+    if(storeData)
+    	tmp_data <- list(score = score, fac = fac, wt = wt, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(score = thecall$score, fac = thecall$fac, wt = thecall$wt, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "C1.gauss", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+
+    ## preparation
+    prepare(object) 
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(!add & plot)
+    print(object)
+  invisible(object)
+}
diff --git a/R/C1.hist.R b/R/C1.hist.R
new file mode 100644
index 0000000..595e8f2
--- /dev/null
+++ b/R/C1.hist.R
@@ -0,0 +1,136 @@
+setClass(
+  Class = "C1.hist",
+  contains = "ADEg.C1"
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "C1.hist",
+  definition = function(.Object, data = list(score = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.C1 initialize
+    validObject(.Object)
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "C1.hist",
+  definition = function(object) {
+    nameobj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    if(object at data$storeData)
+      score <- object at data$score
+    else
+      score <- eval(object at data$score, envir = sys.frame(object at data$frame))
+    
+    score <- as.matrix(score)[, 1]  ## to manage 'score' when it is a data.frame with only one column
+    
+    ## change default for some parameters
+    adegtot$p1d$rug$draw <- FALSE
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    ## compute histogram
+    h <- hist(score, breaks = if(is.null(object at g.args$breaks)) object at g.args$nclass else object at g.args$breaks, right = object at g.args$right, plot = FALSE)
+    y <- switch(object at g.args$type, count = h$counts, percent = 100 * h$counts / length(score), density = h$density)
+    object at stats$heights <- y
+    object at stats$breaks <- h$breaks
+    
+    if(object at adeg.par$p1d$horizontal && is.null(object at g.args$ylim))
+	    object at g.args$ylim <- c(0, 1.1 * max(y))
+    if(!object at adeg.par$p1d$horizontal && is.null(object at g.args$xlim))
+	    object at g.args$xlim <- c(0, 1.1 * max(y))
+    
+    if(object at adeg.par$p1d$horizontal)
+      object at g.args$scales$y$at <- pretty(object at g.args$ylim, n = 5)
+    else
+      object at g.args$scales$x$at <- pretty(object at g.args$xlim, n = 5)
+    
+    assign(nameobj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "C1.hist",
+  definition = function(object, x, y) {
+    ## Drawing hist
+    ## y is the score
+    
+    ## get some parameters    
+    pscore <- object at adeg.par$p1d
+    ppoly <- lapply(object at adeg.par$ppolygons, FUN = function(x) {rep(x, length.out = length(x))})
+    breaks <- object at stats$breaks
+    heights <- object at stats$heights
+    
+    ## Starts the display
+    ## depends on the parametres horizontal
+    ## reverse and rug.draw are always considered as FALSE
+    if(pscore$horizontal) {
+      panel.rect(x = breaks[-length(breaks)], y = 0, height = heights, width = diff(breaks), 
+        col = ppoly$col, alpha = ppoly$alpha, border = ppoly$border, lty = ppoly$lty, 
+        lwd = ppoly$lwd, just = c("left", "bottom"))
+      
+    } else {
+      panel.rect(x = 0, y = breaks[-length(breaks)], height = diff(breaks), width = heights, 
+        col = ppoly$col, alpha = ppoly$alpha, border = ppoly$border, lty = ppoly$lty, 
+        lwd = ppoly$lwd, just = c("left", "bottom"))
+    }
+  })
+
+
+s1d.hist <- function(score, breaks = NULL, nclass = round(log2(length(score)) + 1), type = c("count", "density", "percent"), right = TRUE, 
+  facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  score <- eval(thecall$score, envir = sys.frame(sys.nframe() + pos))
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    if(NCOL(score) == 1)
+      object <- multi.facets.C1(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple scores")
+  }
+  
+  ## multiple scores
+  else if(NCOL(score) > 1) {
+    object <- multi.score.C1(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(type = match.arg(type), nclass = nclass, breaks = breaks, right = right))
+    if(storeData)
+    	tmp_data <- list(score = score, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(score = thecall$score, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "C1.hist", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object) 
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  if(!add & plot)
+    print(object)
+  invisible(object)  
+}
diff --git a/R/C1.interval.R b/R/C1.interval.R
new file mode 100644
index 0000000..793fa03
--- /dev/null
+++ b/R/C1.interval.R
@@ -0,0 +1,160 @@
+setClass(
+  Class = "C1.interval",
+  contains = "ADEg.C1"
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "C1.interval",
+  definition = function(.Object, data = list(score = NULL, at = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.C1 initialize
+    .Object at data$at <- data$at
+    validObject(.Object)
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "C1.interval",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    if(object at data$storeData)
+      at <- object at data$at
+    else
+      at <- eval(object at data$at, envir = sys.frame(object at data$frame))
+    
+    ## change default for some parameters
+    adegtot$p1d$rug$draw <- FALSE
+    if(object at g.args$method == "bars") {
+      if(is.null(object at adeg.par$parrows$ends))
+        adegtot$parrows$ends <- "both"
+      if(is.null(object at adeg.par$parrows$angle))
+        adegtot$parrows$angle <- 90    
+    }     
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    if(object at adeg.par$p1d$horizontal && is.null(object at g.args$ylim))
+      object at g.args$ylim <- setlimits1D(min(at), max(at), 0, FALSE)
+    if(!object at adeg.par$p1d$horizontal && is.null(object at g.args$xlim))
+      object at g.args$xlim <- setlimits1D(min(at), max(at), 0, FALSE)
+    
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f= "panel",
+  signature = "C1.interval",
+  definition = function(object, x, y) {
+    ## Drawing interval
+    ## x is the index
+    ## y is the score  
+    
+    lims <- current.panel.limits(unit = "native")
+    
+    pscore <- object at adeg.par$p1d
+    plines <- object at adeg.par$plines
+    parrows <- object at adeg.par$parrows
+    ppoly <- object at adeg.par$ppolygons
+    
+    nval <- length(y) %/% 2
+    score2 <- y[(nval + 1):length(y)]
+    score1 <- y[1 : nval]
+    
+    ## reorder the values
+    score1 <- score1[order(x)]
+    score2 <- score2[order(x)]
+    x <- sort(x)
+    
+    ## Starts the display
+    ## depends on the parametres horizontal
+    ## rug.draw and reverse are always considered as FALSE
+    
+    if(pscore$horizontal) {
+      if(object at g.args$method == "area") {
+        panel.polygon(x = c(score1, rev(score2)), y = c(x, rev(x)), border = "transparent", col = ppoly$col, alpha = ppoly$alpha)
+        panel.lines(x = score1, y = x, col = ppoly$border, lty = ppoly$lty, lwd = ppoly$lwd)
+        panel.lines(x = score2, y = x, col = ppoly$border, lty = ppoly$lty, lwd = ppoly$lwd)
+      } else if(object at g.args$method == "bars") {
+        panel.arrows(x0 = score1, y0 = x, x1 = score2, y1 = x, lwd = plines$lwd, col = plines$col, 
+          lty = plines$lty, angle = parrows$angle, length = parrows$length, ends = parrows$ends)
+      }
+      
+    } else {
+      if(object at g.args$method == "area") {
+        panel.polygon(x = c(x, rev(x)), y = c(score1, rev(score2)),  border = "transparent", col = ppoly$col, alpha = ppoly$alpha)
+        panel.lines(x = x, y = score1, col = ppoly$border, lty = ppoly$lty, lwd = ppoly$lwd)
+        panel.lines(x = x, y = score2, col = ppoly$border, lty = ppoly$lty, lwd = ppoly$lwd)
+      } else if(object at g.args$method == "bars") {
+        panel.arrows(x0 = x, y0 = score1, x1 = x, y1 = score2, lwd = plines$lwd, col = plines$col, 
+          lty = plines$lty, angle = parrows$angle, length = parrows$length, ends = parrows$ends)
+      }
+    }
+  })
+
+
+s1d.interval <- function(score1, score2, at = 1:NROW(score1), method = c("bars", "area"), facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  score1 <- eval(thecall$score1, envir = sys.frame(sys.nframe() + pos))
+  score2 <- eval(thecall$score2, envir = sys.frame(sys.nframe() + pos))
+  if(NROW(score1) != NROW(score2))
+    stop("score1 and score2 should have the same length")
+  if(NCOL(score1) != NCOL(score2))
+    stop("score1 and score2 should have the same number of columns")
+  
+  if((is.data.frame(score1) & NCOL(score1) == 1) | (is.data.frame(score2) & NCOL(score2) == 1)) 
+    stop("Not yet implemented for data.frame with only one column, please convert into vector")
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    if(NCOL(score1) == 1)
+      object <- multi.facets.C1(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple scores")
+  }
+  
+  ## multiple scores
+  else if(NCOL(score1) > 1) { 
+    object <- multi.score.C1(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(method = match.arg(method)))
+    if(storeData)
+    	tmp_data <- list(score = c(score1, score2), at = at, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(score = call("c", thecall$score1, thecall$score2), at = thecall$at, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "C1.interval", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object) 
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(!add & plot)
+    print(object)
+  invisible(object)
+}
diff --git a/R/S1.boxplot.R b/R/S1.boxplot.R
new file mode 100644
index 0000000..6bb21e3
--- /dev/null
+++ b/R/S1.boxplot.R
@@ -0,0 +1,246 @@
+###########################################################
+##                          s1d.boxplot                  ##
+###########################################################
+
+setClass(
+  Class = "S1.boxplot",
+  contains = "ADEg.S1",
+  )
+
+
+setMethod(
+  f = "initialize",
+  signature  = "S1.boxplot",
+  definition = function(.Object, data = list(score = NULL, fac = NULL, at = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.S1 initialize
+    .Object at data$fac <- data$fac
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "S1.boxplot",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    if(object at data$storeData)
+      fac <- as.factor(object at data$fac)
+    else
+      fac <- as.factor(eval(object at data$fac, envir = sys.frame(object at data$frame)))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    ## change default for some parameters
+    if(adegtot$p1d$horizontal & is.null(object at adeg.par$plabels$srt))
+      adegtot$plabels$srt <- 0
+    else if(!adegtot$p1d$horizontal & is.null(object at adeg.par$plabels$srt))
+      adegtot$plabels$srt <- 90
+
+    if(!is.null(object at g.args$col))
+      if(is.logical(object at g.args$col)) {
+        if(object at g.args$col)
+        	adegtot$ppoints$col <- adegtot$ppoints$fill <- adegtot$plabels$col <- adegtot$plabels$boxes$border <- adegtot$plines$col <- adegtot$ppolygons$border <- adegtot$ppolygons$col <- adegtot$ppalette$quali(nlevels(fac))
+      } else
+        adegtot$ppoints$col <- adegtot$ppoints$fill <- adegtot$plabels$col <- adegtot$plabels$boxes$border <- adegtot$plines$col <- adegtot$ppolygons$border <- adegtot$ppolygons$col <- rep(object at g.args$col, length.out = nlevels(fac))
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "S1.boxplot",
+  definition = function(object, x, y) {
+
+    if(object at data$storeData) {
+      fac <- object at data$fac
+      at <- object at data$at
+    } else {
+      fac <- eval(object at data$fac, envir = sys.frame(object at data$frame))
+      at <- eval(object at data$at, envir = sys.frame(object at data$frame))
+    }
+
+    fac <- as.factor(fac)
+    nlev <- nlevels(fac)
+    labels <- levels(fac)
+    
+    lims <- current.panel.limits(unit = "native")
+    pscore <- object at adeg.par$p1d
+    plabels <- object at adeg.par$plabels
+    
+    ## repeat graphical parameters (one for each level)
+    ppoints <- lapply(object at adeg.par$ppoints, FUN = function(x) x <- rep(x, length.out = nlev))
+    ppoints <- lapply(ppoints, FUN = function(x) x <- x[1:nlev])
+    plines <- lapply(object at adeg.par$plines, FUN = function(x) x <- rep(x, length.out = nlev))
+    plines <- lapply(plines, FUN = function(x) x <- x[1:nlev])
+    ppolygons <- lapply(object at adeg.par$ppolygons, FUN = function(x) x <- rep(x, length.out = nlev))
+    ppolygons <- lapply(ppolygons, FUN = function(x) x <- x[1:nlev])
+    
+    ## manage trellis parameters
+    oldcolsymbol <- trellis.par.get("plot.symbol")$col
+    oldcolumbrella <- trellis.par.get("box.umbrella")$col
+    oldcolrectangle <- trellis.par.get("box.rectangle")$col
+    trellis.par.set(list("plot.symbol" = list("col" = "black"), "box.umbrella" = list("col" = plines$col), "box.rectangle" = list("col" = ppolygons$border)))
+    on.exit(trellis.par.set(list("plot.symbol" = list("col" = oldcolsymbol), "box.umbrella" = list("col" = oldcolumbrella), "box.rectangle" = list("col" = oldcolrectangle))))
+
+    ## manage string rotation
+    srt <- 0
+    if(is.numeric(plabels$srt[1]))
+      srt <- plabels$srt[1]
+    else {
+      if(plabels$srt[1] == "horizontal")
+        srt <- 0
+      else if(plabels$srt[1] == "vertical")
+        srt <- 90
+    }
+    
+    gettextpos <- function(x, lim) {
+      if(length(x) != 2) {
+        ## if no data in the given level
+        return(c(NA, NA))
+      } else {
+        if(abs(lim[2] - x[2]) > abs(lim[1] - x[1]))
+          return(c(x[2], 1))
+        else
+          return(c(x[1], -1))
+      }
+    }
+    
+    if(pscore$horizontal) {
+      ## horizontal plot
+      ylab <- at
+      if(length(ylab) > 1)
+        bwid <- diff(range(ylab)) / (nlev + 1)
+      else
+        bwid <- 1 / 10
+
+      ## panel.bwplot
+      do.call("panel.bwplot", list(x = y, y = ylab[fac], box.ratio = bwid, coef = 1.5, pch = "|", horizontal = TRUE))
+      
+      ## add means
+      do.call("panel.points", c(list(x = (tapply(y, fac, mean)), y = ylab), ppoints))
+      minmax <- tapply(y, fac, range)
+      etis <- sapply(minmax, gettextpos, lim = lims$xlim)
+      
+    } else {
+      ## vertical plot
+      xlab <- at
+      if(length(xlab) > 1)
+        bwid <- diff(range(xlab)) / (nlev + 1)
+      else
+        bwid <- 1 / 10
+      
+      ## panel.bwplot
+      do.call("panel.bwplot", list(x = xlab[fac], y = y, box.ratio = bwid, coef = 1.5, pch = "|", horizontal = FALSE))
+      
+      ## add means
+      do.call("panel.points", c(list(y = (tapply(y, fac , mean)), x = xlab), ppoints))
+      minmax <- tapply(y, fac, range)
+      etis <- sapply(minmax, gettextpos, lim = lims$ylim)
+    }
+    
+    ## draw labels
+    if(abs(sin(srt)) > sin(45)) {
+      ## almost vertical labels
+      if(pscore$horizontal)
+        width <- stringWidth("h")
+      else
+        width <- stringWidth(labels) + stringWidth("h")
+      
+      width <- rep(plabels$cex, length.out = length(labels)) * convertUnit(width, "native", typeFrom = "dimension", axisFrom = "x", axisTo = "y", valueOnly = TRUE) / 2 
+    } else {
+      ## almost horizontal labels
+      if(pscore$horizontal)
+        width <- stringWidth(labels) + stringWidth("h")
+      else
+        width <- stringWidth("h")
+      
+      width <- rep(plabels$cex, length.out = length(labels)) * convertUnit(width, "native", typeFrom = "dimension", axisFrom = "x", valueOnly = TRUE) / 2 
+    }
+    
+    if(pscore$horizontal)
+      adeg.panel.label(x = etis[1, ] + etis[2, ] * width, y = ylab, labels = labels, plabels = plabels)
+    else
+      adeg.panel.label(x = xlab, y = etis[1, ] + etis[2, ] * width, labels = labels, plabels = plabels)
+  })
+
+  
+## For  boxplot, parameters can only be changed using par.settings arguments;
+setMethod(
+  f = "setlatticecall",
+  signature = "S1.boxplot",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    callNextMethod()
+    ppolygons <- object at adeg.par$ppolygons
+    object at lattice.call$arguments$par.settings <- modifyList(list(box.rectangle = c(list(col = ppolygons$border, fill = ppolygons$col), 
+    	ppolygons[-c(which(names(ppolygons) == "border" | (names(ppolygons) == "col")))]), box.umbrella = object at adeg.par$plines, 
+      plot.symbol = modifyList(list(col = "black", fill = "black"), object at adeg.par$ppoints)), object at lattice.call$arguments$par.settings, keep.null = TRUE)
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+s1d.boxplot <- function(score, fac = gl(1, NROW(score)), at = 1:nlevels(fac), col = NULL, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  fac <- eval(thecall$fac, envir = sys.frame(sys.nframe() + pos))
+  score <- eval(thecall$score, envir = sys.frame(sys.nframe() + pos))
+  if(NROW(fac) != NROW(score))
+    stop("fac and score must have the same number of rows")
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    if(NCOL(score) == 1 & NCOL(fac) == 1)
+      object <- multi.facets.S1(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple scores or fac")
+  }
+  
+  ## multiple scores
+  else if(NCOL(score) > 1) {
+    if(NCOL(fac) == 1)
+      object <- multi.score.S1(thecall)
+    else 
+      stop("Multiple scores are not allowed with multiple fac")
+  }
+  
+  ## multiple fac
+  else if(NCOL(fac) > 1) {
+    object <- multi.variables.S1(thecall, "fac")
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(col = col))
+    if(storeData)
+    	tmp_data <- list(score = score, fac = fac, at = at, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(score = thecall$score, fac = fac, at = thecall$at, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S1.boxplot", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object) 
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  if(!add & plot)
+    print(object)
+  invisible(object)
+}
+ 
diff --git a/R/S1.class.R b/R/S1.class.R
new file mode 100644
index 0000000..897a8ca
--- /dev/null
+++ b/R/S1.class.R
@@ -0,0 +1,246 @@
+###########################################################
+##                          s1d.class                    ##
+###########################################################
+
+setClass(
+  Class = "S1.class",
+  contains = "ADEg.S1",
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "S1.class",
+  definition = function(.Object, data = list(score = NULL, fac = NULL, wt = NULL, labels = NULL, at = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.S1 initialize
+    .Object at data$fac <- data$fac
+    .Object at data$wt <- data$wt
+    .Object at data$labels <- data$labels
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "S1.class",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    if(object at data$storeData)
+      fac <- as.factor(object at data$fac)
+    else
+      fac <- as.factor(eval(object at data$fac, envir = sys.frame(object at data$frame)))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    ## change default for some parameters
+    if(adegtot$p1d$horizontal & is.null(object at adeg.par$plabels$srt))
+      adegtot$plabels$srt <- 90
+    else if(!adegtot$p1d$horizontal & is.null(object at adeg.par$plabels$srt))
+      adegtot$plabels$srt <- 0
+    
+    if(any(adegtot$plabels$cex > 0) & is.null(object at adeg.par$plegend$drawKey)) ## if labels, no legend
+      adegtot$plegend$drawKey <- FALSE    
+    ## setting colors 
+    if(!is.null(object at g.args$col)) {
+      col.idx <- FALSE
+      if(is.logical(object at g.args$col)) {
+        if(object at g.args$col){
+          colT <- adegtot$ppalette$quali(nlevels(fac))
+          col.idx <- TRUE
+        }
+      } else {
+        colT <- rep(object at g.args$col, length.out = nlevels(fac))
+        col.idx <- TRUE
+      }
+      
+      if(col.idx) {
+        if(is.null(object at adeg.par$ppoints$col))
+          adegtot$ppoints$col <- colT
+        if(is.null(object at adeg.par$ppoints$fill))
+          adegtot$ppoints$fill <- colT
+        if(is.null(object at adeg.par$plabels$col))
+          adegtot$plabels$col <- colT
+        if(is.null(object at adeg.par$plabels$boxes$border))
+          adegtot$plabels$boxes$border <- colT
+        if(is.null(object at adeg.par$plines$col))
+          adegtot$plines$col <- colT
+      }
+    }
+    
+    if(adegtot$p1d$horizontal & is.null(object at g.args$ylim))
+      object at g.args$ylim <- c(0, 1)
+    
+    if(!adegtot$p1d$horizontal & is.null(object at g.args$xlim))
+      object at g.args$xlim <- c(0, 1)
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+## TODO: label orientation (works only for horizontal / vertical labels)
+setMethod(
+  f= "panel",
+  signature = "S1.class",
+  definition = function(object, x, y) {
+    
+    if(object at data$storeData) {
+      fac <- object at data$fac
+      score <- object at data$score
+      wt <- object at data$wt
+      at <- object at data$at
+      labels <- object at data$labels
+    } else {
+      fac <- eval(object at data$fac, envir = sys.frame(object at data$frame))
+      score <- eval(object at data$score, envir = sys.frame(object at data$frame))
+      wt <- eval(object at data$wt, envir = sys.frame(object at data$frame))
+      at <- eval(object at data$at, envir = sys.frame(object at data$frame))
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+    }
+    
+    fac <- as.factor(fac)
+    nlev <- nlevels(fac)
+    object at stats$means <- meanfacwt(score, fac, wt = wt)
+    lims <- current.panel.limits(unit = "native")
+    pscore <- object at adeg.par$p1d
+    ## repeat graphical parameters (one for each level)
+    ppoints <- lapply(object at adeg.par$ppoints, FUN = function(x) x <- rep(x, length.out = nlev))
+    plines <- lapply(object at adeg.par$plines, FUN = function(x) x <- rep(x, length.out = nlev))
+    plabels <- lapply(object at adeg.par$plabels, FUN = function(x) x <- rep(x, length.out = nlev))
+    plboxes <- lapply(object at adeg.par$plabels$boxes, FUN = function(x) x <- rep(x, length.out = nlev))
+    plabels$boxes <- plboxes
+    
+    if(!is.null(labels)) {
+      ## get text sizes for boxes
+      test <- .textsize(labels, plabels)
+      w <- test$w
+      h <- test$h
+    }
+    
+    lead <- ifelse(pscore$reverse, -1, 1)
+    
+    if(pscore$horizontal) {
+      ## horizontal plot
+      xpoints <- y
+      
+      ## get positions for labels
+      if(object at g.args$poslabel == "regular") {
+        spacelab <- diff(lims$xlim) / (nlev + 1)
+        xlab <- seq(from = lims$xlim[1] + spacelab, by = spacelab, length.out = nlev)[rank(object at stats$means, ties.method = "first")]
+      } else
+        xlab <- object at stats$means
+      
+      ## repeat means for each individual   
+      xlablines <- xlab[fac]
+      
+      ## repeat ylab for each individual
+      ylab <- rep(at, length.out = nlev)
+      ylablines <- ylab[fac]
+      
+      ## draw lines and labels
+      ypoints <- object at s.misc$rug
+      panel.segments(x0 = xpoints, y0 = ypoints, x1 = xlablines, y1 = ylablines, lwd = plines$lwd[fac], col = plines$col[fac], lty = plines$lty[fac])
+      if(any(ppoints$cex > 0))
+        panel.points(x = xpoints, y = ypoints, pch = ppoints$pch[fac], cex = ppoints$cex[fac], col = ppoints$col[fac], alpha = ppoints$alpha[fac], fill = ppoints$fill[fac])
+      if(any(plabels$cex > 0))
+        adeg.panel.label(x = xlab, y = ylab + lead * h / 2, labels = labels, plabels = plabels)
+      
+    } else {
+      ## vertical plot
+      ypoints <- y
+      
+      ## get positions for labels
+      if(object at g.args$poslabel == "regular") {
+        spacelab <- diff(lims$ylim) / (nlev + 1)
+        ylab <- seq(from = lims$ylim[1] + spacelab, by = spacelab, length.out = nlev)[rank(object at stats$means, ties.method = "first")]
+      } else
+        ylab <- object at stats$means
+      
+      ## repeat means for each individual   
+      ylablines <- ylab[fac]
+      
+      ## repeat ylab for each individual
+      xlab <- rep(at, length.out = nlev)
+      xlablines <- xlab[fac]
+      
+      ## draw lines and labels
+      xpoints <- object at s.misc$rug
+      panel.segments(x0 = xpoints, y0 = ypoints, x1 = xlablines, y1 = ylablines, lwd = plines$lwd[fac], col = plines$col[fac], lty = plines$lty[fac])
+      if(any(ppoints$cex > 0))
+        panel.points(x = xpoints, y = ypoints, pch = ppoints$pch[fac], cex = ppoints$cex[fac], col = ppoints$col[fac], alpha = ppoints$alpha[fac], fill = ppoints$fill[fac])
+      if(any(plabels$cex > 0))
+        adeg.panel.label(x = xlab + lead * w / 2 , y = ylab, labels = labels, plabels = plabels)
+    } 
+  })
+
+
+s1d.class <- function(score, fac, wt = rep(1, NROW(fac)), labels = levels(fac), at = 0.5, poslabel = c("regular", "value"), col = NULL, 
+                      facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  labels <- eval(thecall$labels, envir = sys.frame(sys.nframe() + pos))
+  fac <- eval(thecall$fac, envir = sys.frame(sys.nframe() + pos))
+  score <- eval(thecall$score, envir = sys.frame(sys.nframe() + pos))
+  if(NCOL(fac) == 1) {
+    fac <- as.factor(fac)
+    if(length(labels) != nlevels(fac))
+      stop("wrong number of labels")
+  }
+  if(NROW(score) != NROW(fac))
+    stop("score and factor must have the same number of rows")
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    if(NCOL(score) == 1 & NCOL(fac) == 1)
+      object <- multi.facets.S1(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple scores or fac")
+  }
+  
+  ## multiple scores
+  else if(NCOL(score) > 1) {
+    if(NCOL(fac) == 1)
+      object <- multi.score.S1(thecall)
+    else 
+      stop("Multiple scores are not allowed with multiple fac")
+  }
+  
+  ## multiple fac
+  else if(NCOL(fac) > 1) {
+    object <- multi.variables.S1(thecall, "fac")
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(poslabel = match.arg(poslabel), col = col))
+    if(storeData)
+      tmp_data <- list(score = score, wt = wt, fac = fac, labels = labels, at = at, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(score = thecall$score, wt = thecall$wt, fac = thecall$fac, labels = thecall$labels, at = thecall$at, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S1.class", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object) 
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  if(!add & plot)
+    print(object)
+  invisible(object)
+}
+
diff --git a/R/S1.distri.R b/R/S1.distri.R
new file mode 100644
index 0000000..c3768fc
--- /dev/null
+++ b/R/S1.distri.R
@@ -0,0 +1,197 @@
+###########################################################
+##                          s1d.distri                   ##
+###########################################################
+
+setClass(
+  Class = "S1.distri",
+  contains = "ADEg.S1"
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "S1.distri",
+  definition = function(.Object, data = list(score = NULL, dfdistri = NULL, labels = NULL, at = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.S1 initialize
+    .Object at data$dfdistri <- data$dfdistri
+    .Object at data$labels <- data$labels
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "S1.distri",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    if(object at data$storeData) {
+      dfdistri <- object at data$dfdistri
+      score <- object at data$score
+      labels <- object at data$labels      
+  	} else {
+      dfdistri <- eval(object at data$dfdistri, envir = sys.frame(object at data$frame))
+      score <- eval(object at data$score, envir = sys.frame(object at data$frame))
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+    }
+    
+    score <- as.matrix(score)[, 1]  ## to manage 'score' when it is a data.frame with only one column
+    
+    ## change default for some parameters
+    if(adegtot$p1d$horizontal & is.null(object at adeg.par$plabels$srt))
+      adegtot$plabels$srt <- 0
+    else if(!adegtot$p1d$horizontal & is.null(object at adeg.par$plabels$srt))
+      adegtot$plabels$srt <- 90
+    
+    ## statistics calculus
+    object at stats$means <- sapply(dfdistri, function(x) weighted.mean(score, x))
+    names(object at stats$means) <- labels
+    object at stats$sds <- sapply(dfdistri, function(x) sqrt(varwt(score, x)))
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "S1.distri",
+  definition = function(object, x, y) {
+    if(object at data$storeData) {
+      labels <- object at data$labels
+    	at <- object at data$at
+    } else {
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+    	at <- eval(object at data$at, envir = sys.frame(object at data$frame))
+    }
+
+    lims <- current.panel.limits(unit = "native")
+    pscore <- object at adeg.par$p1d
+    ngroups <- length(object at stats$means)
+    means <- object at stats$means
+    sds <- object at stats$sds * object at g.args$sdSize
+    plabels <- object at adeg.par$plabels
+    
+    lead <- ifelse(pscore$reverse, -1, 1)
+
+    if(pscore$horizontal) {
+      ## horizontal plot
+      ylab <- at
+      if(object at g.args$yrank) {
+        idx <- order(means, decreasing = TRUE)
+        means <- means[idx]
+        sds <- sds[idx]
+        labels <- labels[idx]
+      }
+      
+      do.call("panel.segments", c(list(x0 = means - sds, y0 = ylab, x1 = means + sds, y1 = ylab), object at adeg.par$plines))
+      do.call("panel.points", c(list(x = means, y = ylab), object at adeg.par$ppoints))
+      etis <- ifelse(abs(lims$xlim[2] - (means + sds)) > abs(lims$xlim[1] - (means - sds)), 1, -1)
+    } else {
+      ## vertical plot
+      xlab <- at
+      if(object at g.args$yrank) {
+        idx <- order(means, decreasing = TRUE)
+        means <- means[idx]
+        sds <- sds[idx]
+        labels <- labels[idx]
+      }
+
+      do.call("panel.segments", c(list(x0 = xlab, y0 = means - sds, x1 = xlab, y1 = means + sds), object at adeg.par$plines))
+      do.call("panel.points", c(list(x = xlab, y = means), object at adeg.par$ppoints))
+      etis <- ifelse(abs(lims$ylim[2] - (means + sds)) > abs(lims$ylim[1] - (means - sds)), 1, -1)
+    }
+    
+    ## manage string rotation
+    srt <- 0
+    if(is.numeric(plabels$srt[1]))
+      srt <- plabels$srt[1]
+    else {
+      if(plabels$srt[1] == "horizontal")
+        srt <- 0
+      else if(plabels$srt[1] == "vertical")
+        srt <- 90
+    }
+    
+    ## draw labels
+    if(abs(sin(srt)) > sin(45)) {
+      ## almost vertical labels
+      if(pscore$horizontal)
+        width <- stringWidth("h")
+      else
+        width <- stringWidth(labels) + stringWidth("h")
+      
+      width <- rep(plabels$cex, length.out = length(labels)) * convertUnit(width, "native", typeFrom = "dimension", axisFrom = "x", axisTo = "y", valueOnly = TRUE) / 2 
+    } else {
+      ## almost horizont labels
+      if(pscore$horizontal)
+        width <- stringWidth(labels) + stringWidth("h")
+      else
+        width <- stringWidth("h")
+      
+      width <- rep(plabels$cex, length.out = length(labels)) * convertUnit(width, "native", typeFrom = "dimension", axisFrom = "x", valueOnly = TRUE) / 2 
+    }
+
+    if(pscore$horizontal)
+      adeg.panel.label(x = means + etis * (sds + width), y = ylab, labels = labels, plabels = plabels)
+    else
+      adeg.panel.label(x = xlab, y = means + etis * (sds + width), labels = labels, plabels = plabels)
+  })
+
+
+s1d.distri <- function(score, dfdistri, labels = colnames(dfdistri), at = 1:NCOL(dfdistri), yrank = TRUE, sdSize = 1, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+
+  ## evaluation of some parameters (required for multiplot)
+  thecall <- .expand.call(match.call())
+  dfdistri <- eval(thecall$dfdistri, envir = sys.frame(sys.nframe() + pos))
+  score <- eval(thecall$score, envir = sys.frame(sys.nframe() + pos))
+  if(NROW(dfdistri) != NROW(score))
+    stop("dfdis and score must have the same number of rows")
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)){
+    if(NCOL(score) == 1)
+      object <- multi.facets.S1(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple scores")
+  }
+  
+  ## multiple scores
+  else if(NCOL(score) > 1) {
+    object <- multi.score.S1(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(yrank = yrank, sdSize = sdSize))
+    if(storeData)
+    	tmp_data <- list(score = score, dfdistri = dfdistri, at = at, labels = labels, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(score = thecall$score, dfdistri = thecall$dfdistri, at = thecall$at, labels = labels, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S1.distri", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object)
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  if(!add & plot)
+    print(object)
+  invisible(object)
+}
diff --git a/R/S1.label.R b/R/S1.label.R
new file mode 100644
index 0000000..d03426c
--- /dev/null
+++ b/R/S1.label.R
@@ -0,0 +1,165 @@
+###########################################################
+##                          s1d.label                    ##
+###########################################################
+
+setClass(
+  Class = "S1.label",
+  contains = "ADEg.S1"
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "S1.label",
+  definition = function(.Object, data = list(score = NULL, labels = NULL, at = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.C1 initialize
+    .Object at data$labels <- data$labels
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "S1.label",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    ## change default for some parameters
+    if(adegtot$p1d$horizontal & is.null(object at adeg.par$plabels$srt))
+      adegtot$plabels$srt <- 90
+    else if(!adegtot$p1d$horizontal & is.null(object at adeg.par$plabels$srt))
+      adegtot$plabels$srt <- 0
+    
+    if(adegtot$p1d$horizontal & is.null(object at g.args$ylim))
+      object at g.args$ylim <- c(0, 1)
+    
+    if(!adegtot$p1d$horizontal & is.null(object at g.args$xlim))
+      object at g.args$xlim <- c(0, 1)
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "S1.label",
+  definition = function(object, x, y) {
+    
+    if(object at data$storeData) {
+      labels <- object at data$labels
+      at <- object at data$at
+    } else {
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+      at <- eval(object at data$at, envir = sys.frame(object at data$frame))
+    }
+    
+    lims <- current.panel.limits(unit = "native")
+    pscore <- object at adeg.par$p1d
+    plabels <- object at adeg.par$plabels
+    plboxes <- plabels$boxes
+    nval <- length(y)
+    
+    if(!is.null(labels)) {
+      ## get text sizes for boxes
+      test <- .textsize(labels, plabels)
+      w <- test$w
+      h <- test$h
+    }        
+    
+    lead <- ifelse(pscore$reverse, -1, 1)
+    
+    if(pscore$horizontal) {
+      ## horizontal plot
+      xpoints <- y
+      
+      ## draw labels
+      if(object at g.args$poslabel == "regular") {
+        spacelab <- diff(lims$xlim) / (nval + 1)
+        xlab <- seq(from = lims$xlim[1] + spacelab, by = spacelab, length.out = nval)[rank(xpoints, ties.method = "first")]
+      } else
+        xlab <- xpoints
+      
+      if(!is.null(labels) & any(plabels$cex > 0))
+        adeg.panel.label(x = xlab , y = at + lead * h / 2, labels = labels, plabels = plabels)
+      
+      ## draw segments
+      ypoints <- object at s.misc$rug
+      do.call("panel.segments", c(list(x0 = xpoints, y0 = ypoints, x1 = xlab, y1 = at), object at adeg.par$plines))
+      
+    } else {
+      ## vertical plot
+      ypoints <- y
+      
+      ## draw labels
+      if(object at g.args$poslabel == "regular") {
+        spacelab <- diff(lims$ylim) / (nval + 1)
+        ylab <- seq(from = lims$ylim[1] + spacelab, by = spacelab, length.out = nval)[rank(ypoints, ties.method = "first")]
+      } else
+        ylab <- ypoints
+      if(!is.null(labels) & any(plabels$cex > 0))
+        adeg.panel.label(x = at + lead * w / 2 , y = ylab, labels = labels, plabels = plabels)
+      
+      ## draw segments
+      xpoints <- object at s.misc$rug
+      do.call("panel.segments", c(list(x0 = xpoints, y0 = ypoints, x1 = at, y1 = ylab), object at adeg.par$plines))
+    }
+    
+    if(any(object at adeg.par$ppoints$cex > 0))
+      do.call("panel.points", c(list(x = xpoints, y = ypoints), object at adeg.par$ppoints))
+  })
+
+
+s1d.label <- function(score, labels = 1:NROW(score), at = 0.5, poslabel = c("regular", "value"), facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  score <- eval(thecall$score, envir = sys.frame(sys.nframe() + pos))
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    if(NCOL(score) == 1)
+      object <- multi.facets.S1(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple scores")
+  }
+  
+  ## multiple scores
+  else if(NCOL(score) > 1) { 
+    object <- multi.score.S1(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(poslabel = match.arg(poslabel)))
+    if(storeData)
+      tmp_data <- list(score = score, labels = labels, at = at, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(score = thecall$score, labels = thecall$labels, at = thecall$at, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S1.label", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object) 
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  if(!add & plot)
+    print(object)
+  invisible(object)
+}
diff --git a/R/S1.match.R b/R/S1.match.R
new file mode 100644
index 0000000..9e89c6a
--- /dev/null
+++ b/R/S1.match.R
@@ -0,0 +1,190 @@
+###########################################################
+##                          s1d.match                    ##
+###########################################################
+
+setClass(
+  Class = "S1.match",
+  contains = "ADEg.S1"
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "S1.match",
+  definition = function(.Object, data = list(score = NULL, labels = NULL, at = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.S1 initialize
+    .Object at data$labels <- data$labels
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "S1.match",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    ## change default for some parameters
+    if(adegtot$p1d$horizontal & is.null(object at adeg.par$plabels$srt))
+      adegtot$plabels$srt <- 90
+    else if(!adegtot$p1d$horizontal & is.null(object at adeg.par$plabels$srt))
+      adegtot$plabels$srt <- 0
+    adegtot$p1d$rug$tck <- 0
+    
+    if(adegtot$p1d$horizontal & is.null(object at g.args$ylim))
+      object at g.args$ylim <- c(0, 1)
+    
+    if(!adegtot$p1d$horizontal & is.null(object at g.args$xlim))
+      object at g.args$xlim <- c(0, 1)
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f= "panel",
+  signature = "S1.match",
+  definition = function(object, x, y) {
+    
+    if(object at data$storeData) {
+      labels <- object at data$labels
+      at <- object at data$at
+    } else {
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+      at <- eval(object at data$at, envir = sys.frame(object at data$frame))
+    }
+    
+    lims <- current.panel.limits(unit = "native")
+    nval <- length(y) %/% 2
+    score2 <- y[(nval + 1):length(y)]
+    score1 <- y[1 : nval]
+    
+    pscore <- object at adeg.par$p1d
+    plabels <- object at adeg.par$plabels
+    plboxes <- plabels$boxes
+    porigin <- object at adeg.par$porigin
+    
+    if(!is.null(labels)) {
+      ## get text sizes for boxes
+      test <- .textsize(labels, plabels)
+      w <- test$w
+      h <- test$h
+    }
+    
+    lead <- ifelse(pscore$reverse, -1, 1)
+    
+    if(pscore$horizontal) {
+      ## horizontal plot
+      ## get positions for labels
+      spacelab <- diff(lims$xlim) / (nval + 1)
+      xlab <- seq(from = lims$xlim[1] + spacelab, by = spacelab, length.out = nval)[rank(score1, ties.method = "first")]
+      ylab <- rep(at, length.out = nval)
+      
+      ypoints <- rep(object at s.misc$rug, length.out = nval)
+      ypoints2 <- rep(ypoints + lead * 0.05 * abs(diff(object at g.args$ylim)), length.out = nval)
+      
+      ## horizontal line
+      if(pscore$rug$draw & pscore$rug$line) 
+        panel.abline(h = ypoints2, col = porigin$col, lwd = porigin$lwd, lty = porigin$lty, alpha = porigin$alpha)
+      ## segments linking both scores
+      do.call("panel.segments", c(list(x0 = score1, y0 = ypoints, x1 = score2, y1 = ypoints2), object at adeg.par$plines))
+      ## segments linking labels to second score
+      do.call("panel.segments", c(list(x0 = score2, y0 = ypoints2, x1 = xlab, y1 = ylab), object at adeg.par$plines))
+      
+      ## drawing labels
+      if(!is.null(labels) & any(plabels$cex > 0))
+        adeg.panel.label(x = xlab , y = ylab + lead * h / 2, labels = labels, plabels = plabels)
+      ## draw points
+      if(any(object at adeg.par$ppoints$cex > 0))
+        panel.points(x = c(score1, score2), y = c(ypoints, ypoints2), pch = object at adeg.par$ppoints$pch, cex = object at adeg.par$ppoints$cex, col = object at adeg.par$ppoints$col, alpha = object at adeg.par$ppoints$alpha, fill = object at adeg.par$ppoints$fill)
+      
+    } else {
+      ## vertical plot
+      ## get positions for labels
+      spacelab <- diff(lims$ylim) / (nval + 1)
+      ylab <- seq(from = lims$ylim[1] + spacelab, by = spacelab, length.out = nval)[rank(score1, ties.method = "first")]
+      xlab <- rep(at, length.out = nval)
+      
+      xpoints <- rep(object at s.misc$rug, length.out = nval)
+      xpoints2 <- rep(xpoints + lead * 0.05 * abs(diff(object at g.args$xlim)), length.out = nval)
+      
+      ## vertical line
+      if(pscore$rug$draw & pscore$rug$line) 
+        panel.abline(v = xpoints2,  col = porigin$col, lwd = porigin$lwd, lty = porigin$lty, alpha = porigin$alpha)
+      ## segments linking both scores
+      do.call("panel.segments", c(list(x0 = xpoints, y0 = score1, x1 =  xpoints2, y1 = score2), object at adeg.par$plines))
+      ## segments linking labels to second score
+      do.call("panel.segments", c(list(x0 = xpoints2, y0 = score2, x1 = xlab, y1 = ylab), object at adeg.par$plines))
+      
+      ## drawing labels
+      if(!is.null(labels) & any(plabels$cex > 0))
+        adeg.panel.label(x = xlab + lead * w / 2 , y = ylab, labels = labels, plabels = plabels)
+      ## draw points
+      if(any(object at adeg.par$ppoints$cex > 0))
+        panel.points(x = c(xpoints, xpoints2), y = c(score1, score2), pch = object at adeg.par$ppoints$pch, cex = object at adeg.par$ppoints$cex, col = object at adeg.par$ppoints$col, alpha = object at adeg.par$ppoints$alpha, fill = object at adeg.par$ppoints$fill)
+    }
+  })
+
+
+s1d.match <- function(score1, score2, labels = 1:NROW(score1), at = 0.5, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  score1 <- eval(thecall$score1, envir = sys.frame(sys.nframe() + pos))
+  score2 <- eval(thecall$score2, envir = sys.frame(sys.nframe() + pos))
+  if(NROW(score1) != NROW(score2))
+    stop("score1 and score2 should have the same length")
+  if(NCOL(score1) != NCOL(score2))
+    stop("score1 and score2 should have the same number of columns")
+  
+  if((is.data.frame(score1) & NCOL(score1) == 1) | (is.data.frame(score2) & NCOL(score2) == 1)) 
+    stop("Not yet implemented for data.frame with only one column, please convert into vector")
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    if(NCOL(score1) == 1)
+      object <- multi.facets.S1(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple scores")
+  }
+  
+  ## multiple scores
+  else if(NCOL(score1) > 1) { 
+    object <- multi.score.S1(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    if(storeData)
+      tmp_data <- list(score = c(score1, score2), labels = labels, at = at, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(score = call("c", thecall$score1, thecall$score2), labels = thecall$labels, at = thecall$at, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S1.match", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = sortparameters$g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object) 
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(!add & plot)
+    print(object)
+  invisible(object)
+}
diff --git a/R/S2.arrow.R b/R/S2.arrow.R
new file mode 100644
index 0000000..8cea70f
--- /dev/null
+++ b/R/S2.arrow.R
@@ -0,0 +1,131 @@
+##########################################################################
+##                            s.arrow                                   ##
+##########################################################################
+
+setClass(
+  Class = "S2.arrow",
+  contains = "ADEg.S2",
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "S2.arrow",
+  definition = function(.Object, data = list(dfxy = NULL, xax = 1, yax = 2, labels = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.S2 initialize
+    .Object at data$labels <- data$labels
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "S2.arrow",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    ## change default for some parameters
+    if(is.null(object at adeg.par$ppoints$cex))
+      adegtot$ppoints$cex <- 0
+    if(is.null(object at adeg.par$porigin$include) & (any(names(object at g.args) %in% c("Sp", "nbobject"))))
+      adegtot$porigin$include <- FALSE
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    if(is.null(object at s.misc$lim.update)) {
+      if(is.null(object at g.args$Sp)) {
+        xdiff <- diff(object at g.args$xlim)
+        ydiff <- diff(object at g.args$ylim)
+        object at g.args$xlim <- object at g.args$xlim + c(-1, 1) * 0.05 * xdiff
+        object at g.args$ylim <- object at g.args$ylim + c(-1, 1) * 0.05 * ydiff
+      }
+      object at s.misc$lim.update <- TRUE
+    }
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "S2.arrow",
+  definition = function(object, x, y) {
+    ## draw arrows
+    panel.arrows(x0 = object at adeg.par$porigin$origin[1], y0 = object at adeg.par$porigin$origin[2], y1 = y, x1 = x, angle = object at adeg.par$parrows$angle, 
+      					 length = object at adeg.par$parrows$length, ends = object at adeg.par$parrows$end, lwd = object at adeg.par$plines$lwd, 
+                 col = object at adeg.par$plines$col, lty = object at adeg.par$plines$lty)
+    ## draw labels
+    ## positions
+    plabels <- object at adeg.par$plabels
+    if(object at data$storeData)
+      arrownames <- object at data$labels
+    else
+      arrownames <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+    
+    if(!is.null(arrownames)) {
+      pos <- .textpos(x, y, origin = c(0, 0))
+      test <- .textsize(arrownames, plabels)
+      w <- test$w
+      h <- test$h
+      ## optim always false for s.arrow
+      plabels$optim <- FALSE
+      if(any(object at adeg.par$plabels$cex > 0))
+        adeg.panel.label(x + pos[1, ] * w / 2, y + pos[2, ] * h / 2 , arrownames, plabels)
+    }
+  })
+
+
+s.arrow <- function(dfxy, xax = 1, yax = 2, labels = row.names(as.data.frame(dfxy)), facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters (required for multiplot)
+  thecall <- .expand.call(match.call())
+  df <- try(as.data.frame(eval(thecall$dfxy, envir = sys.frame(sys.nframe() + pos))), silent = TRUE)
+  if((class(df) == "try-error") | is.null(thecall$dfxy)) ## non convenient dfxy argument
+    stop("non convenient selection for dfxy (can not be converted to dataframe)")
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+
+  ## facets
+  if(!is.null(facets)) { 
+    if((length(xax) == 1 & length(yax) == 1))
+      object <- multi.facets.S2(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple xax/yax")
+  }
+  
+  ## multiple axes
+  else if((length(xax) > 1 | length(yax) > 1)) {
+    object <- multi.ax.S2(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+  	  warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    if(storeData)
+    	tmp_data <- list(dfxy = dfxy, xax = xax, yax = yax, labels = labels, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(dfxy = thecall$dfxy, xax = xax, yax = yax, labels = thecall$labels, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S2.arrow", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = sortparameters$g.args, Call = as.call(thecall))
+    
+    ## preparation
+    prepare(object)
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+
+  if(!add & plot)
+    print(object)
+  invisible(object)  
+}
+
diff --git a/R/S2.class.R b/R/S2.class.R
new file mode 100644
index 0000000..63c11dd
--- /dev/null
+++ b/R/S2.class.R
@@ -0,0 +1,281 @@
+##########################################################################
+##                            s.class                                   ##
+##########################################################################
+
+setClass(
+  Class = "S2.class",
+  contains = "ADEg.S2",
+)
+
+  
+setMethod(
+  f = "initialize",
+  signature = "S2.class",
+  definition = function(.Object, data = list(dfxy = NULL, xax = 1, yax = 2, fac = NULL, wt = NULL, labels = NULL, frame = 0, storeData = TRUE),  ...) {
+    .Object <- callNextMethod(.Object, data = data, ...)
+    .Object at data$fac <- data$fac
+    .Object at data$wt <- data$wt
+    .Object at data$labels <- data$labels
+    return(.Object)
+  })
+
+
+setMethod(
+  ## prepare computations for ellipses, stars and labels
+  f = "prepare",
+  signature = "S2.class",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    if(object at data$storeData) {
+      fac <- as.factor(object at data$fac)
+      dfxy <- object at data$dfxy
+      wt <- object at data$wt
+    } else {
+      fac <- as.factor(eval(object at data$fac, envir = sys.frame(object at data$frame)))
+      dfxy <- eval(object at data$dfxy, envir = sys.frame(object at data$frame))
+      wt <- eval(object at data$wt, envir = sys.frame(object at data$frame))
+    }
+    
+    if(is.null(object at adeg.par$porigin$include) & (any(names(object at g.args) %in% c("Sp", "nbobject"))))
+      adegtot$porigin$include <- FALSE
+
+    if(any(adegtot$plabels$cex > 0) & is.null(object at adeg.par$plegend$drawKey)) ## if labels, no legend
+        adegtot$plegend$drawKey <- FALSE
+    ## setting colors 
+    if(!is.null(object at g.args$col)){
+        col.idx <- FALSE
+        if(is.logical(object at g.args$col)) {
+            if(object at g.args$col){
+                colT <- adegtot$ppalette$quali(nlevels(fac))
+                col.idx <- TRUE
+            }
+        } else {
+            colT <- rep(object at g.args$col, length.out = nlevels(fac))
+            col.idx <- TRUE
+        }
+        
+        if(col.idx){
+            if(is.null(object at adeg.par$ppoints$col))
+                adegtot$ppoints$col <- colT
+            if(is.null(object at adeg.par$ppoints$fill))
+                adegtot$ppoints$fill <- colT
+            if(is.null(object at adeg.par$pellipses$border))
+                adegtot$pellipses$border <- colT
+            if(is.null(object at adeg.par$pellipses$col))
+                adegtot$pellipses$col <- colT
+            if(is.null(object at adeg.par$plabels$col))
+                adegtot$plabels$col <- colT
+            if(is.null(object at adeg.par$plabels$boxes$border))
+                adegtot$plabels$boxes$border <- colT
+            if(is.null(object at adeg.par$ppolygons$border))
+                adegtot$ppolygons$border <- colT
+            if(is.null(object at adeg.par$ppolygons$col))
+                adegtot$ppolygons$col <- colT
+            if(is.null(object at adeg.par$plines$col))
+                adegtot$plines$col <- colT
+        }
+    }
+    
+    ## preliminary computations
+    object at stats$means <- matrix(meanfacwt(dfxy[, c(object at data$xax, object at data$yax)], fac, wt), nrow = nlevels(fac))
+    ## for ellipse, covariance and variance needed
+    if(object at g.args$ellipseSize)
+      object at stats$covvar <- covfacwt(dfxy[, c(object at data$xax, object at data$yax)], fac, wt)
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    ## compute ellipses
+    if(object at g.args$ellipseSize > 0) { 
+      object at s.misc$ellipses <- lapply(1:nlevels(fac), FUN = function(i) {
+        .util.ellipse(object at stats$means[i, 1], object at stats$means[i, 2], vx = object at stats$covvar[[i]][1, 1], vy = object at stats$covvar[[i]][2, 2],
+                      cxy = object at stats$covvar[[i]][1, 2], coeff = object at g.args$ellipseSize)
+      })                                                    
+    }
+    
+    ## compute convex hulls
+    if(!is.null(object at g.args$chullSize))
+      if(any(object at g.args$chullSize > 0))
+        object at s.misc$chullcoord <- .util.chull(dfxy[, object at data$xax], dfxy[, object at data$yax], object at stats$means[, 1], object at stats$means[, 2], fac = fac, chullSize = object at g.args$chullSize)
+    
+    ## never optimized labels for s.class
+    object at adeg.par$plabels$optim <- FALSE
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+## a changer: dessin level par level, 
+setMethod(
+  f = "panel",
+  signature = "S2.class",
+  definition = function(object, x, y) {
+    if(object at data$storeData) {
+      fac <- object at data$fac
+      labels <- object at data$labels    
+    } else {
+      fac <- eval(object at data$fac, envir = sys.frame(object at data$frame))
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+    }
+    nlev <- nlevels(fac)
+    
+    ## convex hulls
+    if(any(object at g.args$chullSize > 0)) {
+      chullpo <- object at s.misc$chullcoord
+      ppolygons <- lapply(object at adeg.par$ppolygons, FUN = function(x) {rep(x, length.out = length(chullpo))})
+      
+      for(level in 1:nlev) 
+        if(!any(is.null(chullpo[[level]]))) {
+          for(j in 1:length(chullpo[[level]]))
+            panel.polygon(
+              x = chullpo[[level]][[j]][, 1], y = chullpo[[level]][[j]][, 2],
+              border = ppolygons$border[level], col = ppolygons$col[level],
+              lty = ppolygons$lty[level], lwd = ppolygons$lwd[level], alpha = ppolygons$alpha[level])
+        }
+    }
+    ## ellipses
+    if(object at g.args$ellipseSize > 0) {
+      ellip <- object at s.misc$ellipses
+      pellip <- object at adeg.par$pellipses
+      pellip <- lapply(pellip, FUN = function(x) {if(is.list(x)) return(x) else rep(x, le = length(ellip))})
+      pellip$axes <- lapply(pellip$axes, FUN = function(x) {rep(x, length.out = length(ellip))})
+      
+      for(level in 1:nlev) { ## for each group
+        ell <- ellip[[level]]
+        if(!(any(is.null(ell))))
+          if(!any(is.na(ell))) {
+            panel.polygon(ell$x, ell$y, col = pellip$col[level], lwd = pellip$lwd[level], lty = pellip$lty[level], alpha = pellip$alpha[level], border = pellip$border[level])
+            if(pellip$axes$draw[level]) { ## axes drawing
+              panel.segments(ell$seg1[1], ell$seg1[2], ell$seg1[3], ell$seg1[4], lwd = pellip$axes$lwd[level], lty = pellip$axes$lty[level], col = pellip$axes$col[level])
+              panel.segments(ell$seg2[1], ell$seg2[2], ell$seg2[3], ell$seg2[4], lwd = pellip$axes$lwd[level], lty = pellip$axes$lty[level], col = pellip$axes$col[level])
+            }
+          }
+      }
+    }
+    
+    ## stars
+    if(object at g.args$starSize > 0) {
+      plines <- lapply(object at adeg.par$plines, FUN = function(x) {rep(x, length.out = nlev)})
+      for(level in 1:nlev) {
+        if(all(is.finite(object at stats$means[level, ]))) {
+          xbase <- object at stats$means[level, 1]
+          ybase <- object at stats$means[level, 2]
+          xlev <- x[fac == levels(fac)[level]]
+          ylev <- y[fac == levels(fac)[level]]
+          panel.segments(
+            x0 = xbase, 
+            y0 = ybase,
+            x1 = xbase + object at g.args$starSize * (xlev - xbase),
+            y1 = ybase + object at g.args$starSize * (ylev - ybase),
+            lty = plines$lty[level], lwd = plines$lwd[level], col = plines$col[level])
+        }
+      }
+    }
+    
+    ## plot points
+    if(any(object at adeg.par$ppoints$cex > 0)) {
+      ppoints <- object at adeg.par$ppoints
+      if(nlev > 1) {
+        ppoints <- lapply(object at adeg.par$ppoints, FUN = function(x, fac, nlev) {
+          if(length(x) > nlev)
+            return(x)
+          else {
+            xlev <- rep(x, length.out = nlev)
+            xpar <- xlev[fac]
+            return(xpar)
+          }
+        }, fac = fac, nlev = nlev)
+      }
+      
+      if(any(is.na(ppoints$pch))) {
+        indx <- 1:length(x)
+        indx <- indx[- which(is.na(ppoints$pch))]
+        panel.points(x = x[indx], y = y[indx], type = "p", pch = ppoints$pch[indx], cex = ppoints$cex[indx],
+                     col = ppoints$col[indx], alpha = ppoints$alpha[indx], fill = ppoints$fill[indx])
+      } else
+        panel.points(x = x, y = y, type = "p", pch = ppoints$pch, cex = ppoints$cex, col = ppoints$col,
+                     alpha = ppoints$alpha, fill = ppoints$fill)
+    }
+    
+    ## plot of labels
+    if(any(object at adeg.par$plabels$cex > 0)) {
+      labX <- object at stats$means[, 1]
+      labY <- object at stats$means[, 2]
+      adeg.panel.label(x = labX, y = labY, labels = labels, object at adeg.par$plabels)
+    }
+  })
+
+  
+s.class <- function(dfxy, fac, xax = 1, yax = 2, wt = rep(1, NROW(fac)), labels = levels(fac), ellipseSize = 1.5, starSize = 1, 
+  									chullSize = NULL, col = NULL, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters (required for multiplot)
+  thecall <- .expand.call(match.call())
+  labels <- eval(thecall$labels, envir = sys.frame(sys.nframe() + pos))
+  fac <- eval(thecall$fac, envir = sys.frame(sys.nframe() + pos))
+  df <- try(as.data.frame(eval(thecall$dfxy, envir = sys.frame(sys.nframe() + pos))), silent = TRUE)
+  if((class(df) == "try-error") | is.null(thecall$dfxy)) ## non convenient dfxy argument
+    stop("non convenient selection for dfxy (can not be converted to dataframe)")
+  if(missing(fac))
+    stop("no factor specified")
+  
+  if(NCOL(fac) == 1) {
+    fac <- as.factor(fac)
+    if(length(labels) != nlevels(fac))
+      stop("wrong number of labels")
+  }
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) { 
+    if((length(xax) == 1 & length(yax) == 1) & NCOL(fac) == 1)
+      object <- multi.facets.S2(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple xax/yax or multiple fac")
+  }
+  
+  ## multiple axes
+  else if((length(xax) > 1 | length(yax) > 1)) {
+    if(NCOL(fac) == 1)
+      object <- multi.ax.S2(thecall)
+    else 
+      stop("Multiple xax/yax are not allowed with multiple fac")
+  }
+  
+  ## multiple fac
+  else if(NCOL(fac) > 1) {
+    object <- multi.variables.S2(thecall, "fac")
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+  	  warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(ellipseSize = ellipseSize, starSize = starSize, chullSize = chullSize, col = col))
+    if(storeData)
+    	tmp_data <- list(dfxy = dfxy, fac = fac, xax = xax, yax = yax, wt = wt, labels = labels, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(dfxy = thecall$dfxy, fac = thecall$fac, xax = xax, yax = yax, wt = thecall$wt, labels = thecall$labels, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S2.class", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = as.call(thecall))
+
+    ## preparation of the graph
+    prepare(object)
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(! add & plot)
+    print(object)
+  invisible(object)
+}
diff --git a/R/S2.corcircle.R b/R/S2.corcircle.R
new file mode 100644
index 0000000..4226767
--- /dev/null
+++ b/R/S2.corcircle.R
@@ -0,0 +1,127 @@
+##########################################################################
+##                            s.corcircle                               ##
+##########################################################################
+
+setClass(
+  Class = "S2.corcircle",
+  contains = "ADEg.S2",
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "S2.corcircle",
+  definition = function(.Object, data = list(dfxy = NULL, xax = 1, yax = 2, labels = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.S2 initialize
+    .Object at data$labels <- data$labels
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "S2.corcircle",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    ## prepare grid
+    getgrid <- function(nbgrid = 10) {
+      cgrid <- signif(2 / nbgrid, 2)
+      h0 <- c(rev(seq(0, -1, by = -cgrid)), seq(0 + cgrid, 1, by = cgrid)) ## force that 0 is represented by the grid
+      cgrid <- diff(h0)[1]
+      coord <- rep(0, length(h0))
+      for(i in 1:length(h0))
+        coord[i] <- sqrt(1 - h0[i] * h0[i])
+      return(list(x0 = c(h0, -coord), x1 = c(h0, coord), y0 = c(-coord, h0), y1 = c(coord, h0), d = cgrid))
+    }
+    if(adegtot$pgrid$draw || adegtot$paxes$draw)
+      object at s.misc$backgrid <- getgrid(adegtot$pgrid$nint)      
+    if(is.null(object at adeg.par$ppoints$cex))
+      adegtot$ppoints$cex <- 0
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "S2.corcircle",
+  definition = function(object, x, y) {
+    panel.arrows(x0 = 0, y0 = 0, y1 = y, x1 = x, angle = object at adeg.par$parrows$angle,
+                 length = object at adeg.par$parrows$length, ends = object at adeg.par$parrows$end,
+                 lwd = object at adeg.par$plines$lwd, col = object at adeg.par$plines$col, lty = object at adeg.par$plines$lty)
+    ## labels and boxes           
+    plabels <- object at adeg.par$plabels
+    
+    pos <- .textpos(x, y, origin = c(0, 0))
+    
+    if(object at data$storeData)
+      labels <- object at data$labels
+    else
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+       
+    test <- .textsize(labels, plabels)
+    w <- test$w
+    h <- test$h
+    plabels$optim <- FALSE ## no optimisation
+    adeg.panel.label(x = x + pos[1, ] * w / 2, y = y + pos[2, ] * h / 2, labels = labels, plabels = plabels)
+  })
+
+
+s.corcircle <- function(dfxy, xax = 1, yax = 2, labels = row.names(as.data.frame(dfxy)), fullcircle = TRUE,
+                      	facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+                        
+  ## evaluation of some parameters (required for multiplot)
+  thecall <- .expand.call(match.call())
+  df <- try(as.data.frame(eval(thecall$dfxy, envir = sys.frame(sys.nframe() + pos))), silent = TRUE)
+  if((class(df) == "try-error") | is.null(thecall$dfxy)) ## non convenient dfxy argument
+    stop("non convenient selection for dfxy (can not be converted to dataframe)")
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) { 
+    if((length(xax) == 1 & length(yax) == 1))
+      object <- multi.facets.S2(thecall, sortparameters$adepar)
+    else
+      stop("Facets are not allowed with multiple xax/yax")
+  }
+  
+  ## multiple axes
+  else if((length(xax) > 1 | length(yax) > 1)) {
+    object <- multi.ax.S2(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(fullcircle = fullcircle))
+    if(storeData)
+      tmp_data <- list(dfxy = dfxy, xax = xax, yax = yax, labels = labels, frame = sys.nframe() + pos, storeData = storeData)
+    else
+    	tmp_data <- list(dfxy = thecall$dfxy, xax = xax, yax = yax, labels = thecall$labels, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S2.corcircle", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = as.call(thecall))
+    
+    ## preparation of the graph
+    prepare(object)
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(! add & plot)
+    print(object)
+  invisible(object)
+}
diff --git a/R/S2.density.R b/R/S2.density.R
new file mode 100644
index 0000000..f551149
--- /dev/null
+++ b/R/S2.density.R
@@ -0,0 +1,148 @@
+##########################################################################
+##                            s.density                                 ##
+##########################################################################
+
+setClass(
+  Class = "S2.density",
+  contains = "ADEg.S2"
+)
+
+
+## no initialize function (use ADEg.S2 by inheritance)
+setMethod(
+  f = "prepare",
+  signature = "S2.density",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    if(object at data$storeData)
+      dfxy <- object at data$dfxy
+    else 
+      dfxy <- eval(object at data$dfxy, envir = sys.frame(object at data$frame))
+    
+    if(is.null(object at adeg.par$plabels))
+      adegtot$plabels$cex <- 0
+    if(is.null(object at adeg.par$porigin$include) & (any(names(object at g.args) %in% c("Sp", "nbobject"))))
+      adegtot$porigin$include <- FALSE
+     
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    ## compute density using bkde2D (KernSmooth package)    
+    ## bandwidth and gridsize can be provided by user. range.x allows computation for all the panel (even with no points)
+    if(is.null(object at g.args$bandwidth))
+      object at g.args$bandwidth <- diff(apply(dfxy[, c(object at data$xax, object at data$yax)], 2, quantile, probs = c(0.05, 0.95), na.rm = TRUE)) / 25
+    if(min(object at g.args$bandwidth) <= 0)
+      stop("'bandwidth' must be strictly positive")
+    object at g.args$threshold <- min(max(0, object at g.args$threshold), 1)
+    
+    object at stats$densit <- bkde2D(dfxy[, c(object at data$xax[1], object at data$yax[1])], bandwidth = object at g.args$bandwidth, gridsize = rep(object at g.args$gridsize, length.out = 2))
+    ## TODO: as in s.image, remove points (only) where density is null
+    ## use expand.grid....           
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+    f = "panel",
+    signature = "S2.density",
+    definition = function(object, x, y) {
+        densit <- object at stats$densit
+        if(is.null(object at g.args$col))
+            col <- object at adeg.par$ppalette$quanti(255)
+        else
+            col <- object at g.args$col
+        
+        transformation <- function(x) x
+        densityy <- array(transformation(densit$fhat), dim = dim(densit$fhat))            
+        if(object at g.args$region)
+            panel.levelplot(x = rep(densit$x1, length(densit$x2)),
+                            y = rep(densit$x2, each = length(densit$x1)),
+                            z = densityy,
+                            at = c(-.Machine$double.eps, seq(from = max(densit$fhat) * object at g.args$threshold + .Machine$double.eps,
+                                to = 1.01 * max(densit$fhat), length = length(col) + 2)),
+                            col.regions = c("transparent", col),
+                            subscripts = TRUE)
+        if(object at g.args$contour)
+            panel.levelplot(x = rep(densit$x1, length(densit$x2)), 
+                            y = rep(densit$x2, each = length(densit$x1)), 
+                            z = densityy,
+                            labels = object at adeg.par$plabels, 
+                            label.style = if(object at adeg.par$plabels$srt == "horizontal") "flat" else "align",  ## also exist "mixed" not used here
+                            at = c(-.Machine$double.eps, seq(from = max(densit$fhat) * object at g.args$threshold + .Machine$double.eps, 
+                                to = 1.01 * max(densit$fhat), length = object at g.args$nclass + 1)), 
+                            col.regions = c("transparent", col), 
+                            subscripts = TRUE, 
+                            region = FALSE, 
+                            contour = TRUE)
+        
+        
+        ## show nrpoints outilers
+        if(object at g.args$nrpoints > 0) {
+            ## copy of panel.smoothScatter
+            ixm <- round((x - densit$x1[1]) / (densit$x1[length(densit$x1)] - densit$x1[1]) * (length(densit$x1) - 1))
+            iym <- round((y - densit$x2[1]) / (densit$x2[length(densit$x2)] - densit$x2[1]) * (length(densit$x2) - 1))
+            idens <- densityy[1 + iym * length(densit$x1) + ixm]
+            nrpoints <- min(nrow(x), ceiling(object at g.args$nrpoints))
+            sel <- order(idens, decreasing = FALSE)[1:nrpoints]
+            
+            panel.points(x[sel], y[sel], pch = object at adeg.par$ppoints$pch, cex = object at adeg.par$ppoints$cex, col = object at adeg.par$ppoints$col, fill = object at adeg.par$ppoints$fill)
+        }
+    })
+
+
+s.density <- function(dfxy, xax = 1, yax = 2, bandwidth = NULL, gridsize = c(450L, 450L), nrpoints = 300, threshold = 0.1, col = NULL, 
+  contour = FALSE, region = !contour, nclass = 8, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  df <- try(as.data.frame(eval(thecall$dfxy, envir = sys.frame(sys.nframe() + pos))), silent = TRUE)
+  if((class(df) == "try-error") | is.null(thecall$dfxy)) ## non convenient dfxy argument
+    stop("non convenient selection for dfxy (can not be converted to dataframe)")
+
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) { 
+    if((length(xax) == 1 & length(yax) == 1))
+      object <- multi.facets.S2(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple xax/yax")
+  }
+  
+  ## multiple axes
+  else if((length(xax) > 1 | length(yax) > 1)) {
+    object <- multi.ax.S2(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(bandwidth = bandwidth, gridsize = gridsize, threshold = threshold, col = col, nrpoints = nrpoints, contour = contour, region = region, nclass = nclass))
+    if(storeData)
+    	tmp_data <- list(dfxy = dfxy, xax = xax, yax = yax, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(dfxy = thecall$dfxy, xax = xax, yax = yax, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S2.density", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = as.call(thecall))
+    
+    ## preparation
+    prepare(object)
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(!add & plot)
+    print(object)
+  invisible(object)
+}
diff --git a/R/S2.distri.R b/R/S2.distri.R
new file mode 100644
index 0000000..47a07bf
--- /dev/null
+++ b/R/S2.distri.R
@@ -0,0 +1,202 @@
+##########################################################################
+##                           s.distri                                   ##
+##########################################################################
+
+setClass(
+  Class = "S2.distri",
+  contains = "ADEg.S2",
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "S2.distri",
+  definition = function(.Object, data = list(dfxy = NULL, dfdistri = NULL, xax = 1, yax = 2, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...)
+    .Object at data$dfdistri <- data$dfdistri
+    return(.Object)
+  })
+
+
+setMethod(
+  ## prepare computations for ellipses, stars and labels
+  f = "prepare",
+  signature = "S2.distri",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    if(!object at data$storeData) {
+      dfxy <- eval(object at data$dfxy, envir = sys.frame(object at data$frame))
+      dfdistri <- eval(object at data$dfdistri, envir = sys.frame(object at data$frame))
+  	} else {
+      dfxy <- object at data$dfxy
+      dfdistri <- object at data$dfdistri
+    }
+    
+    if(is.null(colnames(dfdistri))) 
+      adegtot$plabels$cex <- 0 ## no labels if no colnames in original data
+    if(is.null(object at adeg.par$porigin$include) & (any(names(object at g.args) %in% c("Sp", "nbobject"))))
+      adegtot$porigin$include <- FALSE
+    
+    ## setting colors
+    if(!is.null(object at g.args$col))
+      if(is.logical(object at g.args$col)) {
+        if(object at g.args$col)
+          adegtot$pellipses$border <- adegtot$pellipses$col <- adegtot$plabels$col <- adegtot$plabels$boxes$border <- adegtot$plines$col <- adegtot$ppalette$quali(NCOL(dfdistri))
+      } else
+        adegtot$pellipses$border <- adegtot$pellipses$col <- adegtot$plabels$col <- adegtot$plabels$boxes$border <- adegtot$plines$col <- rep(object at g.args$col, length.out = NCOL(dfdistri))
+    
+    ## statistics calculus
+    object at stats$means <- t(apply(as.data.frame(dfdistri), 2, FUN = function(x) {apply(dfxy[, c(object at data$xax, object at data$yax)], 2, weighted.mean , w = x)}))
+    if(object at g.args$ellipseSize)
+      object at stats$covvar <- lapply(as.data.frame(dfdistri), FUN = function(x) {covwt(dfxy[, c(object at data$xax, object at data$yax)], wt = x)})
+    else 
+      object at stats$covvar <- NULL
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    ## compute ellipses
+    if(object at g.args$ellipseSize > 0) { 
+      object at s.misc$ellipses <- lapply(1:nrow(object at stats$means), FUN = function(i) {
+        .util.ellipse(object at stats$means[i, 1], object at stats$means[i, 2], vx = object at stats$covvar[[i]][1, 1], vy = object at stats$covvar[[i]][2, 2],
+                      cxy = object at stats$covvar[[i]][1, 2], coeff = object at g.args$ellipseSize)
+      })                                                    
+    }
+    ## never optimized labels for s.distri
+    object at adeg.par$plabels$optim <- FALSE
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "S2.distri",
+  definition = function(object, x, y) {
+    
+    if(object at data$storeData)
+      dfdistri <- object at data$dfdistri
+    else
+      dfdistri <- eval(object at data$dfdistri, envir = sys.frame(object at data$frame))
+    
+    ## ellipses
+    if(object at g.args$ellipseSize > 0) {
+      ellip <- object at s.misc$ellipses
+      pellip <- object at adeg.par$pellipses
+      pellip <- lapply(pellip, FUN = function(x) {if(is.list(x)) return(x) else rep(x, length.out = length(ellip))})
+      pellip$axes <- lapply(pellip$axes, FUN = function(x) {rep(x, length.out = length(ellip))})
+      
+      for(group in 1:NCOL(dfdistri)) { ## for each group
+        ell <- ellip[[group]]
+        if(!(any(is.null(ell))))
+          if(!any(is.na(ell))) {
+            panel.polygon(ell$x, ell$y, col = pellip$col[group], lwd = pellip$lwd[group],
+                          lty = pellip$lty[group], alpha = pellip$alpha[group], border = pellip$border[group])
+            if(pellip$axes$draw[group]) {
+              ## axes drawing
+              panel.segments(ell$seg1[1], ell$seg1[2], ell$seg1[3], ell$seg1[4], lwd = pellip$axes$lwd[group],
+                             lty = pellip$axes$lty[group], col = pellip$axes$col[group])
+              panel.segments(ell$seg2[1], ell$seg2[2], ell$seg2[3], ell$seg2[4], lwd = pellip$axes$lwd[group],
+                             lty = pellip$axes$lty[group], col = pellip$axes$col[group])
+            }
+          }
+      }
+    }
+    
+    ## stars
+    if(object at g.args$starSize > 0) {
+      plines <- lapply(object at adeg.par$plines, FUN = function(x) {rep(x, length.out = NCOL(dfdistri))})
+      for(group in 1:NCOL(dfdistri)) {
+        if(all(is.finite(object at stats$means[group, ]))) {
+          xbase <- object at stats$means[group, 1]
+          ybase <- object at stats$means[group, 2]
+          xlev <- x[which(as.data.frame(dfdistri)[, group] > 0)]
+          ylev <- y[which(as.data.frame(dfdistri)[, group] > 0)]
+          panel.segments(
+            x0 = xbase,
+            y0 = ybase,
+            x1 = xbase + object at g.args$starSize * (xlev - xbase),
+            y1 = ybase + object at g.args$starSize * (ylev - ybase),
+            lty = plines$lty[group], lwd = plines$lwd[group], col = plines$col[group])
+        } 
+      }
+    }
+    
+    ## plot points
+    if(any(object at adeg.par$ppoints$cex > 0)) {
+      ppoints <- lapply(object at adeg.par$ppoints, function(x) rep(x, length.out = NROW(dfdistri)))
+      
+      if(any(is.na(ppoints$pch))) {
+        indx <- 1:length(x)
+        indx <- indx[- which(is.na(ppoints$pch))]
+        panel.points(x = x[indx], y = y[indx], type = "p", pch = ppoints$pch[indx], cex = ppoints$cex[indx],
+                     col = ppoints$col[indx], alpha = ppoints$alpha[indx], fill = ppoints$fill[indx])}
+      else
+        panel.points(x = x, y = y, type = "p", pch = ppoints$pch, cex = ppoints$cex, col = ppoints$col,
+                     alpha = ppoints$alpha, fill = ppoints$fill)
+    }
+    ## plot of labels
+    if(any(object at adeg.par$plabels$cex > 0)) {
+      labX <- object at stats$means[, 1]
+      labY <- object at stats$means[, 2]
+      adeg.panel.label(x = labX, y = labY, labels = colnames(dfdistri), object at adeg.par$plabels)
+    }
+  })
+  
+
+s.distri <- function(dfxy, dfdistri, xax = 1, yax = 2, starSize = 1, ellipseSize = 1.5, col = NULL, facets = NULL, plot = TRUE, 
+  storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters (required for multiplot)
+  thecall <- .expand.call(match.call())
+  df <- try(as.data.frame(eval(thecall$dfxy, envir = sys.frame(sys.nframe() + pos))), silent = TRUE)
+  if((class(df) == "try-error") | is.null(dfxy))
+    stop("dfxy, can not be converted as dataframe or is NULL")
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) { 
+    if((length(xax) == 1 & length(yax) == 1))
+      object <- multi.facets.S2(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple xax/yax")
+  }
+  
+  ## multiple axes
+  else if((length(xax) > 1 | length(yax) > 1)) {
+    object <- multi.ax.S2(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(ellipseSize = ellipseSize, starSize = starSize, col = col))
+    if(storeData)
+      tmp_data <- list(dfxy = dfxy, dfdistri = dfdistri, xax = xax, yax = yax, frame = sys.nframe() + pos, storeData = storeData)
+    else
+    	tmp_data <- list(dfxy = thecall$dfxy, dfdistri = thecall$dfdistri, xax = xax, yax = yax, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S2.distri", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = as.call(thecall))
+
+    ## preparation of the graph
+    prepare(object)
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(! add & plot)
+    print(object)
+  invisible(object)
+}
+
diff --git a/R/S2.image.R b/R/S2.image.R
new file mode 100644
index 0000000..982f714
--- /dev/null
+++ b/R/S2.image.R
@@ -0,0 +1,180 @@
+##########################################################################
+##                           s.image                                    ##
+##########################################################################
+
+## TODO: prendre en comptre les differents z
+setClass(
+  Class = "S2.image",
+  contains = "ADEg.S2",
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "S2.image",
+  definition = function(.Object, data = list(dfxy = NULL, z = NULL, xax = 1, yax = 2, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.S2 initialize
+    .Object at data$z <- data$z
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "S2.image",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+   
+    object at g.args$gridsize <- rep(object at g.args$gridsize, length.out = 2)
+    if(is.null(object at adeg.par$porigin$include) & (any(names(object at g.args) %in% c("Sp", "nbobject", "outsideLimits"))))
+      adegtot$porigin$include <- FALSE
+
+    if(object at data$storeData) {
+      dfxy <- object at data$dfxy
+      z <- object at data$z
+    } else {
+      dfxy <- eval(object at data$dfxy, envir = sys.frame(object at data$frame))
+      z <- eval(object at data$z, envir = sys.frame(object at data$frame))
+    }
+    
+    if(is.null(object at g.args$breaks))
+        object at s.misc$breaks.update <- pretty(z, object at g.args$nclass)
+    else
+        object at s.misc$breaks.update <- object at g.args$breaks
+    
+    object at s.misc$breaks.update <- breakstest(object at s.misc$breaks.update, z, n = length(object at s.misc$breaks.update))
+    n <- length(object at s.misc$breaks.update)
+    
+    if(!is.null(object at g.args$col)) {
+        if(length(object at g.args$col) < (n - 1))
+            stop(paste("not enough colors defined, at least ", (n - 1), " colors expected", sep = ""), call. = FALSE)
+        adegtot$ppoints$col <- object at g.args$col[1:(n - 1)]  ## color given by the user
+    } else {
+        if(is.null(object at adeg.par$ppoints$col))
+            adegtot$ppoints$col <- adegtot$ppalette$quanti(n - 1)
+    }
+
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph (provide limits that are used below)
+    
+    ## create a sp grid
+    minX <- object at g.args$xlim[1]
+    minY <- object at g.args$ylim[1]
+    cgridX <- diff(object at g.args$xlim) / object at g.args$gridsize[1]
+    cgridY <- diff(object at g.args$ylim) / object at g.args$gridsize[2]
+    gridSp <- SpatialGrid(GridTopology(c(minX, minY), c(cgridX, cgridY), c(object at g.args$gridsize[1], object at g.args$gridsize[2])))
+
+    x <- dfxy[, object at data$xax]
+    y <- dfxy[, object at data$yax]
+    if(!is.null(object at g.args$outsideLimits)) {
+      ## outside limits are provided by an sp object
+      whichis <- over(gridSp, object at g.args$outsideLimits)
+    } else {
+      ## define the outside limits by convex hull
+      beplot <- cbind(x, y)[chull(cbind(x, y)), ] 
+      extCoord <- SpatialPolygons(list(Polygons(list(Polygon(rbind(cbind(beplot[, 1], beplot[, 2]), beplot[1, ]))), ID = "extcoord")))
+      whichis <- over(gridSp, extCoord)
+    }
+    
+    ## NA not handled by panel.levelplot call afterward ==> we remove the points
+    newgrid <- coordinates(gridSp)
+    names(newgrid) <- c("x", "y")
+    lo <- loess(z ~ x + y, span = object at g.args$span) ## Local Polynomial Regression Fitting
+    predictval <- predict(lo, newdata = newgrid)            
+    predictval[which(is.na(whichis))] <- NA
+    tokeep <- !is.na(predictval)
+    predictval <- predictval[tokeep]
+    newgrid <- newgrid[tokeep, ]
+    object at stats$value <- predictval
+    object at s.misc$newgrid <- newgrid
+      
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "S2.image",
+  definition = function(object, x, y) {
+    zvalue <- object at stats$value
+    col <- object at adeg.par$ppoints$col
+    xx <- object at s.misc$newgrid[, 1]
+    yy <- object at s.misc$newgrid[, 2]
+    panel.levelplot(x = xx, y = yy, z = zvalue, subscripts = TRUE, col.regions = col, contour = object at g.args$contour, region = object at g.args$region, labels = object at adeg.par$plabels,
+                    label.style = if(object at adeg.par$plabels$srt == "horizontal") "flat" else "align")
+  })
+
+
+s.image <- function(dfxy, z, xax = 1, yax = 2, span = 0.5, gridsize = c(80L, 80L), contour = TRUE, region = TRUE, outsideLimits = NULL, breaks = NULL, nclass = 8, 
+  									col = NULL, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+ 
+  if(!is.null(outsideLimits)) {
+    if(!inherits(outsideLimits, "SpatialPolygons"))
+      stop("limits must be a SpatialPolygons")
+  }
+  
+  ## evaluation of some parameters (required for multiplot)
+  thecall <- .expand.call(match.call())
+  df <- try(as.data.frame(eval(thecall$dfxy, envir = sys.frame(sys.nframe() + pos))), silent = TRUE)
+  z <- eval(thecall$z, envir = sys.frame(sys.nframe() + pos))
+  if((class(df) == "try-error") | is.null(thecall$dfxy)) ## non convenient dfxy argument
+    stop("non convenient selection for dfxy (can not be converted to dataframe)")
+  if(NROW(df) != NROW(z))
+    stop("dfxy and z should have the same number of rows")
+
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    if((length(xax) == 1 & length(yax) == 1) & NCOL(z) == 1)
+      object <- multi.facets.S2(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple xax/yax or multiple z")
+  }
+  
+  ## multiple axes
+  else if((length(xax) > 1 | length(yax) > 1)) {
+    if(NCOL(z) == 1)
+      object <- multi.ax.S2(thecall)
+    else 
+      stop("Multiple xax/yax are not allowed with multiple z")
+  }
+  
+  ## multiple z
+  else if(NCOL(z) > 1) {
+    object <- multi.variables.S2(thecall, "z")
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(breaks = breaks, nclass = nclass, span = span, gridsize = gridsize, outsideLimits = outsideLimits,
+                                            contour = contour, region = region, col = col))
+    if(storeData)
+    	tmp_data <- list(dfxy = dfxy, xax = xax, yax = yax, z = z, frame = sys.nframe() + pos, storeData = storeData)
+    else
+    	tmp_data <- list(dfxy = thecall$dfxy, xax = xax, yax = yax, z = thecall$z, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S2.image", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = as.call(thecall))
+   
+    ## preparation of the graph
+    prepare(object)
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(! add & plot)
+    print(object)
+  invisible(object)
+}
+
diff --git a/R/S2.label.R b/R/S2.label.R
new file mode 100644
index 0000000..65a87b7
--- /dev/null
+++ b/R/S2.label.R
@@ -0,0 +1,114 @@
+#########################################################
+###                       s.label                      ##
+#########################################################
+
+setClass(
+  Class = "S2.label",
+  contains = "ADEg.S2"
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "S2.label",
+  definition = function(.Object, data = list(dfxy = NULL, labels = NULL, xax = 1, yax = 2, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.S2 initialize
+    .Object at data$labels <- data$labels
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "S2.label",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    if(object at data$storeData) {
+      labels <- object at data$labels
+    } else {
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+    }
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    ## change default for some parameters
+    if((is.null(object at adeg.par$plabels$boxes$draw) & adegtot$plabels$optim) || (is.null(object at adeg.par$plabels$boxes$draw) & length(labels) > 1000)) ## dessin des boxes labels non renseigne par l'utilisateur lors de lappel a factorise
+      adegtot$plabels$boxes$draw <- FALSE
+    if(is.null(object at adeg.par$porigin$include) & (any(names(object at g.args) %in% c("Sp", "nbobject"))))
+      adegtot$porigin$include <- FALSE
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "S2.label",
+  definition = function(object, x, y) {
+    ## draw labels
+    if(any(object at adeg.par$ppoints$cex > 0))
+      panel.points(x, y, pch = object at adeg.par$ppoints$pch, cex = object at adeg.par$ppoints$cex, col = object at adeg.par$ppoints$col, alpha = object at adeg.par$ppoints$alpha, fill = object at adeg.par$ppoints$fill)
+    
+    if(object at data$storeData)
+      labels <- object at data$labels
+    else
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+    
+    if(any(object at adeg.par$plabels$cex > 0) & (!is.null(labels)))
+      adeg.panel.label(x, y, labels, object at adeg.par$plabels)
+  })
+
+
+s.label <- function(dfxy, labels = rownames(dfxy), xax = 1, yax = 2, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  df <- try(as.data.frame(eval(thecall$dfxy, envir = sys.frame(sys.nframe() + pos))), silent = TRUE)
+  if((class(df) == "try-error") | is.null(thecall$dfxy)) ## non convenient dfxy argument
+    stop("non convenient selection for dfxy (can not be converted to dataframe)")
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+ 
+  ## facets
+  if(!is.null(facets)) { 
+    if((length(xax) == 1 & length(yax) == 1))
+      object <- multi.facets.S2(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple xax/yax")
+  }
+  ## multiple axes
+  else if((length(xax) > 1 | length(yax) > 1)) {
+    object <- multi.ax.S2(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    if(storeData)
+    	tmp_data <- list(dfxy = dfxy, xax = xax, yax = yax, labels = labels, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(dfxy = thecall$dfxy, xax = xax, yax = yax, labels = thecall$labels, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S2.label", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = sortparameters$g.args, Call = as.call(thecall))
+    
+    ## preparation
+    prepare(object)
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(!add & plot)
+    print(object)
+  invisible(object)
+}
diff --git a/R/S2.logo.R b/R/S2.logo.R
new file mode 100644
index 0000000..7ca0373
--- /dev/null
+++ b/R/S2.logo.R
@@ -0,0 +1,108 @@
+#########################################################
+##                         s.logo                      ##
+#########################################################
+
+
+setClass(
+  Class = "S2.logo",
+  contains = "ADEg.S2",
+)
+
+setMethod(
+  f = "initialize",
+  signature = "S2.logo",
+  definition = function(.Object, data = list(dfxy = NULL, logos = NULL, xax = 1, yax = 2, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.S2 initialize
+    .Object at data$logos <- data$logos
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "S2.logo",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    if(is.null(object at adeg.par$porigin$include) & (any(names(object at g.args) %in% c("Sp", "nbobject"))))
+      adegtot$porigin$include <- FALSE
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "S2.logo",
+  definition = function(object, x, y) {
+    ## list of bitmap objects:logos
+    if(object at data$storeData)
+      logos <- object at data$logos
+    else
+      logos <- eval(object at data$logos, envir = sys.frame(object at data$frame))
+    
+    for(i in 1:length(logos)) {
+      grid.draw(rasterGrob(logos[[i]], x = x[i], y = y[i], height = unit(0.1, "npc") * object at adeg.par$ppoints$cex, default.units = "native"))
+    }
+  })
+
+
+s.logo <- function(dfxy, logos, xax = 1, yax = 2, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  df <- try(as.data.frame(eval(thecall$dfxy, envir = sys.frame(sys.nframe() + pos))), silent = TRUE)
+  if((class(df) == "try-error") | is.null(thecall$dfxy)) ## non convenient dfxy argument
+    stop("non convenient selection for dfxy (can not be converted to dataframe)")
+  logos <- eval(thecall$logos, envir = sys.frame(sys.nframe() + pos))
+  if(!is.list(logos))
+    stop("The argument 'logos' should be a list")
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) { 
+    if((length(xax) == 1 & length(yax) == 1))
+      object <- multi.facets.S2(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple xax/yax")
+  }
+  
+  ## multiple axes
+  else if((length(xax) > 1 | length(yax) > 1)) {
+    object <- multi.ax.S2(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    if(storeData)
+    	tmp_data <- list(dfxy = dfxy, xax = xax, yax = yax, logos = logos, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(dfxy = thecall$dfxy, xax = xax, yax = yax, logos = thecall$logos, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S2.logo", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = sortparameters$g.args, Call =  as.call(thecall))
+    
+    ## preparation
+    prepare(object)
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(!add & plot)
+    print(object)
+  invisible(object)
+}
+
diff --git a/R/S2.match.R b/R/S2.match.R
new file mode 100644
index 0000000..80dc84d
--- /dev/null
+++ b/R/S2.match.R
@@ -0,0 +1,138 @@
+#########################################################
+###                       s.match                      ##
+#########################################################
+
+## in S2.match, the two data set are combined (using rbind) and kept as the same one...
+## We know that the two data sets have the same row number, so we can easily retrieve and distinguish the two set (the first (nrow/2) rows are from dfxy1 the rest from dfxy2
+setClass(
+  Class = "S2.match",
+  contains = "ADEg.S2",
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "S2.match",
+  definition = function(.Object, data = list(dfxy = NULL, xax = 1, yax = 2, labels = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.S2 initialize
+    .Object at data$labels <- data$labels
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "S2.match",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    ## change default for some parameters
+    if(!object at g.args$arrows)
+      adegtot$parrows$angle <- 0
+    else
+    	if(is.null(object at adeg.par$parrows$angle) || (object at adeg.par$parrows$angle == 0))
+	      adegtot$parrows$angle <- oldparamadeg$parrows$angle
+      
+    if(is.null(object at adeg.par$porigin$include) & (any(names(object at g.args) %in% c("Sp", "nbobject"))))
+      adegtot$porigin$include <- FALSE
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "S2.match",
+  definition = function(object, x, y) {
+    n <- length(x) / 2
+    if(length(x) %% 2) ## x non multiple de 2
+      stop("error in spanel, not finding two datasets with equal row numbers please see with dev")
+    ## arrows from dfxy to dfxy2
+    panel.arrows(x0 = x[1:n], y0 = y[1:n] , y1 = y[n + 1:(2 * n)], x1 = x[n + 1:(2 * n)], angle = object at adeg.par$parrows$angle,
+                 length = object at adeg.par$parrows$length, ends = object at adeg.par$parrows$end,
+                 lwd = object at adeg.par$plines$lwd, col = object at adeg.par$plines$col, lty = object at adeg.par$plines$lty)
+
+    do.call("panel.points", c(list(x = x[1:n], y = y[1:n]), object at adeg.par$ppoints))
+    ## dessins labels
+    if(any(object at adeg.par$plabels$cex > 0)) {
+      xlab <- ((x[1:n] + x[(n + 1):(2 * n)]) / 2)
+      ylab <- ((y[1:n] + y[(n + 1):(2 * n)]) / 2)
+      if(object at data$storeData)
+        labels <- object at data$labels
+      else
+        labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+      object at adeg.par$plabels$optim <- FALSE
+      adeg.panel.label(xlab, ylab ,labels, object at adeg.par$plabels)
+    }
+  })
+
+
+## if arrows= TRUE arrows are plotted, otherwise only the segments are drawn
+s.match <- function(dfxy1, dfxy2, xax = 1, yax = 2, labels = row.names(as.data.frame(dfxy1)), arrows = TRUE, facets = NULL, plot = TRUE,
+  storeData = TRUE, add = FALSE, pos = -1, ...) {
+
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  data1 <- try(as.data.frame(eval(thecall$dfxy1, envir = sys.frame(sys.nframe() + pos))), silent = TRUE)
+  data2 <- try(as.data.frame(eval(thecall$dfxy2, envir = sys.frame(sys.nframe() + pos))), silent = TRUE)
+  
+  if(class(data1) == "try-error" || class(data2) == "try-error" || is.null(thecall$dfxy1) || is.null(thecall$dfxy2))  ## wrong conversion 
+    stop("non convenient selection for dfxy1 or dfxy2 (can not be converted to dataframe)")
+  if(any(is.na(pmatch(colnames(data1), colnames(data2)))))
+    stop("column names should be identical")
+  if(any(is.na(data1)))
+    stop("NA in first dataframe") ## TODO
+  if(any(is.na(data2)))
+    stop("NA in second dataframe") ## TODO
+  if(nrow(data1) != nrow(data2)) 
+    stop("non equal row numbers")
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+
+  ## facets
+  if(!is.null(facets)) { 
+    if((length(xax) == 1 & length(yax) == 1))
+      object <- multi.facets.S2(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple xax/yax")
+  }
+  
+  ## multiple axes
+  else if((length(xax) > 1 | length(yax) > 1)) {
+    object <- multi.ax.S2(thecall)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(arrows = arrows))
+    if(storeData)
+    	tmp_data <- list(dfxy = rbind(dfxy1, dfxy2), xax = xax, yax = yax, labels = labels, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(dfxy = call("rbind", thecall$dfxy1, thecall$dfxy2), xax = xax, yax = yax, labels = thecall$labels, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S2.match", data = tmp_data , adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = as.call(thecall))
+    
+    ## preparation
+    prepare(object)
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(!add & plot)
+    print(object)
+  invisible(object)
+}
+
diff --git a/R/S2.traject.R b/R/S2.traject.R
new file mode 100644
index 0000000..4cf5df0
--- /dev/null
+++ b/R/S2.traject.R
@@ -0,0 +1,191 @@
+#########################################################
+###                     s.traject                      ##
+#########################################################
+
+setClass(
+  Class= "S2.traject",
+  contains = "ADEg.S2",
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "S2.traject",
+  definition = function(.Object, data = list(dfxy = NULL, fac = NULL, labels = NULL, xax = 1, yax = 2, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.S2 initialize
+    .Object at data$labels <- data$labels
+    .Object at data$fac <- data$fac
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "S2.traject",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    if(object at data$storeData)
+      fac <- as.factor(object at data$fac)
+    else
+      fac <- as.factor(eval(object at data$fac, envir = sys.frame(object at data$frame)))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    ## matching col, pch ad size for points
+    if(!is.null(object at g.args$col))
+      if(is.logical(object at g.args$col)) {
+        if(object at g.args$col)
+          adegtot$ppoints$col <- adegtot$ppoints$fill <- adegtot$plabels$col <- adegtot$plabels$boxes$border <- adegtot$plines$col <- adegtot$ppalette$quali(nlevels(fac))
+      } else
+        adegtot$ppoints$col <- adegtot$ppoints$fill <- adegtot$plabels$col <- adegtot$plabels$boxes$border <- adegtot$plines$col <- rep(object at g.args$col, length.out = nlevels(fac))
+    
+    if(is.null(object at adeg.par$porigin$include) & (any(names(object at g.args) %in% c("Sp", "nbobject"))))
+      adegtot$porigin$include <- FALSE
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "S2.traject",
+  definition = function(object, x, y) {
+    if(object at data$storeData) {
+      fact <- object at data$fac
+      labels <- object at data$labels
+    } else {
+      fact <- eval(object at data$fac, envir = sys.frame(object at data$frame))
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+    }
+    
+    todrawX <- split(x, fact)
+    todrawY <- split(y, fact)
+    sizelevels <- sapply(todrawX, length)
+    if(!is.null(object at g.args$order))
+      orderdraw <- split(order, fact)
+    else
+      orderdraw <- lapply(sizelevels, FUN = function(x) if(x > 0)  1:x else NULL)
+    ## ordrerdraw is a list used to recycle graphical parameters
+
+    setparam <- function(params, nblevel, sizelevels) {
+      ## for param begin and end or repetition                               
+      if(length(params) == nblevel)
+        return(mapply(params, FUN = function(x, y) rep(x, length.out = y), sizelevels, SIMPLIFY = FALSE))
+      else
+        return(mapply(sizelevels, FUN = function(x, y) rep(params, length.out = x), SIMPLIFY = FALSE))    
+    }
+   
+    parrows <- lapply(object at adeg.par$parrows, setparam, nblevel = length(todrawX), sizelevels = sizelevels)
+    plines <- lapply(object at adeg.par$plines, setparam, nblevel = length(todrawX), sizelevels = sizelevels)
+    ppoints <- lapply(object at adeg.par$ppoints, setparam, nblevel = length(todrawX), sizelevels = sizelevels)
+    
+    for(i in 1:length(todrawX)) {
+      if(length(todrawX[[i]]) > 0)
+        panel.points(x = todrawX[[i]], y = todrawY[[i]], col = ppoints$col[[i]], cex = ppoints$cex[[i]], pch = ppoints$pch[[i]], fill = ppoints$fill[[i]])
+    }
+    
+    for(i in 1:length(todrawX)) {
+      if(length(todrawX[[i]]) > 1) {
+        suborder <- orderdraw[[i]]
+        for(j in 1:(length(todrawX[[i]]) - 1)) {
+          panel.arrows(x0 = todrawX[[i]][suborder[j]], y0 = todrawY[[i]][suborder[j]],
+                       x1 = todrawX[[i]][suborder[j + 1]], y1 = todrawY[[i]][suborder[j + 1]],
+                       angle = parrows$angle[[i]][suborder[j + 1]], length = parrows$length[[i]][suborder[j + 1]],
+                       ends = parrows$end[[i]][suborder[j + 1]], lwd = plines$lwd[[i]][suborder[j + 1]],
+                       col = plines$col[[i]][suborder[j + 1]], lty = plines$lty[[i]][suborder[j + 1]])
+        }
+      }
+    }
+    
+    if(any(object at adeg.par$plabels$cex > 0)) {
+      ## draws labels in the middle part of the trajectory
+      middl <- sapply(orderdraw, FUN = function(x) floor(length(x) / 2))
+      x <- y <- rep(NA, length(middl))
+      for(i in 1:length(middl)) {
+        if(length(todrawX[[i]]) > 1) {
+          x[i] <- (todrawX[[i]][suborder[middl[i]]] + todrawX[[i]][suborder[middl[i]+1]]) / 2
+          y[i] <- (todrawY[[i]][suborder[middl[i]]] + todrawY[[i]][suborder[middl[i]+1]]) / 2
+        }
+      }
+      
+      ## always false here no optimization for straject object
+      object at adeg.par$plabels$optim <- FALSE
+      adeg.panel.label(x, y, labels = labels, plabels = object at adeg.par$plabels)
+    }
+  })
+
+
+s.traject <- function(dfxy, fac = gl(1, nrow(dfxy)), order, labels = levels(fac), xax = 1, yax = 2, col = NULL, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  
+  ## evaluation of some parameters (required for multiplot)
+  thecall <- .expand.call(match.call())
+  labels <- eval(thecall$labels, envir = sys.frame(sys.nframe() + pos))
+  fac <- eval(thecall$fac, envir = sys.frame(sys.nframe() + pos))
+  df <- try(as.data.frame(eval(thecall$dfxy, envir = sys.frame(sys.nframe() + pos))), silent = TRUE)
+  if((class(df) == "try-error") | is.null(thecall$dfxy)) ## non convenient dfxy argument
+    stop("non convenient selection for dfxy (can not be converted to dataframe)")
+  
+  if(missing(fac))
+    stop("no factor specified")
+  
+  if(NCOL(fac) == 1) {
+    fac <- as.factor(fac)
+    if(length(labels) != nlevels(fac))
+      stop("wrong number of labels")
+  }
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) { 
+    if((length(xax) == 1 & length(yax) == 1) & NCOL(fac) == 1)
+      object <- multi.facets.S2(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed with multiple xax/yax or multiple fac")
+  }
+  
+  ## multiple axes
+  else if((length(xax) > 1 | length(yax) > 1)) {
+    if(NCOL(fac) == 1)
+      object <- multi.ax.S2(thecall)
+    else 
+      stop("Multiple xax/yax are not allowed with multiple fac")
+  }
+  
+  ## multiple fac
+  else if(NCOL(fac) > 1) {
+    object <- multi.variables.S2(thecall, "fac")
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(order = thecall$order, col = col))
+    if(storeData)
+    	tmp_data <- list(dfxy = dfxy, xax = xax, yax = yax, labels = labels, fac = fac, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(dfxy = thecall$dfxy, xax = xax, yax = yax, labels = thecall$labels, fac = thecall$fac, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "S2.traject", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = as.call(thecall))
+    
+    ## preparation
+    prepare(object)
+    setlatticecall(object)
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(! add & plot)
+    print(object)
+  invisible(object)
+}
diff --git a/R/S2.value.R b/R/S2.value.R
new file mode 100644
index 0000000..7d03977
--- /dev/null
+++ b/R/S2.value.R
@@ -0,0 +1,179 @@
+#########################################################
+###                     s.value                        ##
+#########################################################
+
+## TO DO: calcul place legend, taille des points
+## Remarque ==> pour size, si couleur selon <0 ou >0 il faut s'assurer que 0 ne sera donc pas dans un intervalle? (inclus ex [-1, 1])
+setClass(
+    Class = "S2.value",
+    contains = "ADEg.S2",
+    )
+
+
+setMethod(
+    f = "initialize",
+    signature = "S2.value",
+    definition = function(.Object, data = list(dfxy = NULL, z = NULL, xax = 1, yax = 2, frame = 0, storeData = TRUE), ...) {
+        .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.S2 initialize
+        .Object at data$z <- data$z
+        return(.Object)
+    })
+
+
+setMethod(
+    f = "prepare",
+    signature = "S2.value",
+    definition = function(object) {
+        name_obj <- deparse(substitute(object))
+        
+        ## pre-management of graphics parameters      
+        oldparamadeg <- adegpar()
+        on.exit(adegpar(oldparamadeg))
+        adegtot <- adegpar(object at adeg.par)
+        
+        if(object at data$storeData)
+            z <- object at data$z
+        else
+            z <- eval(object at data$z, envir = sys.frame(object at data$frame))
+        
+        if(is.null(object at adeg.par$ppoints$alpha))
+            adegtot$ppoints$alpha <- 0.9
+        if(is.null(object at adeg.par$ppoints$cex))
+            adegtot$ppoints$cex <- 1
+        if(is.null(object at adeg.par$porigin$include) & (any(names(object at g.args) %in% c("Sp", "nbobject"))))
+            adegtot$porigin$include <- FALSE
+        
+        if(is.null(object at g.args$breaks))
+            object at s.misc$breaks.update <- pretty(z, object at g.args$nclass)
+        else
+            object at s.misc$breaks.update <- object at g.args$breaks 
+        
+        object at s.misc$breaks.update <- breakstest(object at s.misc$breaks.update, z, n = length(object at s.misc$breaks.update))
+        n <- length(object at s.misc$breaks.update)
+        
+        ## symbols for z = center
+        if(!is.null(object at g.args$centerpar)) {
+            default <- list(pch = 4, cex = 1, col = "black")
+            if(is.list(object at g.args$centerpar))
+                object at g.args$centerpar <- modifyList(default, object at g.args$centerpar, keep.null = TRUE)
+            else
+                object at g.args$centerpar <- default
+        }
+        
+        if(is.null(object at adeg.par$psub$position))
+            adegtot$psub$position <- "topleft"
+        
+        if(!is.null(object at g.args$col)) {
+            switch(object at g.args$method,
+                   size = {
+                       if(length(object at g.args$col) != 2)
+                           stop("if method size choosen, col vector should be size 2", call. = FALSE)
+                       adegtot$ppoints$col <- object at g.args$col ## color given by the user
+                   },
+                   color = {
+                       if(length(object at g.args$col) < (n - 1))
+                           stop(paste("not enough colors defined for method color, at least ", (n - 1), " colors expected", sep = ""), call. = FALSE)
+                       adegtot$ppoints$col <- object at g.args$col[1:(n - 1)]  ## color given by the user
+                   })
+        } else {
+            if(object at g.args$method == "color")
+                adegtot$ppoints$col <- adegtot$ppalette$quanti(n - 1)
+            else
+                adegtot$ppoints$col <- adegtot$ppalette$quanti(2)
+        }
+        
+        ## object modification before calling inherited method
+        object at adeg.par <- adegtot
+        callNextMethod() ## prepare graph
+         
+        assign(name_obj, object, envir = parent.frame())
+    })
+
+
+## Draw symbols according to the different methods
+setMethod(
+    f = "panel",
+    signature = "S2.value",
+    definition = function(object, x, y) {
+        if(object at data$storeData)
+            zorig <- object at data$z
+        else
+            zorig <- eval(object at data$z, envir = sys.frame(object at data$frame))
+        
+        adeg.panel.values(x = x, y = y, z = zorig, method = object at g.args$method, symbol = object at g.args$symbol, ppoints = object at adeg.par$ppoints, 
+                          breaks = object at s.misc$breaks.update, centerpar = object at g.args$centerpar, center = object at g.args$center)
+    })
+
+
+s.value <- function(dfxy, z, breaks = NULL, xax = 1, yax = 2, method = c("size", "color"), symbol = c("square", "circle", "diamond", "uptriangle", "downtriangle"),
+                    col = NULL, nclass = 4, center = 0, centerpar = NULL, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+    
+    ## evaluation of some parameters
+    thecall <- .expand.call(match.call())
+    thecall$method <- match.arg(method)
+    if(thecall$method == "color") {
+        if(center != 0 | !is.null(centerpar))
+            warning("'center' and 'centerpar' are not used with 'color' method", call. = FALSE)      
+        center <- 0
+        centerpar <- NULL
+    }
+    thecall$center <- center
+    thecall$centerpar <- centerpar
+
+    thecall$symbol <- match.arg(symbol)
+    df <- try(as.data.frame(eval(thecall$dfxy, envir = sys.frame(sys.nframe() + pos))), silent = TRUE)
+    z <- eval(thecall$z, envir = sys.frame(sys.nframe() + pos))
+    if((class(df) == "try-error") | is.null(thecall$dfxy)) ## non convenient dfxy argument
+        stop("non convenient selection for dfxy (can not be converted to dataframe)", call. = FALSE)
+    if(NROW(df) != NROW(z))
+        stop("dfxy and z should have the same number of rows", call. = FALSE)
+    
+    ## parameters sorted
+    sortparameters <- sortparamADEg(...)
+    
+    ## facets
+    if(!is.null(facets)) {
+        if((length(xax) == 1 & length(yax) == 1) & NCOL(z) == 1)
+            object <- multi.facets.S2(thecall, sortparameters$adepar, samelimits = sortparameters$g.args$samelimits)
+        else 
+            stop("Facets are not allowed with multiple xax/yax or multiple z", call. = FALSE)
+    }
+    
+    ## multiple axes
+    else if((length(xax) > 1 | length(yax) > 1)) {
+        if(NCOL(z) == 1)
+            object <- multi.ax.S2(thecall)
+        else 
+            stop("Multiple xax/yax are not allowed with multiple z", call. = FALSE)
+    }
+    
+    ## multiple z
+    else if(NCOL(z) > 1) {
+        object <- multi.variables.S2(thecall, "z")
+    }
+    
+    ## simple ADEg graphic
+    else {
+        if(length(sortparameters$rest))
+            warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+        
+        ## creation of the ADEg object
+        g.args <- c(sortparameters$g.args, list(method = thecall$method, symbol = thecall$symbol, center = center, breaks = breaks, col = col,
+                                                nclass = nclass, centerpar = centerpar))
+        if(storeData)
+            tmp_data <- list(dfxy = dfxy, xax = xax, yax = yax, z = z, frame = sys.nframe() + pos, storeData = storeData)
+        else
+            tmp_data <- list(dfxy = thecall$dfxy, xax = xax, yax = yax, z = thecall$z, frame = sys.nframe() + pos, storeData = storeData)
+        object <- new(Class = "S2.value", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = as.call(thecall))
+        
+        ## preparation of the graph
+        prepare(object)
+        setlatticecall(object)
+        if(add)
+            object <- add.ADEg(object)
+    }
+    
+    if(! add & plot)
+        print(object)
+    invisible(object)
+}
diff --git a/R/T.cont.R b/R/T.cont.R
new file mode 100644
index 0000000..8c616d6
--- /dev/null
+++ b/R/T.cont.R
@@ -0,0 +1,56 @@
+setClass(
+  Class = "T.cont",
+  contains = "T.value"
+)
+
+
+setMethod(
+  f = "panel",
+  signature = "T.cont",
+  definition = function(object, x, y) {
+    ## call panel for T.value object
+    callNextMethod(object, x, y)
+    if(object at data$storeData) {
+      dftab <- object at data$dftab
+      coordsx <- object at data$coordsx
+      coordsy <- object at data$coordsy
+    } else {
+      dftab <- eval(object at data$dftab, envir = sys.frame(object at data$frame))
+      coordsx <- eval(object at data$coordsx, envir = sys.frame(object at data$frame))
+      coordsy <- eval(object at data$coordsy, envir = sys.frame(object at data$frame))
+    }
+    
+    dftab <- dftab / sum(dftab)
+    
+    f1 <- function(x, w) {
+      w1 <- weighted.mean(w, x)
+      w <- (w - w1)^2
+      w2 <- sqrt(weighted.mean(w, x))
+      return(c(w1, w2))
+    }
+    
+    if(object at g.args$meanX) {
+      w <- t(apply(dftab, 2, f1, w = coordsy))
+      panel.points(x = coordsx, y = w[, 1], pch = 20, cex = 1.5, col = "black")
+      panel.segments(coordsx, w[, 1] - w[, 2] , coordsx, w[, 1] + w[, 2], col = object at adeg.par$plines$col, lty = object at adeg.par$plines$lty, lwd = object at adeg.par$plines$lwd)
+    }
+    
+    if(object at g.args$meanY) {
+      w <- t(apply(dftab, 1, f1, w = coordsx))
+      panel.points(x = w[, 1], coordsy, pch = 20, cex = 1.5, col = "black")
+      panel.segments(w[, 1] - w[, 2], coordsy, w[, 1] + w[, 2], coordsy, col = object at adeg.par$plines$col, lty = object at adeg.par$plines$lty, lwd = object at adeg.par$plines$lwd)
+    }
+    
+    coordsx <- coordsx[col(as.matrix(dftab))]
+    coordsy <- coordsy[row(as.matrix(dftab))]
+    if(object at g.args$ablineX)
+      panel.abline(reg = lm(coordsy ~ coordsx, weights = as.vector(as.matrix(dftab))), col = object at adeg.par$plines$col, lty = object at adeg.par$plines$lty, lwd = object at adeg.par$plines$lwd)
+    
+    if(object at g.args$ablineY) {
+      w <- coefficients(lm(coordsx ~ coordsy, weights = as.vector(as.matrix(dftab))))
+      if(w[2] == 0)
+        panel.abline(h = w[1], col = object at adeg.par$plines$col, lty = object at adeg.par$plines$lty, lwd = object at adeg.par$plines$lwd)
+      else
+        panel.abline(c(-w[1] / w[2], 1 / w[2]), col = object at adeg.par$plines$col, lty = object at adeg.par$plines$lty, lwd = object at adeg.par$plines$lwd)
+    } 
+  })
diff --git a/R/T.image.R b/R/T.image.R
new file mode 100644
index 0000000..08f2975
--- /dev/null
+++ b/R/T.image.R
@@ -0,0 +1,194 @@
+setClass(
+  Class = "T.image",
+  contains = "ADEg.T"
+)
+
+
+setMethod(
+  f = "prepare",
+  signature = "T.image",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+
+    if(object at data$storeData) {
+      coordsx <- object at data$coordsx
+      coordsy <- object at data$coordsy
+      z <- as.vector(as.matrix(object at data$dftab))
+      dftab <- object at data$dftab
+      labelsx <- object at data$labelsx
+      labelsy <- object at data$labelsy
+     } else {
+      coordsx <- eval(object at data$coordsx, envir = sys.frame(object at data$frame))
+      coordsy <- eval(object at data$coordsy, envir = sys.frame(object at data$frame))
+      z <- as.vector(as.matrix(eval(object at data$dftab, envir = sys.frame(object at data$frame))))
+      dftab <- eval(object at data$dftab, envir = sys.frame(object at data$frame))
+      labelsx <- eval(object at data$labelsx, envir = sys.frame(object at data$frame))
+      labelsy <- eval(object at data$labelsy, envir = sys.frame(object at data$frame))
+    }
+    
+    if(is.null(object at g.args$breaks))
+      object at s.misc$breaks.update <- pretty(z, object at g.args$nclass)
+    else
+      object at s.misc$breaks.update <- object at g.args$breaks
+    
+    object at s.misc$breaks.update <- breakstest(object at s.misc$breaks.update, z, n = length(object at s.misc$breaks.update))
+    n <- length(object at s.misc$breaks.update)
+    
+    if(!is.null(object at g.args$col)) {
+      if(length(object at g.args$col) < (n - 1))
+        stop(paste("not enough colors defined, at least ", (n - 1), " colors expected", sep = ""), call. = FALSE)
+      adegtot$ppoints$col <- object at g.args$col[1:(n - 1)]  ## color given by the user
+  	} else {
+      if(is.null(object at adeg.par$ppoints$col))
+        adegtot$ppoints$col <- adegtot$ppalette$quanti(n - 1)
+    }
+  
+    ## inspired by level.colors from lattice
+
+    if(adegtot$plegend$drawColorKey)
+      adegtot$ptable$y$pos <- "left"
+    if(is.null(object at adeg.par$pgrid$col))
+      adegtot$pgrid$col <- "black"
+    if(is.null(object at adeg.par$pgrid$lwd))
+      adegtot$pgrid$lwd <- 0.6
+    if(is.null(object at adeg.par$pgrid$draw))
+      adegtot$pgrid$draw <- FALSE ## no cells border by default
+    
+    if(is.null(labelsx))
+        adegtot$ptable$x$tck <- 0
+    if(is.null(labelsy))
+        adegtot$ptable$y$tck <- 0
+        
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    ## TODO:  improve the code to avoid some repetition with the parent function
+    wx <- range(coordsx)
+    dx <- (diff(wx) + 1) / length(coordsx)
+    wy <- range(coordsy)
+    dy <- (diff(wy) + 1) / length(coordsy)
+    ## add an half cell at both sides
+    object at g.args$xlim <- wx + c(-0.5, 0.5) * dx
+    object at g.args$ylim <- wy + c(-0.5, 0.5) * dy 
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+  
+setMethod(
+  f = "panel",
+  signature = "T.image",
+  definition = function(object, x, y) {
+    ## x is data$coordsx and y is data$coordsy
+    if(object at data$storeData)
+      dftab <- as.matrix(object at data$dftab)
+    else
+      dftab <- as.matrix(eval(object at data$dftab, envir = sys.frame(object at data$frame)))
+    
+    xx <- x[!is.na(x)]
+    yy <- y[!is.na(y)]
+    zz <- as.vector(dftab)
+    dx <- diff(sort(xx)) / 2
+    dy <- diff(sort(yy)) / 2
+    dx <- c(dx[1], dx)
+    dy <- c(dy[1], dy)
+
+    ## draw values
+    panel.levelplot.raster(x = xx[col(dftab)], y = yy[row(dftab)], z = zz, subscripts = TRUE, col.regions = object at adeg.par$ppoints$col,
+                           at = object at s.misc$breaks.update, contour = FALSE, region = TRUE)
+
+    ## draw grid (cells border)
+    if(object at adeg.par$pgrid$draw) {
+      xbis <- c(min(xx) - dx[1], xx + dx, max(xx) + dx[length(dx)])
+      ybis <- c(min(yy) - dy[1], yy + dy, max(yy) + dy[length(dy)])
+      panel.abline(h = ybis, v = xbis, col = object at adeg.par$pgrid$col, lwd = object at adeg.par$pgrid$lwd, lty = object at adeg.par$pgrid$lty)
+    }
+  })
+
+
+## TODO: decider quelle classe on prend en compte
+## a faire: verifier espacement correct de coordsx et coordsy
+## que faire de la sous grille?
+## attention, coordsx et coordsy ne serve qu'a donner l'ordre de trace, ils seront considere comme egalement espace, sinon fonction a revoir
+table.image <- function(dftab, coordsx = 1:ncol(as.matrix(dftab)), coordsy = nrow(as.matrix(dftab)):1, labelsx = NULL, labelsy = NULL, nclass = 3, breaks = NULL, col = NULL, plot = TRUE, 
+                        storeData = TRUE, add = FALSE, pos = -1, ...) {
+    
+    ## 4 different types can be used as tab :
+    ## distance matrix (dist), contingency table (table), data.frame or matrix
+    thecall <- .expand.call(match.call())
+    dftab <- eval(thecall$dftab, envir = sys.frame(sys.nframe() + pos))
+    
+    ## modify coordsx/coordsy positions (we use only the order not the values)
+    thecall$coordsx <- call("rank", thecall$coordsx, ties.method = "first")
+    thecall$coordsy <- call("rank", thecall$coordsy, ties.method = "first")
+    
+    if(inherits(dftab, "dist")) {
+        if(missing(labelsx)){
+            thecall$labelsx <- labelsx <- NULL
+            if(!is.null(attr(dftab, "Labels")))
+                if(storeData)
+                    labelsx <- attr(dftab, "Labels")
+                else
+                    thecall$labelsx <- call("attr", thecall$dftab, "Labels")
+        }
+        if(missing(labelsy)){
+            thecall$labelsy <- labelsy <- NULL
+            if(!is.null(attr(dftab, "Labels")))
+                if(storeData)
+                    labelsy <- attr(dftab, "Labels")
+                else
+                    thecall$labelsy <- call("attr", thecall$dftab, "Labels")
+        }
+        ## coordsx and coordsy should be identical for dist objects (symmetric)
+        thecall$coordsx <- call(":", 1, call("attr", thecall$dftab, "Size"))
+        thecall$coordsy <- call(":", call("attr", thecall$dftab, "Size"), 1)
+        
+    } else { ## data.frame, matrix, table
+        if(missing(labelsy)){
+            thecall$labelsy <- labelsy <- NULL
+            if(!is.null(rownames(dftab)))
+                if(storeData)
+                    labelsy <- rownames(dftab)
+                else
+                    thecall$labelsy <- call("rownames", thecall$dftab)
+        }
+        
+        if(missing(labelsx)){
+            thecall$labelsx <- labelsx <- NULL
+            if(!is.null(colnames(dftab)))
+                if(storeData)
+                    labelsx <- colnames(dftab)
+                else
+                    thecall$labelsx <- call("colnames", thecall$dftab)
+        }
+    }
+  
+    ## parameters sorted
+    sortparameters <- sortparamADEg(...)
+    
+    ## creation of the ADEg object
+    if(length(sortparameters$rest))
+        warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    g.args <- c(sortparameters$g.args, list(breaks = breaks, nclass = nclass, col = col))
+    if(storeData)
+  	tmp_data <- list(dftab = dftab, coordsx = coordsx, coordsy = coordsy, labelsx = labelsx, labelsy = labelsy, frame = sys.nframe() + pos, storeData = storeData)
+    else
+        tmp_data <- list(dftab = thecall$dftab, coordsx = thecall$coordsx, coordsy = thecall$coordsy, labelsx = thecall$labelsx, labelsy = thecall$labelsy, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "T.image", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+    
+    ## preparation of the graph
+    prepare(object)
+    setlatticecall(object)
+    if(add)
+        object <- add.ADEg(object)
+    else
+        if(plot)
+            print(object)
+    invisible(object) 
+}
diff --git a/R/T.value.R b/R/T.value.R
new file mode 100644
index 0000000..588c4ed
--- /dev/null
+++ b/R/T.value.R
@@ -0,0 +1,194 @@
+setClass(
+    Class = "T.value",
+    contains = "ADEg.T"
+    )
+
+
+setMethod(
+    f = "prepare",
+    signature = "T.value",
+    definition = function(object) {
+        name_obj <- deparse(substitute(object))
+        
+        ## pre-management of graphics parameters      
+        oldparamadeg <- adegpar()
+        on.exit(adegpar(oldparamadeg))
+        adegtot <- adegpar(object at adeg.par)
+        
+        if(object at data$storeData) {
+            z <- as.vector(as.matrix(object at data$dftab))
+            dftab <- object at data$dftab
+            labelsx <- object at data$labelsx
+            labelsy <- object at data$labelsy
+        } else {
+            z <- as.vector(as.matrix(eval(object at data$dftab, envir = sys.frame(object at data$frame))))
+            dftab <- eval(object at data$dftab, envir = sys.frame(object at data$frame))
+            labelsx <- eval(object at data$labelsx, envir = sys.frame(object at data$frame))
+            labelsy <- eval(object at data$labelsy, envir = sys.frame(object at data$frame))
+        }
+        
+        if(is.null(object at g.args$breaks))
+            object at s.misc$breaks.update <- pretty(z, object at g.args$nclass)
+        else
+            object at s.misc$breaks.update <- object at g.args$breaks
+        
+        object at s.misc$breaks.update <- breakstest(object at s.misc$breaks.update, z, n = length(object at s.misc$breaks.update))
+        n <- length(object at s.misc$breaks.update)
+        
+        if(is.null(object at adeg.par$ppoints$cex))
+            adegtot$ppoints$cex <- 1
+        
+        if(is.null(object at adeg.par$ppoints$alpha))
+            adegtot$ppoints$alpha <- 1
+        
+        if(is.null(labelsx))
+            adegtot$ptable$x$tck <- 0
+        if(is.null(labelsy))
+            adegtot$ptable$y$tck <- 0
+        
+        ## symbols for z = center
+        if(!is.null(object at g.args$centerpar)) {
+            default <- list(pch = 4, cex = 1, col = "black")
+            if(is.list(object at g.args$centerpar))
+                object at g.args$centerpar <- modifyList(default, object at g.args$centerpar, keep.null = TRUE)
+            else
+                object at g.args$centerpar <- default
+        }
+        
+        if(!is.null(object at g.args$col)) {
+            switch(object at g.args$method,
+                   size = {
+                       if(length(object at g.args$col) != 2 & !inherits(dftab, "table") & !inherits(dftab, "dist"))
+                           stop("if method size choosen, col vector should be size 2", call. = FALSE)
+                       adegtot$ppoints$col <- object at g.args$col ## color given by the user
+                   },
+                   color = {
+                       if(length(object at g.args$col) < (n - 1))
+                           stop(paste("not enough colors defined for method color, at least ", (n - 1), " colors expected", sep = "") , call. = FALSE)
+                       adegtot$ppoints$col <- object at g.args$col[1:(n - 1)] ## color given by the user
+                   })
+        } else {
+            if(object at g.args$method == "color")
+                adegtot$ppoints$col <- adegtot$ppalette$quanti(n - 1)
+            else if(inherits(dftab, "table") | inherits(dftab, "dist")) {
+                adegtot$ppoints$col <- adegtot$ppalette$quanti(2)
+            }
+            else
+                adegtot$ppoints$col <- adegtot$ppalette$quanti(2)
+        }
+        
+        ## object modification before calling inherited method
+        object at adeg.par <- adegtot
+        callNextMethod() ## prepare graph
+        
+        assign(name_obj, object, envir = parent.frame())
+    })
+
+
+setMethod(
+    f = "panel",
+    signature = "T.value",
+    definition = function(object, x, y) {
+        if(object at data$storeData)
+            dftab <- as.matrix(object at data$dftab)
+        else
+            dftab <- as.matrix(eval(object at data$dftab, envir = sys.frame(object at data$frame)))
+        adeg.panel.values(x = x[col(dftab)], y = y[row(dftab)], z = as.vector(dftab), center = object at g.args$center, method = object at g.args$method,
+                          symbol = object at g.args$symbol, ppoints = object at adeg.par$ppoints, breaks = object at s.misc$breaks.update, centerpar = object at g.args$centerpar)
+    })
+
+
+table.value <- function(dftab, coordsx = 1:ncol(as.matrix(dftab)), coordsy = nrow(as.matrix(dftab)):1, labelsx, labelsy, breaks = NULL, method = c("size", "color"),
+                        symbol = c("square", "circle", "diamond", "uptriangle", "downtriangle"), col = NULL, nclass = 3, center = 0, centerpar = NULL, plot = TRUE,
+                        storeData = TRUE, add = FALSE, pos = -1, ...) {
+    
+    ## 4 different types can be used as tab :
+    ## distance matrix (dist), contingency table (table), data.frame or matrix
+    
+    ## evaluation of some parameters
+    thecall <- .expand.call(match.call())
+    thecall$method <- match.arg(method)
+    thecall$symbol <- match.arg(symbol)
+    dftab <- eval(thecall$dftab, envir = sys.frame(sys.nframe() + pos))
+    if(any(is.na(dftab)))
+        stop("NA entries not accepted")
+    
+    if(inherits(dftab, "dist")) {
+        if(missing(labelsx)){
+            thecall$labelsx <- labelsx <- NULL
+            if(!is.null(attr(dftab, "Labels")))
+                if(storeData)
+                    labelsx <- attr(dftab, "Labels")
+    		else
+                    thecall$labelsx <- call("attr", thecall$dftab, "Labels")
+        } 
+        
+        if(missing(labelsy)) {
+            thecall$labelsy <- labelsy <- NULL
+            if(!is.null(attr(dftab, "Labels")))
+                if(storeData)
+                    labelsy <- attr(dftab, "Labels")
+    		else
+                    thecall$labelsy <- call("attr", thecall$dftab, "Labels")
+        }
+        ## coordsx and coordsy should be identical for dist objects (symmetric)
+        thecall$coordsx <- call(":", 1, call("attr", thecall$dftab, "Size"))
+        thecall$coordsy <- call(":", call("attr", thecall$dftab, "Size"), 1)
+        
+    } else { ## data.frame, matrix, table
+        if(missing(labelsy)) {
+            thecall$labelsy <- labelsy <- NULL
+            if(!is.null(rownames(dftab)))
+                if(storeData)
+                    labelsy <- rownames(dftab)
+                else
+                    thecall$labelsy <- call("rownames", thecall$dftab)
+        }
+        
+        if(missing(labelsx)) {
+            thecall$labelsx <- labelsx <- NULL
+            if(!is.null(colnames(dftab)))
+                if(storeData)
+                    labelsx <- colnames(dftab)
+                else
+                    thecall$labelsx <- call("colnames", thecall$dftab)
+        }
+    }
+    
+    
+    ## parameters sorted
+    sortparameters <- sortparamADEg(...)
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(breaks = breaks, method = thecall$method, symbol = thecall$symbol, center = thecall$center, col = col, nclass = nclass, centerpar = centerpar))
+    if(storeData)
+        tmp_data <- list(dftab = dftab, coordsx = coordsx, coordsy = coordsy, labelsx = labelsx, labelsy = labelsy, frame = sys.nframe() + pos, storeData = storeData)
+    else
+        tmp_data <- list(dftab = thecall$dftab, coordsx = thecall$coordsx, coordsy = thecall$coordsy, labelsx = thecall$labelsx, labelsy = thecall$labelsy, frame = sys.nframe() + pos, storeData = storeData)
+    
+    if(inherits(dftab, "table")) {
+        condres <- pmatch(c("ablineX", "ablineY", "meanX", "meanY"), names(sortparameters$rest))
+        if(any(!is.na(condres))) {
+            tmplist <- sortparameters$rest[condres[!is.na(condres)]]
+            names(tmplist) <- c("ablineX", "ablineY", "meanX", "meanY")[which(!is.na(condres))]
+            sortparameters$rest <- sortparameters$rest[-condres[(!is.na(condres))]]
+            g.args <- c(g.args, tmplist)
+        }
+        g.args[c("ablineX", "ablineY", "meanX", "meanY")[which(is.na(condres))]] <- FALSE
+        object <- new(Class = "T.cont", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+    } else
+        object <- new(Class = "T.value", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+
+    if(length(sortparameters$rest))
+        warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## preparation of the graph
+    prepare(object)
+    setlatticecall(object)
+    if(add)
+        object <- add.ADEg(object)
+    else
+        if(plot)
+            print(object)
+    invisible(object) 
+}
+
diff --git a/R/Tr.class.R b/R/Tr.class.R
new file mode 100644
index 0000000..580adf2
--- /dev/null
+++ b/R/Tr.class.R
@@ -0,0 +1,265 @@
+######################################################
+##                   Tr.class                      ###
+##    Triangular representation with a factor      ###
+######################################################
+
+setClass(
+  Class = "Tr.class",
+  contains = "ADEg.Tr"
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "Tr.class",
+  definition = function(.Object, data = list(dfxyz = NULL, fac = NULL, wt = NULL, labels = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...)
+    .Object at data$fac <- data$fac
+    .Object at data$wt <- data$wt
+    .Object at data$labels <- data$labels
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "Tr.class",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    if(object at data$storeData) {
+      df <- object at data$dfxyz
+      fac <- as.factor(object at data$fac)
+      wt <- object at data$wt
+    } else {
+      fac <- as.factor(eval(object at data$fac, envir = sys.frame(object at data$frame)))
+      df <- eval(object at data$dfxyz, envir = sys.frame(object at data$frame))
+      wt <- eval(object at data$wt, envir = sys.frame(object at data$frame))
+    }
+    nlev <- nlevels(fac)
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    if(any(adegtot$plabels$cex > 0) & is.null(object at adeg.par$plegend$drawKey)) ## if labels, no legend
+        adegtot$plegend$drawKey <- FALSE
+    
+    ## setting colors 
+    if(!is.null(object at g.args$col)){
+        col.idx <- FALSE
+        if(is.logical(object at g.args$col)) {
+            if(object at g.args$col){
+                colT <- adegtot$ppalette$quali(nlevels(fac))
+                col.idx <- TRUE
+            }
+        } else {
+            colT <- rep(object at g.args$col, length.out = nlevels(fac))
+            col.idx <- TRUE
+        }
+        
+        if(col.idx){
+            if(is.null(object at adeg.par$ppoints$col))
+                adegtot$ppoints$col <- colT
+            if(is.null(object at adeg.par$ppoints$fill))
+                adegtot$ppoints$fill <- colT
+            if(is.null(object at adeg.par$pellipses$border))
+                adegtot$pellipses$border <- colT
+            if(is.null(object at adeg.par$pellipses$col))
+                adegtot$pellipses$col <- colT
+            if(is.null(object at adeg.par$plabels$col))
+                adegtot$plabels$col <- colT
+            if(is.null(object at adeg.par$plabels$boxes$border))
+                adegtot$plabels$boxes$border <- colT
+            if(is.null(object at adeg.par$ppolygons$border))
+                adegtot$ppolygons$border <- colT
+            if(is.null(object at adeg.par$ppolygons$col))
+                adegtot$ppolygons$col <- colT
+            if(is.null(object at adeg.par$plines$col))
+                adegtot$plines$col <- colT
+        }
+    }
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    ## calculate 2D coordinates
+    df <- sweep(df, 1, rowSums(df), "/")
+    object at stats$coords2d <- .coordtotriangleM(df, mini3 = object at g.args$min3d, maxi3 = object at g.args$max3d)[, 2:3]
+    
+    ## compute means for the 3 variables (for getstats)
+    object at stats$means <- matrix(meanfacwt(df, fac, wt), nrow = nlev)
+    ## mean2d: columns: axes, row: levels
+    object at stats$mean2d <- matrix(meanfacwt(object at stats$coords2d, fac, wt), nrow = nlev)
+    mean.x <- object at stats$mean2d[, 1] ## all means rows as levels, columns as variables
+    mean.y <- object at stats$mean2d[, 2]
+    
+    ## ellipses
+    if(object at g.args$ellipseSize > 0) {
+      object at stats$covvar <- covfacwt(df, fac, wt)
+      object at stats$covvar2d <- covfacwt(object at stats$coords2d, fac, wt)
+      covvartotal <- object at stats$covvar2d
+      
+      object at s.misc$ellipses <- lapply(1:nlev,
+                                       FUN = function(i) {
+                                         .util.ellipse(mean.x[i], mean.y[i], vx = covvartotal[[i]][1, 1], vy = covvartotal[[i]][2, 2], cxy = covvartotal[[i]][1, 2],
+                                                       coeff = object at g.args$ellipseSize)
+                                       })
+    }
+
+    ## convex hull
+    if(!is.null(object at g.args$chullSize))
+      if(any(object at g.args$chullSize > 0))
+        object at s.misc$chullcoord  <- .util.chull(object at stats$coords2d[, 1], object at stats$coords2d[, 2], mean.x, mean.y, fac = fac, chullSize =  object at g.args$chullSize)
+    
+    object at adeg.par$plabels$optim <- FALSE
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "Tr.class",
+  definition = function(object, x, y) {
+
+    if(object at data$storeData) {
+      df <- object at data$dfxyz
+      fac <- object at data$fac
+      labels <- object at data$labels
+    } else {
+      fac <- eval(object at data$fac, envir = sys.frame(object at data$frame))
+      df <- eval(object at data$dfxyz, envir = sys.frame(object at data$frame))
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+    }
+
+    fac <- as.factor(fac)
+    nlev <- nlevels(fac)
+    
+    ## draw convex hulls
+    if(any(object at g.args$chullSize > 0)) {
+      chullpo <- object at s.misc$chullcoord
+      ppolygons <- lapply(object at adeg.par$ppolygons, FUN = function(x) rep(x, length.out = length(chullpo)))
+      for(level in 1:nlev) {
+        chull <- chullpo[[level]]
+        for(j in 1:length(chull))
+          panel.polygon(x = chull[[j]][, 1], y = chull[[j]][, 2], border = ppolygons$border[level], col = ppolygons$col[level], lty = ppolygons$lty[level], lwd = ppolygons$lwd[level], alpha = ppolygons$alpha[level])
+      }}
+
+    ## draw ellipses
+    if(object at g.args$ellipseSize > 0) {
+      ellip <- object at s.misc$ellipses
+      pellip <- object at adeg.par$pellipses
+      ## setting parameters, number of levels
+      pellip <- lapply(pellip, FUN = function(x) {if(is.list(x)) return(x) else rep(x, length.out = length(ellip))})
+      pellip$axes <- lapply(pellip$axes, FUN = function(x) {rep(x, length.out = length(ellip))})
+      for(level in 1:nlev) {
+        ell <- ellip[[level]]
+        if(!(any(is.null(ell))))
+          if(!any(is.na(ell))) {
+            panel.polygon(ell$x, ell$y, col = pellip$col[level], lwd = pellip$lwd[level], lty = pellip$lty[level], alpha = pellip$alpha[level], border = pellip$border[level])
+            if(pellip$axes$draw[level]) {
+            	## draw axes
+              panel.segments(ell$seg1[1], ell$seg1[2], ell$seg1[3], ell$seg1[4], lwd = pellip$axes$lwd[level], lty = pellip$axes$lty[level], col = pellip$axes$col[level])
+              panel.segments(ell$seg2[1], ell$seg2[2], ell$seg2[3], ell$seg2[4], lwd = pellip$axes$lwd[level], lty = pellip$axes$lty[level], col = pellip$axes$col[level])
+            }
+          }
+      }
+    }
+    
+    ## draw stars
+    if(object at g.args$starSize > 0) {
+      plines <- lapply(object at adeg.par$plines, FUN = function(x) {rep(x, length.out = nlev)})
+      xlx <- split(object at stats$coords2d[, 1], fac)
+      ylx <- split(object at stats$coords2d[, 2], fac)
+      for(level in 1:nlev) {
+        xbase <- object at stats$mean2d[level, 1]
+        ybase <- object at stats$mean2d[level, 2]
+        xlev <- xlx[[level]]
+        ylev <- ylx[[level]]
+        panel.segments(
+          x0 = xbase, y0 = ybase,
+          x1 =  xbase + object at g.args$starSize * (xlev - xbase),
+          y1 =  ybase + object at g.args$starSize * (ylev - ybase),
+          lty = plines$lty[level], lwd = plines$lwd[level], col = plines$col[level])
+      }
+    }
+    
+    ## draw points
+    npoints <- nrow(object at stats$coords2d)
+    ppoints <- object at adeg.par$ppoints
+    if(length(fac) > 1) {
+      ppoints <- lapply(object at adeg.par$ppoints, function(x, fac) {
+        if(length(x) > length(fac))
+          return(x)
+        else {
+          xlev <-  rep(x, length.out = nlev)
+          return(xlev[fac])
+        }
+      }, fac = fac)
+    }
+    
+    panel.points(x = object at stats$coords2d[, 1], y = object at stats$coords2d[, 2], type = "p", pch = ppoints$pch, cex = ppoints$cex, col = ppoints$col, alpha = ppoints$alpha, fill = ppoints$fill)
+    
+    ## draw labels
+    if(any(object at adeg.par$plabels$cex > 0)) {
+      center <- object at stats$mean2d
+      adeg.panel.label(x = center[, 1], y = center[, 2] , labels = labels,  object at adeg.par$plabels)
+    }
+  })
+
+
+triangle.class <- function(dfxyz, fac, wt = rep(1, NROW(fac)), labels = levels(fac), col = NULL, ellipseSize = 1, starSize = 1, chullSize = NULL, adjust = TRUE, 
+  min3d = NULL, max3d = NULL, showposition = TRUE, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  ## dfxyz: matrix/data.frame with 3 columns
+  ## min3d, max3d: limits by default: c(0,0,0), c(1,1,1)
+  
+  thecall <- .expand.call(match.call())
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+
+  ## facets
+  if(!is.null(facets)) {
+    if(NCOL(fac) == 1)
+      object <- multi.facets.Tr(thecall, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed multiple fac")
+  }
+  
+  ## multiple fac
+  else if(NCOL(fac) > 1) {
+    object <- multi.variables.Tr(thecall, "fac")
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+     ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(adjust = adjust, min3d = min3d, max3d = max3d, ellipseSize = ellipseSize, starSize = starSize, chullSize = chullSize, col = col))
+    if(storeData)
+    	tmp_data <- list(dfxyz = dfxyz, fac = fac, wt = wt, labels = labels, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(dfxyz = thecall$dfxyz, fac = thecall$fac, wt = thecall$wt, labels = thecall$labels, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "Tr.class", data  = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object)
+    setlatticecall(object)
+    if(showposition & add) {
+      print("cannot show position and add") ## can be done, but modifies the meaning of the superposition
+      showposition <- FALSE 
+    }
+    if(showposition)
+      object <- new(Class = "ADEgS", ADEglist = list("triangle" = object, "positions" = .showpos(object)), positions = rbind(c(0, 0, 1, 1), c(0, 0.7, 0.3, 1)), add = matrix(0, ncol = 2, nrow = 2), Call = match.call())
+    if(add)
+      object <- add.ADEg(object)
+  }
+
+  if(!add & plot)
+    print(object)
+  invisible(object)
+}
+
diff --git a/R/Tr.label.R b/R/Tr.label.R
new file mode 100644
index 0000000..614d033
--- /dev/null
+++ b/R/Tr.label.R
@@ -0,0 +1,196 @@
+###############################################
+##             triangle.label                ##
+###############################################
+
+setClass(
+  Class = "Tr.label",
+  contains = "ADEg.Tr"
+)
+
+
+setMethod(
+  f = "initialize",
+  signature  = "Tr.label",
+  definition = function(.Object, data = list(dfxyz = NULL, labels = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.Tr initialize
+    .Object at data$labels <- data$labels
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "Tr.label",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    if(object at data$storeData) {
+      labels <- object at data$labels
+      df <- object at data$dfxyz
+    } else {
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+      df <- eval(object at data$dfxyz, envir = sys.frame(object at data$frame))
+    }
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    ## change some parameter values
+    if((is.null(object at adeg.par$plabels$boxes$draw) & adegtot$plabels$optim) | (is.null(object at adeg.par$plabels$boxes$draw) & length(labels) > 1000))  
+      adegtot$plboxes$draw <- FALSE
+    
+    if(object at g.args$addmean) {
+      default <- list(pch = 20, col = "black", cex = 2)
+      if(is.list(object at g.args$meanpar))
+        object at g.args$meanpar <- modifyList(default, object at g.args$meanpar, keep.null = TRUE)
+      else {
+        if(!is.null(object at g.args$meanpar))
+          stop("meanpar must be a list of graphical parameters (pch, col, cex)", call. = FALSE)
+        else
+          object at g.args$meanpar <- default
+      }
+    }
+    
+    if(object at g.args$addaxes | object at g.args$addmean) {
+      ## lines (axes or mean)
+      default <- list(col = "black", lwd = 1, lty = 1)
+      if(is.list(object at g.args$axespar))
+        object at g.args$axespar <- modifyList(default, object at g.args$axespar, keep.null = TRUE)
+      else {
+        if(!is.null(object at g.args$axespar))
+          stop("axespar must be a list of graphical parameters (lwd, col, lty)", call. = FALSE)
+        else
+          object at g.args$axespar <- default
+      }
+      
+      ## point (axes or mean)
+      default <- list(pch = 20, col = "black", cex = 2)
+      if(is.list(object at g.args$meanpar))
+        object at g.args$meanpar <- modifyList(default, object at g.args$meanpar, keep.null = TRUE)
+      else {
+        if(!is.null(object at g.args$meanpar))
+          stop("meanpar must be a list of graphical parameters (pch, col, cex)", call. = FALSE)
+        else
+          object at g.args$meanpar <- default
+      }
+    }
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    ## calculate 2D coordinates
+    df <- sweep(df, 1, rowSums(df), "/")
+    object at stats$coords2d <- .coordtotriangleM(df, mini3 = object at g.args$min3d, maxi3 = object at g.args$max3d)[, 2:3]
+    
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "Tr.label",
+  definition = function(object, x, y) {            
+    
+    if(object at data$storeData) {
+      labels <- object at data$labels
+      df <- object at data$dfxyz
+    } else {
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+      df <- eval(object at data$dfxyz, envir = sys.frame(object at data$frame))
+    }
+    
+    ## draw points and labels
+    if(any(object at adeg.par$ppoints$cex > 0))
+      panel.points(object at stats$coords2d[, 1], object at stats$coords2d[, 2], pch = object at adeg.par$ppoints$pch, cex = object at adeg.par$ppoints$cex, col = object at adeg.par$ppoints$col, alpha = object at adeg.par$ppoints$alpha, fill = object at adeg.par$ppoints$fill)
+    if(any(object at adeg.par$plabels$cex > 0))
+      adeg.panel.label(object at stats$coords2d[, 1], object at stats$coords2d[, 2], labels, object at adeg.par$plabels)
+    
+    ## addmean or addaxes
+    if(object at g.args$addmean | object at g.args$addaxes) {
+      df <- sweep(df, 1, rowSums(df), "/")
+      mini3 <- object at g.args$min3d
+      maxi3 <- object at g.args$max3d
+      
+      m3 <- colMeans(df)
+      mxy <- .coordtotriangleM(t(as.matrix(m3)), mini3 = mini3, maxi3 = maxi3)[-1]
+      if(object at g.args$addmean) {
+        ## axis points: putting means on the axis A
+        axp3 <- rbind(c(m3[1], mini3[2], 1 - m3[1] - mini3[2]),
+                      c(1 - m3[2] -mini3[3], m3[2], mini3[3]),
+                      c(mini3[1], 1 - m3[3] - mini3[1], m3[3]))
+        axpxyz <- .coordtotriangleM(axp3, mini3 = mini3, maxi3 = maxi3)
+        
+        ## drawing lines for means
+        apply(axpxyz, 1, FUN = function(x) {
+          do.call("panel.lines", c(list(x = c(x[2], mxy[1]), y = c(x[3], mxy[2])), object at g.args$axespar))
+        })
+        do.call("panel.points", c(list(x = c(mxy[1], axpxyz[, 2]), y = c(mxy[2], axpxyz[, 3])), object at g.args$meanpar))
+        panel.text(x = axpxyz[, 2], y = axpxyz[, 3], labels = as.character(round(m3, digits = 4)), pos = c(2, 1, 4))
+      }
+      
+      if(object at g.args$addaxes) {
+        axx <- dudi.pca(df, scale = FALSE, scannf = FALSE)$c1
+        cornerp <- object at s.misc$cornerp
+        a1 <- axx[, 1]
+        x1 <- a1[1] * cornerp$A + a1[2] * cornerp$B + a1[3] * cornerp$C
+        do.call("panel.segments", c(list(x0 = mxy[1] - x1[1], x1 = mxy[1] +  x1[1], y0 = mxy[2] - x1[2], y1 = mxy[2] + x1[2]), object at g.args$axespar))
+        a2 <- axx[, 2]
+        x1 <- a2[1] * cornerp$A + a2[2] * cornerp$B + a2[3] * cornerp$C
+        do.call("panel.segments", c(list(x0 = mxy[1] - x1[1], x1 = mxy[1] + x1[1], y0 = mxy[2] - x1[2], y1 = mxy[2] + x1[2]), object at g.args$axespar))
+        do.call("panel.points", c(list(x = mxy[1], y = mxy[2]), object at g.args$meanpar))
+      }
+    }
+  })
+
+
+triangle.label <- function(dfxyz, labels = rownames(dfxyz), adjust = TRUE, min3d = NULL, max3d = NULL, addaxes = FALSE, addmean = FALSE, meanpar = NULL, axespar = NULL, 
+  												 showposition = TRUE, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  ## dfxyz: matrix/data.frame with 3 columns
+  ## min3d, max3d: limits by default: c(0,0,0), c(1,1,1)
+  ## addaxes: should we draw pca axes
+  ## addmean: should we draw mean
+  
+  thecall <- .expand.call(match.call())
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    object <- multi.facets.Tr(thecall, samelimits = sortparameters$g.args$samelimits)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(adjust = adjust, min3d = min3d, max3d = max3d, addaxes = addaxes, addmean = addmean, meanpar = meanpar, axespar = axespar))
+    if(storeData)
+    	tmp_data <- list(dfxyz = dfxyz, labels = labels, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(dfxyz = thecall$dfxyz, labels = thecall$labels, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "Tr.label", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object)
+    setlatticecall(object)
+    if(showposition & add) {
+      warning("cannot show position and add") ## can be done, but modifies the meaning of the superposition
+      showposition <- FALSE 
+    }
+    if(showposition)
+      object <- new(Class = "ADEgS", ADEglist = list("triangle" = object, "positions" = .showpos(object)), positions = rbind(c(0, 0, 1, 1), c(0, 0.7, 0.3, 1)), add = matrix(0, ncol = 2, nrow = 2), Call = match.call())
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(!add & plot)
+    print(object)
+  invisible(object)  
+}
+
diff --git a/R/Tr.match.R b/R/Tr.match.R
new file mode 100644
index 0000000..f73e1e6
--- /dev/null
+++ b/R/Tr.match.R
@@ -0,0 +1,132 @@
+setClass(
+  Class = "Tr.match",
+  contains = "ADEg.Tr",
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "Tr.match",
+  definition = function(.Object, data = list(dfxyz = NULL, labels = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...) ## ADEg.Tr initialize
+    .Object at data$labels <- data$labels
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "Tr.match",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    if(object at data$storeData) {
+      df <- object at data$dfxyz
+    } else {
+      df <- eval(object at data$dfxyz, envir = sys.frame(object at data$frame))
+    }
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    ## calculate 2D coordinates
+    df <- sweep(df, 1, rowSums(df), "/")
+    n <- NROW(df) / 2
+    df1 <- df[1:n,]
+    df2 <- df[(1 + n):(2 * n), ]
+    object at stats$coords2d1 <- .coordtotriangleM(df1, mini3 = object at g.args$min3d, maxi3 = object at g.args$max3d)[, 2:3]
+    object at stats$coords2d2 <- .coordtotriangleM(df2, mini3 = object at g.args$min3d, maxi3 = object at g.args$max3d)[, 2:3]
+    
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "Tr.match",
+  definition = function(object, x, y) {
+    if(object at data$storeData) {
+      labels <- object at data$labels
+      df <- object at data$dfxyz
+    } else {
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+      df <- eval(object at data$dfxyz, envir = sys.frame(object at data$frame))
+    }
+    
+    if(NROW(df) %% 2)
+      stop("error in panel method : unable to split the two datasets")
+    
+    ## draw points
+    if(any(object at adeg.par$ppoints$cex > 0))
+      do.call("panel.points", c(list(x = object at stats$coords2d1[, 1], y = object at stats$coords2d1[, 2]), object at adeg.par$ppoints))
+
+    ## draw arrows
+    panel.arrows(x0 = object at stats$coords2d1[, 1], y0 = object at stats$coords2d1[, 2] , y1 = object at stats$coords2d2[, 2], x1 = object at stats$coords2d2[, 1],
+                 angle = object at adeg.par$parrows$angle, length = object at adeg.par$parrows$length,
+                 ends = object at adeg.par$parrows$end, lwd = object at adeg.par$plines$lwd, col = object at adeg.par$plines$col,
+                 lty = object at adeg.par$plines$lty)
+    
+    if(any(object at adeg.par$plabels$cex > 0)) {
+      xlab <- (object at stats$coords2d1[, 1] + object at stats$coords2d2[, 1]) / 2
+      ylab <- (object at stats$coords2d1[, 2] + object at stats$coords2d2[, 2]) / 2
+      object at adeg.par$plabels$optim <- FALSE
+      adeg.panel.label(xlab, ylab, labels = labels, object at adeg.par$plabels)
+    }
+  })
+
+
+triangle.match <- function(dfxyz1, dfxyz2, labels = row.names(as.data.frame(dfxyz1)), min3d = NULL, max3d = NULL, adjust = TRUE, 
+  showposition = TRUE, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+                           
+  ## evaluation of some parameters
+  thecall <- .expand.call(match.call())
+  data1 <- try(as.data.frame(eval(thecall$dfxyz1, envir = sys.frame(sys.nframe() + pos))), silent = TRUE)
+  data2 <- try(as.data.frame(eval(thecall$dfxyz2, envir = sys.frame(sys.nframe() + pos))), silent = TRUE)
+  
+  if(class(data1) == "try-error" || class(data2) == "try-error" || is.null(thecall$dfxyz1) || is.null(thecall$dfxyz2))  ## wrong conversion 
+    stop("non convenient selection for dfxyz1 or dfxyz2 (can not be converted to dataframe)")
+
+  sortparameters <- sortparamADEg(...)
+
+  ## facets
+  if(!is.null(facets)) {
+    object <- multi.facets.Tr(thecall, samelimits = sortparameters$g.args$samelimits)
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(adjust = adjust, min3d = min3d, max3d = max3d))
+    if(storeData)
+    	tmp_data <- list(dfxyz = rbind(dfxyz1, dfxyz2), labels = labels, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(dfxyz = call("rbind", thecall$dfxyz1, thecall$dfxyz2), labels = thecall$labels, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "Tr.match", data = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object)
+    setlatticecall(object)
+    if(showposition & add) {
+      print("cannot show position and add") ## can be done, but modifies the meaning of the superposition
+      showposition <- FALSE 
+    }
+    
+    if(showposition)
+      object <- new(Class = "ADEgS", ADEglist = list("triangle" = object, "positions" = .showpos(object)), positions = rbind(c(0, 0, 1, 1), c(0, 0.7, 0.3, 1)), add = matrix(0, ncol = 2, nrow = 2), Call = match.call())
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(!add & plot)
+    print(object)
+  invisible(object)  
+}
diff --git a/R/Tr.traject.R b/R/Tr.traject.R
new file mode 100644
index 0000000..5b9fe15
--- /dev/null
+++ b/R/Tr.traject.R
@@ -0,0 +1,186 @@
+######################################################
+##                   Tr.traject                    ###
+######################################################
+
+setClass(
+  Class = "Tr.traject",
+  contains = "ADEg.Tr"
+)
+
+
+setMethod(
+  f = "initialize",
+  signature = "Tr.traject",
+  definition = function(.Object, data = list(dfxyz = NULL, fac = NULL, labels = NULL, frame = 0, storeData = TRUE), ...) {
+    .Object <- callNextMethod(.Object, data = data, ...)
+    .Object at data$fac <- data$fac
+    .Object at data$labels <- data$labels
+    return(.Object)
+  })
+
+
+setMethod(
+  f = "prepare",
+  signature = "Tr.traject",
+  definition = function(object) {
+    name_obj <- deparse(substitute(object))
+    
+    if(object at data$storeData) {
+      df <- object at data$dfxyz
+      fac <- as.factor(object at data$fac)
+    } else {
+      df <- eval(object at data$dfxyz, envir = sys.frame(object at data$frame))
+      fac <- as.factor(eval(object at data$fac, envir = sys.frame(object at data$frame)))
+    }
+    
+    ## pre-management of graphics parameters      
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    adegtot <- adegpar(object at adeg.par)
+    
+    ## change default for some parameters
+    if(!is.null(object at g.args$col))
+      if(is.logical(object at g.args$col)) {
+        if(object at g.args$col)
+          adegtot$ppoints$col <- adegtot$ppoints$fill <- adegtot$plabels$col <- adegtot$plabels$boxes$border <- adegtot$plines$col <- adegtot$ppalette$quali(nlevels(fac))
+      }  
+      else
+        adegtot$ppoints$col <- adegtot$ppoints$fill <- adegtot$plabels$col <- adegtot$plabels$boxes$border <- adegtot$plines$col <- rep(object at g.args$col, length.out = nlevels(fac))
+    
+    ## object modification before calling inherited method
+    object at adeg.par <- adegtot
+    callNextMethod() ## prepare graph
+    
+    ## calculate 2D coordinates
+    df <- sweep(df, 1, rowSums(df), "/")
+    object at stats$coords2d <- .coordtotriangleM(df, mini3 = object at g.args$min3d, maxi3 = object at g.args$max3d)[, 2:3]
+
+    object at adeg.par$plabels$optim <- FALSE
+    assign(name_obj, object, envir = parent.frame())
+  })
+
+
+setMethod(
+  f = "panel",
+  signature = "Tr.traject",
+  definition = function(object, x, y) {
+    
+    if(object at data$storeData) {
+      fact <- object at data$fac
+      labels <- object at data$labels
+    } else {
+      fact <- eval(object at data$fac, envir = sys.frame(object at data$frame))
+      labels <- eval(object at data$labels, envir = sys.frame(object at data$frame))
+    }
+    
+    todrawX <- split(object at stats$coords2d[, 1], fact)
+    todrawY <- split(object at stats$coords2d[, 2], fact)
+    sizelevels <- sapply(todrawX, length)
+    if(!is.null(object at g.args$order))
+      orderdraw <- split(order, fact)
+    else
+      orderdraw <- lapply(sizelevels, FUN = function(x) if(x > 0)  1:x else NULL)
+    ## ordrerdraw is a list used to recycle graphical parameters
+    
+    setparam <- function(params, nblevel, sizelevels) {
+      ## for param begin and end or repetition                               
+      if(length(params) == nblevel)
+        return(mapply(params, FUN = function(x, y) rep(x, length.out = y), sizelevels, SIMPLIFY = FALSE))
+      else
+        return(mapply(sizelevels, FUN = function(x, y) rep(params, length.out = x), SIMPLIFY = FALSE))    
+    }
+       
+    parrows <- lapply(object at adeg.par$parrows, setparam, nblevel = length(todrawX), sizelevels = sizelevels)
+    plines <- lapply(object at adeg.par$plines, setparam, nblevel = length(todrawX), sizelevels = sizelevels)
+    ppoints <- lapply(object at adeg.par$ppoints, setparam, nblevel = length(todrawX), sizelevels = sizelevels)
+    
+    for(i in 1:length(todrawX)) {
+      if(length(todrawX[[i]]) > 0)
+        panel.points(x = todrawX[[i]], y = todrawY[[i]], col = ppoints$col[[i]], cex = ppoints$cex[[i]], pch = ppoints$pch[[i]], fill = ppoints$fill[[i]])
+    }
+    
+    for(i in 1:length(todrawX)) {
+      if(length(todrawX[[i]]) > 1) {
+        suborder <- orderdraw[[i]]
+        for(j in 1:(length(todrawX[[i]]) - 1)) {
+          panel.arrows(x0 = todrawX[[i]][suborder[j]], y0 = todrawY[[i]][suborder[j]],
+            x1 = todrawX[[i]][suborder[j + 1]], y1 = todrawY[[i]][suborder[j + 1]],
+            angle = parrows$angle[[i]][suborder[j + 1]], length = parrows$length[[i]][suborder[j + 1]],
+            ends = parrows$end[[i]][suborder[j + 1]], lwd = plines$lwd[[i]][suborder[j + 1]],
+            col = plines$col[[i]][suborder[j + 1]], lty = plines$lty[[i]][suborder[j + 1]])
+        }
+      }
+    }
+    
+    if(any(object at adeg.par$plabels$cex > 0)) {
+      ## draws labels in the middle part of the trajectory
+      middl <- sapply(orderdraw, FUN = function(x) floor(length(x) / 2))
+      x <- y <- rep(NA, length(middl))
+      for(i in 1:length(middl)) {
+        if(length(todrawX[[i]]) > 1) {
+          x[i] <- (todrawX[[i]][suborder[middl[i]]] + todrawX[[i]][suborder[middl[i]+1]]) / 2
+          y[i] <- (todrawY[[i]][suborder[middl[i]]] + todrawY[[i]][suborder[middl[i]+1]]) / 2
+        }
+      }
+      
+      ## always false here no optimization for straject object
+      object at adeg.par$plabels$optim <- FALSE
+      adeg.panel.label(x, y, labels = labels, plabels = object at adeg.par$plabels)
+    }
+  })
+
+
+triangle.traject <- function(dfxyz, fac = gl(1, nrow(dfxyz)), order, labels = levels(fac), col = NULL, adjust = TRUE, 
+  min3d = NULL, max3d = NULL, showposition = TRUE, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) {
+  ## dfxyz: matrix/data.frame with 3 columns
+  ## min3d, max3d: limits by default: c(0,0,0), c(1,1,1)
+  
+  thecall <- .expand.call(match.call())
+  
+  ## parameters sorted
+  sortparameters <- sortparamADEg(...)
+  
+  ## facets
+  if(!is.null(facets)) {
+    if(NCOL(fac) == 1)
+      object <- multi.facets.Tr(thecall, samelimits = sortparameters$g.args$samelimits)
+    else 
+      stop("Facets are not allowed multiple fac")
+  }
+  
+  ## multiple fac
+  else if(NCOL(fac) > 1) {
+    object <- multi.variables.Tr(thecall, "fac")
+  }
+  
+  ## simple ADEg graphic
+  else {
+    if(length(sortparameters$rest))
+      warning(c("Unused parameters: ", paste(unique(names(sortparameters$rest)), " ", sep = "")), call. = FALSE)
+    
+    ## creation of the ADEg object
+    g.args <- c(sortparameters$g.args, list(adjust = adjust, min3d = min3d, max3d = max3d, col = col, order = thecall$order))
+    if(storeData)
+    	tmp_data <- list(dfxyz = dfxyz, fac = fac, labels = labels, frame = sys.nframe() + pos, storeData = storeData)
+    else
+      tmp_data <- list(dfxyz = thecall$dfxyz, fac = thecall$fac, labels = thecall$labels, frame = sys.nframe() + pos, storeData = storeData)
+    object <- new(Class = "Tr.traject", data  = tmp_data, adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = g.args, Call = match.call())
+    
+    ## preparation
+    prepare(object)
+    setlatticecall(object)
+    if(showposition & add) {
+      print("cannot show position and add") ## can be done, but modifies the meaning of the superposition
+      showposition <- FALSE 
+    }
+    if(showposition)
+      object <- new(Class = "ADEgS", ADEglist = list("triangle" = object, "positions" = .showpos(object)), positions = rbind(c(0, 0, 1, 1), c(0, 0.7, 0.3, 1)), add = matrix(0, ncol = 2, nrow = 2), Call = match.call())
+    if(add)
+      object <- add.ADEg(object)
+  }
+  
+  if(!add & plot)
+    print(object)
+  invisible(object)
+}
+
diff --git a/R/addtext.R b/R/addtext.R
new file mode 100644
index 0000000..722a3af
--- /dev/null
+++ b/R/addtext.R
@@ -0,0 +1,78 @@
+setMethod(
+  f = "addtext",
+  signature = "ADEgORtrellis",
+  definition = function(object, xcoord, ycoord, label, plot = TRUE, ...) {
+    
+    size <- max(length(xcoord), length(ycoord), length(label))
+    xcoord <- rep_len(xcoord, length.out = size)
+    ycoord <- rep_len(ycoord, length.out = size)
+    labels <- rep_len(label, length.out = size)
+    
+    ## sorting parameters
+    sortparameters <- sortparamADEg(...)$adepar
+    params <- adegpar()
+    sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+    params <- sortparameters$plabels
+    
+    if(inherits(object, "ADEg")) {
+      xlim <- object at g.args$xlim
+      ylim <- object at g.args$ylim
+    } else {
+      xlim <- object$x.limits
+      ylim <- object$y.limits
+    }
+
+    textadded <- xyplot(ycoord ~ xcoord, panel = function(x, y, ...)
+        adeg.panel.label(x, y, labels, plabels = params), plot = FALSE)
+
+    textadded$call <- call("xyplot", ycoord ~ xcoord, xlim = substitute(xlim), ylim = substitute(ylim), labels = substitute(labels), 
+                
+                           panel = function(x, y, labels, ...) adeg.panel.label(x, y, labels = labels, plabels = params))
+    
+    obj <- superpose(object, textadded, plot = FALSE)
+    names(obj) <- c("object", "textadded")
+    
+    if(plot)
+      print(obj)
+    invisible(obj)
+  })
+
+
+setMethod(
+  f = "addtext",
+  signature = "ADEgS",
+  definition = function(object, xcoord, ycoord, label, plot = TRUE, which = 1:length(object),...) {
+    ngraph <- length(object)
+    if(max(which) > ngraph)
+      stop("Values in 'which' should be lower than the length of object")
+    
+    
+    if(length(which) == 1) { # if only one subgraph is selected, all the labels are displayed on this unique subgraph
+      size <- max(length(xcoord), length(ycoord), length(label))
+      xcoord <- rep_len(xcoord, length.out = size)
+      ycoord <- rep_len(ycoord, length.out = size)
+      labels <- rep_len(label, length.out = size)
+      
+      object[[which]] <- addtext(object[[which]], xcoord, ycoord, labels, ..., which = 1, plot = FALSE)
+      
+    } else { # if several subgraphs are selected, each label is displayed on one subgraph; there is only one label by subgraph
+      ## sorting parameters
+      sortparameters <- sortparamADEg(...)$adepar
+      params <- adegpar()
+      sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+      params <- sortparameters$plabels
+      params <- rapply(params, function(X) rep(X, length.out = length(which)), how = "list")
+        
+      xcoord <- rep_len(xcoord, length.out = length(which))
+      ycoord <- rep_len(ycoord, length.out = length(which))
+      labels <- rep_len(label, length.out = length(which))
+      
+      for (i in which)
+        object[[i]] <- addtext(object[[i]], xcoord[i], ycoord[i], labels[i], which = 1, plot = FALSE, plabels = lapply(params, function(X) X[i]))
+    }
+    
+    obj <- object
+    if(plot)
+      print(obj)
+    invisible(obj)
+  })
\ No newline at end of file
diff --git a/R/ade4-kplot.R b/R/ade4-kplot.R
new file mode 100644
index 0000000..e233691
--- /dev/null
+++ b/R/ade4-kplot.R
@@ -0,0 +1,471 @@
+"kplot.mcoa" <- function(object, xax = 1, yax = 2, which.tab = 1:nrow(object$cov2), option = c("points", "axis", "columns"), pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(object, "mcoa")) 
+    stop("Object of class 'mcoa' expected")
+  if((xax == yax) || (object$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > object$nf)
+    stop("Non convenient xax")
+  if(yax > object$nf)
+    stop("Non convenient yax")
+  
+  option <- match.arg(option)
+  
+  ## parameters management
+  sortparameters <- sortparamADEg(...)
+  
+  if(option == "points") {
+    params1 <- list()
+    params1$adepar <- list(psub = list(text = "Reference"), plabels = list(cex = 1.25))
+    sortparameters1 <- modifyList(params1, sortparameters, keep.null = TRUE)
+    ref <- do.call("s.label", c(list(dfxy = substitute(object$SynVar), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters1$adepar, sortparameters1$trellis, sortparameters1$g.args))
+    
+    params2 <- list()
+    params2$adepar <- list(plabels = list(cex = 0))
+    params2$g.args <- list(samelimits = FALSE)
+    sortparameters2 <- modifyList(params2, sortparameters, keep.null = TRUE)
+    
+    facets1 <- substitute(object$TL[,1])
+    coolig <- call("as.data.frame", call("matrix", call("kronecker", rep(1,nrow(object$cov2)), substitute(as.matrix(object$SynVar))), nrow = nrow(object$Tl1), ncol = ncol(object$Tl1), dimnames = substitute(list(rownames(object$Tl1), colnames(object$Tl1)))))
+    g1 <- do.call("s.match", c(list(dfxy1 = coolig, dfxy2 = substitute(object$Tl1), facets = facets1, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters2$adepar, sortparameters2$trellis, sortparameters2$g.args))[which.tab]
+    
+    ## ADEgS creation
+    ADEglist <- c(list(ref), g1 at ADEglist)
+    nrow_lay  <- floor(sqrt(length(ADEglist))) + 1
+    ncol_lay <- -floor(-(length(ADEglist)) / nrow_lay)
+    lay <- matrix(c(seq(1, length(ADEglist)), rep(0, nrow_lay * ncol_lay - length(ADEglist))), nrow = nrow_lay, byrow = TRUE)
+    obj <- new(Class = "ADEgS", ADEglist = ADEglist, positions = layout2position(lay), add = matrix(0, ncol = length(ADEglist), nrow = length(ADEglist)), Call = match.call())
+    names(obj) <- c("ref", names(g1))
+    
+  } else if(option == "axis") {
+    params <- list()
+    params$adepar <- list(pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+    sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+    
+    facets2 <- substitute(object$T4[, 1])
+    obj <- do.call("s.corcircle", c(list(dfxy = substitute(object$Tax), facets = facets2, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$adepar, sortparameters$trellis, sortparameters$g.args))[which.tab]
+    
+  } else if(option == "columns") {
+    params <- list()
+    params$adepar <- list(plabels = list(cex = 1.25))
+    params$g.args <- list(samelimits = FALSE)
+    sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+    
+    facets3 <- substitute(object$TC[, 1])
+    obj <- do.call("s.arrow", c(list(dfxy = substitute(object$Tco), facets = facets3, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$adepar, sortparameters$trellis, sortparameters$g.args))[which.tab]
+  }
+  
+  obj at Call <- match.call()
+  if(plot) 
+    print(obj)
+  invisible(obj)
+}
+
+
+"kplot.mfa" <- function(object, xax = 1, yax = 2, which.tab = 1:length(object$blo), traject = FALSE, permute = FALSE, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(object, "mfa")) 
+    stop("Object of class 'mfa' expected")
+  if((xax == yax) || (object$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > object$nf)
+    stop("Non convenient xax")
+  if(yax > object$nf)
+    stop("Non convenient yax")
+  
+  ## sort parameters for each graph
+  graphsnames <- c("row", "col", "traj")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## parameters management
+  params <- list()
+  params$row <- list(plabels = list(cex = 0), ppoints = list(cex = 1.5), samelimits = FALSE)
+  params$col <- list(psub = list(cex = 0), plabels = list(cex = 1.25))
+  params$traj <- list(plabels = list(cex = 0), psub = list(cex = 0))
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## prepare
+  if(permute) {
+    dfxy_row <- substitute(object$co)
+    dfxy_col <- substitute(object$lisup)
+    facets_row <- substitute(object$TC[,1])
+    facets_col <- substitute(object$TL[,1])
+  } else {
+    dfxy_row <- substitute(object$lisup)
+    dfxy_col <- substitute(object$co)
+    facets_row <- substitute(object$TL[,1])
+    facets_col <- substitute(object$TC[,1])
+  }
+  
+  ## create g1
+  g1 <- do.call("s.label", c(list(dfxy = dfxy_row, facets = facets_row, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$row))[which.tab]
+  
+  ## prepare and create g2
+  if(permute)
+    dcol <- object$lisup
+  else
+    dcol <- object$co
+  k <- c(min(dcol[, xax]), max(dcol[, xax]), min(dcol[, yax]), max(dcol[, yax])) / c(g1[[1]]@g.args$xlim, g1[[1]]@g.args$ylim)
+  dcol <- substitute(dfxy_col * 0.7 / max(k))
+  g2 <- do.call("s.arrow", c(list(dfxy = dcol, facets = facets_col, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$col))[which.tab]
+  obj <- do.call("superpose", list(g1, g2))
+  obj at Call <- call("superpose", g1 at Call, g2 at Call)
+  
+  ## create g3
+  if(traject) {
+    g3 <- do.call("s.traject", c(list(dfxy = dfxy_row, facets = facets_row, xax = xax, yax = yax, plot = FALSE, storeData = FALSE, pos = pos - 2), sortparameters$traj))[which.tab]
+    obj <- do.call("superpose", list(obj, g3))
+    obj at Call <- call("superpose", obj at Call, g3 at Call)
+  }
+  
+  ## ADEgS creation
+  names(obj) <- object$tab.names[which.tab]
+  obj at Call <- match.call()
+  if(plot) 
+    print(obj)
+  invisible(obj)
+}
+
+
+"kplot.pta" <- function(object, xax = 1, yax = 2, which.tab = 1:nrow(object$RV), which.graph = 1:4, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(object, "pta")) 
+    stop("Object of class 'pta' expected")
+  if((xax == yax) || (object$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  if(!is.numeric(which.graph) || any(which.graph < 1) || any(which.graph > 4)) 
+    stop("'which' must be in 1:4")
+  
+  if(xax > object$nf)
+    stop("Non convenient xax")
+  if(yax > object$nf)
+    stop("Non convenient yax")
+  
+  ## sort parameters for each graph
+  graphsnames <- c("axis", "row", "col", "components")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## parameters management
+  params <- list()
+  params$axis <- list(pbackground = list(box = FALSE), plabels = list(alpha = 1, cex = 1.25))
+  params$rows <- list(plabels = list(alpha = 1, cex = 1.25))
+  params$columns <- list(plabels = list(cex = 1.25))
+  params$components <- list(pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  g <- as.null()
+  adeglist <- as.null()
+  ## creation of each individual ADEg
+  if(1 %in% which.graph) {
+  	facets1 <- substitute(object$T4[, 1])
+  	g1 <- do.call("s.corcircle", c(list(dfxy = substitute(object$Tax), labels = substitute(object$T4[, 2]), facets = facets1, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$axis))[which.tab]
+  	names(g1) <- paste(graphsnames[1], "_", object$tab.names, sep = "")[which.tab]
+    g <- c(g, g1)
+    adeglist <- c(adeglist, g1 at ADEglist)
+  }
+  
+  if(2 %in% which.graph) {
+    facets2 <- substitute(object$TL[, 1])
+    g2 <- do.call("s.label", c(list(dfxy = substitute(object$Tli), labels = substitute(object$TL[,2]), facets = facets2, xax = 1, yax = 2, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$rows))[which.tab]
+    names(g2) <- paste(graphsnames[2], "_", object$tab.names, sep = "")[which.tab]
+    g <- c(g, g2)
+    adeglist <- c(adeglist, g2 at ADEglist)
+  }
+  
+  if(3 %in% which.graph) {
+    facets3 <- substitute(object$TC[, 1])
+  	g3 <- do.call("s.arrow", c(list(dfxy = substitute(object$Tco), labels = substitute(object$TC[,2]), facets = facets3, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$columns))[which.tab]
+  	names(g3) <- paste(graphsnames[3], "_", object$tab.names, sep = "")[which.tab]
+    g <- c(g, g3)
+    adeglist <- c(adeglist, g3 at ADEglist)
+  }
+  
+  if(4 %in% which.graph) {
+  	facets4 <- substitute(object$T4[, 1])
+  	g4 <- do.call("s.corcircle", c(list(dfxy = substitute(object$Tcomp), labels = substitute(object$T4[, 2]), facets = facets4, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$components))[which.tab]
+  	names(g4) <- paste(graphsnames[4], "_", object$tab.names, sep = "")[which.tab]
+    g <- c(g, g4)
+    adeglist <- c(adeglist, g4 at ADEglist)
+  }
+  
+  ## ADEgS creation
+  ng <- sum(sapply(g, function(x) length(x)))
+  lay <- matrix(1:ng, ncol = length(which.graph))
+  obj <- new(Class = "ADEgS", ADEglist = c(adeglist), positions = layout2position(lay), add = matrix(0, ncol = ng, nrow = ng), Call = match.call())
+  if(plot) 
+    print(obj)
+  invisible(obj)
+}
+
+
+"kplot.sepan" <- function(object, xax = 1, yax = 2, which.tab = 1:length(object$blo), permute = FALSE, traject = FALSE, posieig = "bottomleft", pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(object, "sepan")) 
+    stop("Object of class 'sepan' expected")
+  if((xax == yax) || (length(object$Eig) == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > length(object$Eig))
+    stop("Non convenient xax")
+  if(yax > length(object$Eig))
+    stop("Non convenient yax")
+  
+  ## prepare
+  if(permute) {
+    dfxy_row <- substitute(object$Co)
+    dfxy_col <- substitute(object$Li)
+    names_row <- substitute(object$TC[,2])
+    names_col <- substitute(object$TL[,2])
+    facets_row <- substitute(object$TC[,1])
+    facets_col <- substitute(object$TL[,1])
+  } else {
+    dfxy_row <- substitute(object$Li)
+    dfxy_col <- substitute(object$Co)
+    names_row <- substitute(object$TL[,2])
+    names_col <- substitute(object$TC[,2])
+    facets_row <- substitute(object$TL[,1])
+    facets_col <- substitute(object$TC[,1])
+  }
+  
+  ## sort parameters for each graph
+  graphsnames <- c("row", "col", "traj", "eig")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## parameters management
+  params <- list()
+  params$row <- list(psub = list(position = "bottomright"), samelimits = FALSE)
+  params$traj <- list(psub = list(position = "bottomright"), plabels = list(cex = 0), samelimits = FALSE)
+  params$col <- list(psub = list(cex = 0, position = "bottomright"), plabels = list(cex = 1.25))
+  params$eig <- list(psub = list(text = ""), pbackground = list(box = TRUE), samelimits = FALSE)
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## create g1
+  if(!traject) 
+  	g1 <- do.call("s.label", c(list(dfxy = dfxy_row, labels = names_row, facets = facets_row, xax = 1, yax = 2, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$row))[which.tab]
+  else 
+    g1 <- do.call("s.traject", c(list(dfxy = dfxy_row, facets = facets_row, xax = xax, yax = yax, plot = FALSE, storeData = FALSE, pos = pos - 2), sortparameters$traj))[which.tab]
+  
+  ## prepare and create g2
+  if(permute)
+    dcol <- object$Li
+  else
+    dcol <- object$Co
+  k <- c(min(dcol[, xax]), max(dcol[, xax]), min(dcol[, yax]), max(dcol[, yax])) / c(g1[[1]]@g.args$xlim, g1[[1]]@g.args$ylim)
+  dcol <- substitute(dfxy_col * 0.7 / max(k))
+  g2 <- do.call("s.arrow", c(list(dfxy = dcol, labels = names_col, facets = facets_col, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$col))[which.tab]
+  obj <- do.call("superpose", list(g1, g2))
+  obj at Call <- call("superpose", g1 at Call, g2 at Call)
+  
+  ## prepare and create g3
+  facets_eig <- reorder(as.factor(rep(levels(object$TL[, 1]), object$rank)), rep(1:length(object$rank), object$rank))
+  if(!any(posieig == "none")) {
+    g3 <- do.call("plotEig", c(list(eigvalue = substitute(object$Eig), nf = 1:ncol(object$Li), facets = facets_eig, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$eig))[which.tab]
+    obj <- do.call("insert", list(g3, obj, posi = posieig, plot = FALSE, ratio = 0.2, inset = 0, dispatch = TRUE))
+  }
+  
+  ## ADEgS creation
+  names(obj) <- object$tab.names[which.tab]
+  obj at Call <- match.call()
+  if(plot) 
+    print(obj)
+  invisible(obj)
+} 
+
+
+"kplotsepan.coa" <- function(object, xax = 1, yax = 2, which.tab = 1:length(object$blo), permute = FALSE, posieig = "bottomleft", pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(object, "sepan")) 
+    stop("Object of class 'sepan' expected")
+  if((xax == yax) || (length(object$Eig) == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > length(object$Eig))
+    stop("Non convenient xax")
+  if(yax > length(object$Eig))
+    stop("Non convenient yax")
+  
+  ## prepare
+  if(permute) {
+    dfxy_row <- substitute(object$C1)
+    dfxy_col <- substitute(object$Li)
+    names_row <- substitute(object$TC[,2])
+    names_col <- substitute(object$TL[,2])
+    facets_row <- substitute(object$TC[,1])
+    facets_col <- substitute(object$TL[,1])
+  } else {
+    dfxy_row <- substitute(object$Li)
+    dfxy_col <- substitute(object$C1)
+    names_row <- substitute(object$TL[,2])
+    names_col <- substitute(object$TC[,2])
+    facets_row <- substitute(object$TL[,1])
+    facets_col <- substitute(object$TC[,1])
+  }
+  
+  ## sort parameters for each graph
+  graphsnames <- c("row", "col", "eig")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## parameters management
+  params <- list()
+  params$col <- list(psub = list(position = "bottomright"), plabels = list(cex = 1.25), samelimits = FALSE)
+  params$row <- list(psub = list(cex = 0, position = "bottomright"))
+  params$eig <- list(psub = list(text = ""), pbackground = list(box = TRUE))
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation and create g1 and g2
+  g1 <- do.call("s.label", c(list(dfxy = dfxy_col, labels = names_col, facets = facets_col, xax = 1, yax = 2, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$col))[which.tab]
+  g2 <- do.call("s.label", c(list(dfxy = dfxy_row, labels = names_row, facets = facets_row, xax = 1, yax = 2, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$row))[which.tab]
+  obj <- do.call("superpose", c(list(g1, g2)))
+  obj at Call <- call("superpose", g1 at Call, g2 at Call)
+  
+  ## prepare and create g3
+  facets_eig <- reorder(as.factor(rep(levels(object$TL[, 1]), object$rank)), rep(1:length(object$rank), object$rank))
+  if(!any(posieig == "none")) {
+    g3 <- do.call("plotEig", c(list(eigvalue = substitute(object$Eig), nf = 1:ncol(object$Li), facets = facets_eig, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$eig))[which.tab]
+    obj <- do.call("insert", list(g3, obj, posi = posieig, plot = FALSE, ratio = 0.2, inset = 0, dispatch = TRUE))
+  }
+  
+  ## ADEgS creation
+  names(obj) <- object$tab.names[which.tab]
+  obj at Call <- match.call()
+  if(plot) 
+    print(obj)
+  invisible(obj)
+}
+
+
+"kplot.statis" <- function(object, xax = 1, yax = 2, which.tab = 1:length(object$tab.names), traject = FALSE, arrow = TRUE, class = NULL, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(object, "statis")) 
+    stop("Object of class 'statis' expected")
+  if((xax == yax) || (object$C.nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > object$C.nf)
+    stop("Non convenient xax")
+  if(yax > object$C.nf)
+    stop("Non convenient yax")
+  
+  ## sort parameters for each graph
+  graphsnames <- c("col", "traj", "class")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## parameters management
+  params <- list()
+  params$col <- list(plabels = list(cex = 1.25))
+  params$traj <- list(plabels = list(cex = 0), psub = list(cex = 0))
+  params$class <- list(plabels = list(cex = 1.5), ppoints = list(cex = 2), pellipses = list(alpha = 0, axes = list(draw = FALSE)), psub = list(cex = 0))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## prepare
+  facets <- substitute(object$TC[, 1])
+  
+  ## creation of each individual ADEg
+  if(arrow) 
+    g1 <- do.call("s.arrow", c(list(dfxy = substitute(object$C.Co), facets = facets, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$col))[which.tab]    	
+  else
+    g1 <- do.call("s.label", c(list(dfxy = substitute(object$C.Co), xax = xax, yax = yax, facets = facets, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$col))[which.tab]
+  
+  if(traject) {
+    g2 <- do.call("s.traject", c(list(dfxy = substitute(object$C.Co), xax = xax, yax = yax, facets = facets, plot = FALSE, storeData = FALSE, pos = pos - 2), sortparameters$traj))[which.tab]
+    obj <- do.call("superpose", list(g1, g2))
+    obj at Call <- call("superpose", g1 at Call, g2 at Call)
+  } else
+    obj <- g1
+  
+  if(!is.null(class)) {
+    if(length(class) == 1) {
+      if(class)
+	    	g3 <- do.call("s.class", c(list(dfxy = substitute(object$C.Co), fac = object$TC[, 1], xax = xax, yax = yax, facets = facets, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$class))[which.tab]
+    } else {
+      if(length(class) == length(object$TC[, 1]))
+        g3 <- do.call("s.class", c(list(dfxy = substitute(object$C.Co), fac = factor(class), xax = xax, yax = yax, facets = facets, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$class))[which.tab]
+    }
+    obj <- do.call("superpose", list(obj, g3))
+  	obj at Call <- call("superpose", g3 at Call, obj at Call)
+  }
+  
+  
+  ## ADEgS creation
+  names(obj) <- object$tab.names[which.tab]
+  obj at Call <- match.call()
+  if(plot) 
+    print(obj)
+  invisible(obj)
+}
+
+
+"kplot.foucart" <- function(object, xax = 1, yax = 2, which.tab = 1:length(object$blo), pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(object, "foucart")) 
+    stop("Object of class 'foucart' expected")
+  if((xax == yax) || (object$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > object$nf)
+    stop("Non convenient xax")
+  if(yax > object$nf)
+    stop("Non convenient yax")
+  
+  ## sort parameters for each graph
+  graphsnames <- c("row", "col")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## limits calcul
+  df <- rbind(as.matrix(object$li), as.matrix(object$Tli), as.matrix(object$Tco))
+  adegtot <- adegpar()
+  lim.global <- setlimits2D(minX = min(df[, xax]), maxX = max(df[, xax]), minY = min(df[, yax]), maxY = max(df[, yax]), origin = adegtot$porigin$origin, aspect.ratio = adegtot$paxes$aspectratio, includeOr = adegtot$porigin$include)
+  
+  ## parameters management
+  params <- list()
+  params$row <- list(plabels = list(cex = 1), xlim = lim.global$xlim, ylim = lim.global$ylim, plabels = list(cex = 1.25))
+  params$col <- list(plabels = list(cex = 1.25), psub = list(text = ""), xlim = lim.global$xlim, ylim = lim.global$ylim, plabels = list(cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.label", c(list(dfxy = substitute(object$Tli), facets =  substitute(object$TL[, 1]), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$row))[which.tab]
+  g2 <- do.call("s.label", c(list(dfxy = substitute(object$Tco), facets = substitute(object$TC[, 1]), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$col))[which.tab]
+  
+  ## ADEgS creation
+  obj <- do.call("superpose", list(g1, g2))
+  names(obj) <- object$tab.names
+  obj at Call <- match.call()
+  if(plot)
+    print(obj)
+  invisible(obj)
+}
+
+
+"kplot.mbpcaiv" <- function(object, xax = 1, yax = 2, which.tab = 1:length(object$blo), pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(object, "mbpcaiv")) 
+    stop("Object of class 'mbpcaiv' expected")
+  if((xax == yax) || (object$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > object$nf)
+    stop("Non convenient xax")
+  if(yax > object$nf)
+    stop("Non convenient yax")
+  
+  sortparameters <- sortparamADEg(...)
+  
+  obj <- do.call("s.label", c(list(dfxy = substitute(object$Tli), xax = xax, yax = yax, facets = substitute(object$TL[, 1]), plot = plot, storeData = storeData, pos = pos - 2), adeg.par = sortparameters$adepar, trellis.par = sortparameters$trellis, g.args = sortparameters$g.args))[which.tab]
+  
+  obj at Call <- match.call()
+  if(plot)
+    print(obj)
+  invisible(obj)
+}
diff --git a/R/ade4-plot.R b/R/ade4-plot.R
new file mode 100644
index 0000000..35d0a54
--- /dev/null
+++ b/R/ade4-plot.R
@@ -0,0 +1,1569 @@
+"screeplot.dudi" <- function(x, col.kept = "grey", col = "white", pos = -1, plot = TRUE, ...) {
+  if(!inherits(x, "dudi")) 
+    stop("Object of class 'dudi' expected")
+  
+  ## prepare
+  nf <- 1:x$nf
+  col <- rep(col, length(x$eig))
+  col[nf] <- col.kept
+  
+  ## default values for parameters 
+  sortparameters <- sortparamADEg(...)
+  params <- list()
+  params$adepar <- list(ppolygons = list(col = col), porigin = list(origin = c(0, 0)), pgrid = list(draw = FALSE), p1d = list(horizontal = FALSE), paxes = list(draw = TRUE, x = list(draw = FALSE)))
+  params$g.args <- list(main = deparse(substitute(x)), xlab = "Axis", ylab = "Inertia", ylim = c(min(0, min(x$eig)), max(x$eig) * 1.1))
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## ADEg creation
+  object <- do.call("s1d.barchart", c(list(score = substitute(x$eig), pos = pos - 2, plot = FALSE), sortparameters$adepar, sortparameters$trellis, sortparameters$g.args))
+  object at Call <- match.call()
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"biplot.dudi" <- function(x, pos = -1, plot = TRUE, ...) {
+  if(!inherits(x, "dudi")) 
+    stop("Object of class 'dudi' expected")
+  
+  object <- do.call("scatter", c(list(substitute(x), pos = pos - 3, plot = FALSE, ...)))
+  object at Call <- match.call()
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.coinertia" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "coinertia")) 
+    stop("Object of class 'coinertia' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf) 
+    stop("Non convenient xax")
+  if(yax > x$nf) 
+    stop("Non convenient yax")
+  
+  ## sort parameters for each graph
+  graphsnames <- c("Xax", "Yax", "eig", "XYmatch", "Yloadings", "Xloadings")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "Unconstrained axes (X)"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[2]] <- list(psub = list(text = "Unconstrained axes (Y)"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Eigenvalues"))
+  params[[4]] <- list(psub = list(text = "Row scores (X -> Y)"))
+  params[[5]] <- list(psub = list(text = "Y loadings"), plabels = list(cex = 1.25))
+  params[[6]] <- list(psub = list(text = "X loadings"), plabels = list(cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## Creation of each individual ADEg
+  g1 <- do.call("s.corcircle", c(list(dfxy = substitute(x$aX), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s.corcircle", c(list(dfxy = substitute(x$aY), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s.match", c(list(dfxy1 = substitute(x$mX), dfxy2 = substitute(x$mY), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  g5 <- do.call("s.arrow", c(list(dfxy = substitute(x$l1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[5]])) 
+  g6 <- do.call("s.arrow", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[6]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 2, 3, 4, 4, 5, 4, 4, 6), 3, 3)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4, g5, g6), positions = layout2position(lay), add = matrix(0, ncol = 6, nrow = 6), Call = match.call() )
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.pcaiv" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "pcaiv")) 
+    stop("Object of class 'pcaiv' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf) 
+    stop("Non convenient xax")
+  if(yax > x$nf) 
+    stop("Non convenient yax")
+  
+  ## sort parameters for each graph
+  graphsnames <- c("Xloadings", "Xcor", "eig", "XYmatch", "Yax", "Ycol")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "X loadings"), plabels = list(cex = 1.25))
+  params[[2]] <- list(psub = list(text = "X correlation"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Eigenvalues"))
+  params[[4]] <- list(psub = list(text = "Predictions (X) -> Scores (Y)"))
+  params[[5]] <- list(psub = list(text = "Unconstrained axes (Y)"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[6]] <- list(psub = list(text = "Y columns"), plabels = list(cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## Creation of each individual ADEg
+  g1 <- do.call("s.arrow", c(list(dfxy = substitute(na.omit(x$fa)), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s.corcircle", c(list(dfxy = substitute(na.omit(x$cor)), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s.match", c(list(dfxy1 = substitute(x$li), dfxy2 = substitute(x$ls), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]] ))
+  g5 <- do.call("s.corcircle", c(list(dfxy = substitute(x$as), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[5]]))
+  g6 <- do.call("s.arrow", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[6]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 2, 3, 4, 4, 5, 4, 4, 6), 3, 3)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4, g5, g6), positions = layout2position(lay), add = matrix(0, ncol = 6, nrow = 6), Call = match.call() )
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.betcoi" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "betcoi"))
+    stop("Object of class 'betcoi' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf)
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")
+  
+  appel <- as.list(x$call)
+  fac <- eval.parent(appel$fac)
+  
+  ## sort parameters for each graph
+  graphsnames <- c("Xax", "Yax", "eig", "XYmatch", "Yloadings", "Xloadings")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames, nbsubgraphs = c(1, 1, 1, 3, 1, 1))
+  
+  ## compute limits for the ADEgS 'XYmatch' (two s.class and one s.match)
+  mat <- rbind(x$msX, x$msY, x$mX)
+  minmat <- apply(mat, 2, min)
+  maxmat <- apply(mat, 2, max)
+  limdefault <- setlimits2D(minmat[1], maxmat[1], minmat[2], maxmat[2], origin = c(0, 0), includeOr = TRUE)     
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "Unconstrained axes (X)"), plabels = list(cex = 1.25))
+  params[[2]] <- list(psub = list(text = "Unconstrained axes (Y)"), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Eigenvalues"))
+  params[[4]] <- list()
+  params[[4]]$l1 <- list(psub = list(text = "Row scores (X -> Y)"), xlim = limdefault$xlim, ylim = limdefault$ylim, chullSize = 1, ppoints = list(pch = 16, cex = 0.5), plines = list(lwd = 1), plabels = list(alpha = 0, boxes = list(draw = FALSE)), ppolygon = list(lwd = 0.5, alpha = 0.2), pellipses = list(alpha = 0, axes = list(draw = FALSE)), col = adegpar()$ppalette$quali(nlevels(fac)))
+  params[[4]]$l2 <- list(xlim = limdefault$xlim, ylim = limdefault$ylim, chullSize = 1, ppoints = list(pch = 15, cex = 0.5), plines = list(lwd = 1), plabels = list(alpha = 0, boxes = list(draw = FALSE)), ppolygon = list(lwd = 0.5, alpha = 0.2), pellipses = list(alpha = 0.0, axes = list(draw = FALSE)), col = adegpar()$ppalette$quali(nlevels(fac)))
+  params[[4]]$l3 <- list(xlim = limdefault$xlim, ylim = limdefault$ylim, ppoints = list(cex = 0.7), plines = list(lwd = 2), plabels = list(alpha = 1, boxes = list(draw = TRUE), cex = 1.25))
+  params[[5]] <- list(psub = list(text = "Y loadings"), plabels = list(cex = 1.25))
+  params[[6]] <- list(psub = list(text = "X loadings"), plabels = list(cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.arrow", c(list(dfxy = substitute(x$aX), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s.arrow", c(list(dfxy = substitute(x$aY), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]])) 
+  g41 <- do.call("s.class", c(list(dfxy = substitute(x$msX), fac = appel$fac, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]][[1]]))
+  g42 <- do.call("s.class", c(list(dfxy = substitute(x$msY), fac = appel$fac, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]][[2]]))
+  g43 <- do.call("s.match", c(list(dfxy1 = substitute(x$mX), dfxy2 = substitute(x$mY), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]][[3]]))
+  g4 <- do.call("superpose", list(g41, g42))
+  g4 at Call <- call("superpose", g41 at Call, g42 at Call)
+  g4 <- do.call("superpose", list(g4, g43))
+  g4 at Call <- call("superpose", g4 at Call, g43 at Call)
+  g5 <- do.call("s.arrow", c(list(dfxy = substitute(x$l1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[5]])) 
+  g6 <- do.call("s.arrow", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[6]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 2, 3, 4, 4, 5, 4, 4, 6), 3, 3)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4, g5, g6), positions = layout2position(lay), add = matrix(0, ncol = 6, nrow = 6), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.betrlq" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "betrlq")) 
+    stop("Object of class 'betrlq' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf)
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")
+  
+  appel <- as.list(x$call)
+  fac <- eval.parent(appel$fac)
+  
+  ## sort parameters for each graph
+  graphsnames <- c("Rrow", "Qrow", "Rax", "Rloadings", "Qloadings", "Qax", "eig")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "R row scores and classes"), plabels = list(cex = 1.25))
+  params[[2]] <- list(psub = list(text = "Q row scores"), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Unconstrained axes (R)"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[4]] <- list(psub = list(text = "R loadings"), plabels = list(cex = 1.25))
+  params[[5]] <- list(psub = list(text = "Q loadings"), plabels = list(cex = 1.25))
+  params[[6]] <- list(psub = list(text = "Unconstrained axes (Q)"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[7]] <- list(psub = list(text = "Eigenvalues"))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.class", c(list(dfxy = substitute(x$lsR), fac = appel$fac, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s.label", c(list(dfxy = substitute(x$lQ), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("s.corcircle", c(list(dfxy = substitute(x$aR), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s.arrow", c(list(dfxy = substitute(x$l1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  g5 <- do.call("s.arrow", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[6]]))
+  g6 <- do.call("s.corcircle", c(list(dfxy = substitute(x$aQ), xax, yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[5]]))
+  g7 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[7]])) 
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 1, 3, 1, 1, 4, 2, 2, 5, 2, 2, 6, 0, 0, 7), 3, 5)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4, g5, g6, g7), positions = layout2position(lay), add = matrix(0, ncol = 7, nrow = 7), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.between" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "between")) 
+    stop("Object of class 'between' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf)
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")
+  
+  appel <- as.list(x$call)
+  fac <- eval.parent(appel$fac)
+  
+  ## sort parameters for each graph
+  graphsnames <- c("loadings", "col", "eig", "row", "Xax", "class")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "Loadings"), plabels = list(cex = 1.25))
+  params[[2]] <- list(psub = list(text = "Columns"), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Eigenvalues"))
+  params[[4]] <- list(psub = list(text = "Row scores and classes"), plabels = list(cex = 1.25))
+  params[[5]] <- list(psub = list(text = "Unconstrained axes"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[6]] <- list(psub = list(text = "Classes"), plabels = list(cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.arrow", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s.arrow", c(list(dfxy = substitute(x$co), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]])) 
+  g4 <- do.call("s.class", c(list(dfxy = substitute(x$ls), fac = appel$fac, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  g5 <- do.call("s.corcircle", c(list(dfxy = substitute(x$as), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[5]]))
+  g6 <- do.call("s.label", c(list(dfxy = substitute(x$li), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[6]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 2, 3, 4, 4, 5, 4, 4, 6), 3, 3)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4, g5, g6), positions = layout2position(lay), add = matrix(0, ncol = 6, nrow = 6), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.discrimin" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "discrimin")) 
+    stop("Object of class 'discrimin' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf)
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")
+  
+  appel <- as.list(x$call)
+  fac <- eval.parent(appel$fac)
+  
+  ## sort parameters for each graph  
+  graphsnames <- c("loadings", "col", "eig", "row", "Xax", "class")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "Loadings"), plabels = list(cex = 1.25))
+  params[[2]] <- list(psub = list(text = "Columns"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Eigenvalues"))
+  params[[4]] <- list(psub = list(text = "Row scores and classes"), plabels = list(cex = 1.25))
+  params[[5]] <- list(psub = list(text = "Unconstrained axes"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[6]] <- list(psub = list(text = "Classes scores"), plabels = list(cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.arrow", c(list(dfxy = substitute(x$fa), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s.corcircle", c(list(dfxy = substitute(x$va), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]])) 
+  g4 <- do.call("s.class", c(list(dfxy = substitute(x$li), fac = appel$fac, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  g5 <- do.call("s.corcircle", c(list(dfxy = substitute(x$cp), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[5]]))
+  g6 <- do.call("s.label", c(list(dfxy = substitute(x$gc), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[6]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 2, 3, 4, 4, 5, 4, 4, 6), 3, 3)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4, g5, g6), positions = layout2position(lay), add = matrix(0, ncol = 6, nrow = 6), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.within" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "within")) 
+    stop("Object of class 'within' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf) 
+    stop("Non convenient xax")
+  if(yax > x$nf) 
+    stop("Non convenient yax")
+  
+  appel <- as.list(x$call)
+  fac <- eval.parent(appel$fac)
+  
+  ## sort parameters for each graph
+  graphsnames <- c("loadings", "col", "eig", "row", "Xax", "ccrow")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "Loadings"), plabels = list(cex = 1.25))
+  params[[2]] <- list(psub = list(text = "Columns"), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Eigenvalues"))
+  params[[4]] <- list(psub = list(text = "Row scores and classes"), plabels = list(cex = 1.25))
+  params[[5]] <- list(psub = list(text = "Unconstrained axes"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[6]] <- list(psub = list(text = "Row scores (common centring)"), pellipses = list(axes = list(draw = FALSE)), plines = list(lwd = 0), plabels = list(alpha = 0, boxes = list(draw = FALSE), cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.arrow", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s.arrow", c(list(dfxy = substitute(x$co), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s.class", c(list(dfxy = substitute(x$ls), fac = appel$fac, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  g5 <- do.call("s.corcircle", c(list(dfxy = substitute(x$as), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[5]]))
+  g6 <- do.call("s.class", c(list(dfxy = substitute(x$li), fac = appel$fac, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[6]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 2, 3, 4, 4, 5, 4, 4, 6), 3, 3)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4, g5, g6), positions = layout2position(lay), add = matrix(0, ncol = 6, nrow = 6), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.witcoi" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "witcoi"))
+    stop("Object of class 'witcoi' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf)
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")
+  
+  appel <- as.list(x$call)
+  fac <- eval.parent(appel$fac)
+  
+  ## sort parameters for each graph
+  graphsnames <- c("Xax", "Yax", "eig", "XYmatch", "Yloadings", "Xloadings")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames, nbsubgraphs = c(1, 1, 1, 3, 1, 1))
+  
+  ## compute limits for the ADEgS (two s.class and one s.match)
+  mat <- rbind(x$msX, x$msY, x$mX)
+  minmat <- apply(mat, 2, min)
+  maxmat <- apply(mat, 2, max)
+  limdefault <- setlimits2D(minmat[1], maxmat[1], minmat[2], maxmat[2], origin = c(0, 0), includeOr = TRUE)     
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "Unconstrained axes (X)"), plabels = list(cex = 1.25))
+  params[[2]] <- list(psub = list(text = "Unconstrained axes (Y)"), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Eigenvalues"))
+  params[[4]] <- list()
+  params[[4]]$l1 <- list(psub = list(text = "Row scores (X -> Y)"), xlim = limdefault$xlim, ylim = limdefault$ylim, chullSize = 1, ppoints = list(pch = 16, cex = 0.5), plabels = list(alpha = 0, boxes = list(draw = FALSE)), ppolygon = list(lwd = 0.5, alpha = 0.2), pellipses = list(alpha = 0.0, axes = list(draw = FALSE)), col = adegpar()$ppalette$quali(nlevels(fac)))
+  params[[4]]$l2 <- list(xlim = limdefault$xlim, ylim = limdefault$ylim, chullSize = 1, ppoints = list(pch = 15, cex = 0.5), plabels = list(alpha = 0, boxes = list(draw = FALSE)), ppolygon = list(lwd = 0.5, alpha = 0.2), pellipses = list(alpha = 0.0, axes = list(draw = FALSE)), col = adegpar()$ppalette$quali(nlevels(fac)))
+  params[[4]]$l3 <- list(xlim = limdefault$xlim, ylim = limdefault$ylim, ppoints = list(cex = 0.7), plines = list(lwd = 2), plabels = list(alpha = 1, boxes = list(draw = TRUE), cex = 1.25))
+  params[[5]] <- list(psub = list(text = "Y loadings"), plabels = list(cex = 1.25))
+  params[[6]] <- list(psub = list(text = "X loadings"), plabels = list(cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.arrow", c(list(dfxy = substitute(x$aX), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s.arrow", c(list(dfxy = substitute(x$aY), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))  
+  g3 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]])) 
+  g41 <- do.call("s.class", c(list(dfxy = substitute(x$msX), fac = appel$fac, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]][[1]]))
+  g42 <- do.call("s.class", c(list(dfxy = substitute(x$msY), fac = appel$fac, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]][[2]]))
+  g43 <- do.call("s.match", c(list(dfxy1 = g41 at stats$means, dfxy2 = g42 at stats$means, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]][[3]]))
+  g4 <- do.call("superpose", list(g41, g42))
+  g4 at Call <- call("superpose", g41 at Call, g42 at Call)
+  g4 <- do.call("superpose", list(g4, g43))
+  g4 at Call <- call("superpose", g4 at Call, g43 at Call)
+  g5 <- do.call("s.arrow", c(list(dfxy = substitute(x$l1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[5]]))
+  g6 <- do.call("s.arrow", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[6]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 2, 3, 4, 4, 5, 4, 4, 6), 3, 3)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4, g5, g6), positions = layout2position(lay), add = matrix(0, ncol = 6, nrow = 6), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.witrlq" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "witrlq"))
+    stop("Object of class 'witrlq' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf)
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")
+  
+  appel <- as.list(x$call)
+  fac <- eval.parent(appel$fac)
+  
+  ## sort parameters for each graph
+  graphsnames <- c("Rrow", "Qrow", "Rax", "Rloadings", "Qloadings", "Qax", "eig")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "R row scores and classes"), plabels = list(cex = 1.25))
+  params[[2]] <- list(psub = list(text = "Q row scores"), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Unconstrained axes (R)"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[4]] <- list(psub = list(text = "R loadings"), plabels = list(cex = 1.25))
+  params[[5]] <- list(psub = list(text = "Q loadings"), plabels = list(cex = 1.25))
+  params[[6]] <- list(psub = list(text = "Unconstrained axes (Q)"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[7]] <- list(psub = list(text = "Eigenvalues"))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.class", c(list(dfxy = substitute(x$lsR), fac = appel$fac, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s.label", c(list(dfxy = substitute(x$lQ), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("s.corcircle", c(list(dfxy = substitute(x$aR), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s.arrow", c(list(dfxy = substitute(x$l1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  g5 <- do.call("s.arrow", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[6]]))
+  g6 <- do.call("s.corcircle", c(list(dfxy = substitute(x$aQ), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[5]]))
+  g7 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[7]])) 
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 1, 3, 1, 1, 4, 2, 2, 5, 2, 2, 6, 0, 0, 7), 3, 5)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4, g5, g6, g7), positions = layout2position(lay), add = matrix(0, ncol = 7, nrow = 7), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.dpcoa" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "dpcoa")) 
+    stop("Object of class 'dpcoa' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf) 
+    stop("Non convenient xax")
+  if(yax > x$nf) 
+    stop("Non convenient yax")
+  
+  appel <- as.list(x$call)
+  dfX <- appel$df
+  
+  ## sort parameters for each graph
+  graphsnames <- c("axes", "categories", "categcoll", "collections")
+  
+  vec <- c(2, 1, 1, 1)
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames, nbsubgraphs = vec)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list()
+  params[[1]]$l1 <- list(psub = list(text = "Principal axes", position = "topleft"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[1]]$l2 <- list(psub = list(text = "Eigenvalues"), pbackground = list(box = TRUE))
+  params[[2]] <- list(psub = list(text = "Categories"), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Categories and collections"), ppoints = list(pch = 16, cex = 1.2), plines = list(col = "transparent"), pellipses = list(axes = list(draw = FALSE)), ellipseSize = 1, plabels = list(cex = 1.25))
+  if(!is.null(x$RaoDiv))
+    params[[4]] <- list(psub = list(text = "Rao Divcs", position = "topleft"))
+  else
+    params[[4]] <- list(psub = list(text = "Collections", position = "bottomleft"))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g11 <- do.call("s.corcircle", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]][[1]]))
+  g12 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]][[2]]))
+  g1 <- do.call("insert", list(g12 at Call, g11 at Call, posi = "bottomleft", plot = FALSE, ratio = 0.25, inset = 0))
+  g2 <- do.call("s.label", c(list(dfxy = substitute(x$dls), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("s.distri", c(list(dfxy = substitute(x$dls), dfdistri = substitute(t(dfX)), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  if(!is.null(x$RaoDiv))
+    g4 <- do.call("s.value", c(list(dfxy = substitute(x$li), z = substitute(x$RaoDiv), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  else
+    g4 <- do.call("s.label", c(list(dfxy = substitute(x$li), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  ## ADEgS creation
+  
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4), positions = layout2position(matrix(c(1, 2, 3, 4), 2, 2)), add = matrix(0, ncol = 4, nrow = 4), Call = match.call())
+  
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.betdpcoa" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!(inherits(x, "betdpcoa") | inherits(x, "betwitdpcoa"))) 
+    stop("Object of class 'betdpcoa' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf) 
+    stop("Non convenient xax")
+  if(yax > x$nf) 
+    stop("Non convenient yax")
+  
+  appel <- as.list(x$call)
+  dfX <- as.list(eval.parent(appel$x)$call)$df
+  
+  ## sort parameters for each graph
+  graphsnames <- c("axes", "class", "categories", "Xax")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames, nbsubgraphs = c(2, 1, 1, 1))
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list()
+  params[[1]]$l1 <- list(psub = list(text = "Principal axes", position = "topleft"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[1]]$l2 <- list(psub = list(text = "Eigenvalues"), pbackground = list(box = TRUE))
+  params[[2]] <- list(psub = list(text = "Classes and collections"), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Categories and collections"), ppoints = list(pch = 16, cex = 1.2), plines = list(col = "transparent"), pellipses = list(axes = list(draw = FALSE)), ellipseSize = 1, plabels = list(cex = 1.25))
+  params[[4]] <- list(psub = list(text = "Unconstrained axes"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g11 <- do.call("s.corcircle", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]][[1]]))
+  g12 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]][[2]]))
+  g1 <- do.call("insert", list(g12 at Call, g11 at Call, posi = "bottomleft", plot = FALSE, ratio = 0.25, inset = 0))
+  g2 <- do.call("s.class", c(list(dfxy = substitute(x$ls), fac = appel$fac, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("s.distri", c(list(dfxy = substitute(x$dls), dfdistri = substitute(t(dfX)), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s.corcircle", c(list(dfxy = substitute(x$as), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4), positions = layout2position(matrix(c(1, 2, 3, 4), 2, 2)), add = matrix(0, ncol = 4, nrow = 4), Call = match.call())
+  
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.witdpcoa" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "witdpcoa")) 
+    stop("Object of class 'witdpcoa' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf) 
+    stop("Non convenient xax")
+  if(yax > x$nf) 
+    stop("Non convenient yax")
+  
+  appel <- as.list(x$call)
+  dfX <- as.list(eval.parent(appel$x)$call)$df
+  
+  ## sort parameters for each graph
+  graphsnames <- c("axes", "class", "categories", "Xax")  
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames, nbsubgraphs = c(2, 1, 1, 1))
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list()
+  params[[1]]$l1 <- list(psub = list(text = "Principal axes", position = "topleft"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[1]]$l2 <- list(psub = list(text = "Eigenvalues"), pbackground = list(box = TRUE))
+  params[[2]] <- list(psub = list(text = "Classes and collections"), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Categories and collections"), ppoints = list(pch = 16, cex = 1.2), plines = list(col = "transparent"), pellipses = list(axes = list(draw = FALSE)), ellipseSize = 1, plabels = list(cex = 1.25))
+  params[[4]] <- list(psub = list(text = "Unconstrained axes"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g11 <- do.call("s.corcircle", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]][[1]]))
+  g12 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]][[2]]))
+  g1 <- do.call("insert", list(g12 at Call, g11 at Call, posi = "bottomleft", plot = FALSE, ratio = 0.25, inset = 0))
+  g2 <- do.call("s.class", c(list(dfxy = substitute(x$ls), fac = appel$fac, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("s.distri", c(list(dfxy = substitute(x$dls), dfdistri = substitute(t(dfX)), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s.corcircle", c(list(dfxy = substitute(x$as), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4), positions = layout2position(matrix(c(1, 2, 3, 4), 2, 2)), add = matrix(0, ncol = 4, nrow = 4), Call = match.call())
+  
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.betwitdpcoa" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "betwitdpcoa")) 
+    stop("Object of class 'betwitdpcoa' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf) 
+    stop("Non convenient xax")
+  if(yax > x$nf) 
+    stop("Non convenient yax")
+  
+  appel <- as.list(x$call)
+  dfX <- as.list(eval.parent(appel$x)$call)$df
+  
+  ## sort parameters for each graph
+  graphsnames <- c("axes", "class", "categories", "Xax")  
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames, nbsubgraphs = c(2, 1, 1, 1))
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list()
+  params[[1]]$l1 <- list(psub = list(text = "Principal axes", position = "topleft"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[1]]$l2 <- list(psub = list(text = "Eigenvalues"), pbackground = list(box = TRUE))
+  params[[2]] <- list(psub = list(text = "Classes and collections"), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Categories and collections"), ppoints = list(pch = 16, cex = 1.2), plines = list(col = "transparent"), pellipses = list(axes = list(draw = FALSE)), ellipseSize = 1, plabels = list(cex = 1.25))
+  params[[4]] <- list(psub = list(text = "Unconstrained axes"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g11 <- do.call("s.corcircle", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]][[1]]))
+  g12 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]][[2]]))
+  g1 <- do.call("insert", list(g12 at Call, g11 at Call, posi = "bottomleft", plot = FALSE, ratio = 0.25, inset = 0))
+  g2 <- do.call("s.class", c(list(dfxy = substitute(x$ls), fac = appel$fac, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("s.distri", c(list(dfxy = substitute(x$dls), dfdistri = substitute(t(dfX)), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s.corcircle", c(list(dfxy = substitute(x$as), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4), positions = layout2position(matrix(c(1, 2, 3, 4), 2, 2)), add = matrix(0, ncol = 4, nrow = 4), Call = match.call())
+  
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.mcoa" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "mcoa")) 
+    stop("Object of class 'mcoa' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf) 
+    stop("Non convenient xax")
+  if(yax > x$nf) 
+    stop("Non convenient yax")
+  
+  ## prepare - TODO find better Call for rownames and colnames 
+  coolig <- call("as.data.frame", call("matrix", call("kronecker", rep(1, nrow(x$cov2)), substitute(as.matrix(x$SynVar))), nrow = nrow(x$Tl1), ncol = ncol(x$Tl1), dimnames = list(rownames(x$Tl1), colnames(x$Tl1))))
+  
+  ## sort parameters for each graph
+  graphsnames <- c("row", "axes", "col", "pseudoeig")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames, nbsubgraphs = c(2, 2, 1, 1))
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list()
+  params[[1]]$l1 <- list(psub = list(text = "Rows"), parrows = list(angle = 0), plabels = list(alpha = 0, boxes = list(draw = FALSE)))
+  params[[1]]$l2 <- list(plabels = list(cex = 1.25))
+  params[[2]] <- list()
+  params[[2]]$l1 <- list(psub = list(text = "Axes (separate analyses)", position = "topleft"), pbackground = list(box = FALSE), fullcircle = FALSE, plabels = list(cex = 1.25))
+  params[[2]]$l2 <- list(psub = list(text = "Eigenvalues"), pbackground = list(box = TRUE))
+  params[[3]] <- list(psub = list(text = "Columns"), plabels = list(cex = 1.25))
+  params[[4]] <- list(porigin = list(include = FALSE), paxes = list(aspectratio = "fill", draw = TRUE), main = "Pseudo eigenvalues", xlab = "cov21", ylab = "cov22", plabels = list(cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g11 <- do.call("s.match", c(list(dfxy1 = substitute(x$Tl1), dfxy2 = coolig, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]][[1]]))
+  g12 <- do.call("s.label", c(list(dfxy = substitute(x$SynVar), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]][[2]]))
+  g1 <- do.call("superpose", list(g11, g12))
+  g1 at Call <- call("superpose", g11 at Call, g12 at Call)
+  g21 <- do.call("s.corcircle", c(list(dfxy = substitute(x$Tax[x$T4[, 2] == 1, ]), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]][[1]]))
+  g22 <- do.call("plotEig", c(list(eigvalue = substitute(x$pseudoeig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]][[2]]))
+  g2 <- do.call("insert", list(g22 at Call, g21 at Call, posi = "bottomleft", plot = FALSE, ratio = 0.25, inset = 0))
+  g3 <- do.call("s.arrow", c(list(dfxy = substitute(x$Tco), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s.label", c(list(dfxy = substitute(x$cov2), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 2, 3, 4), 2, 2)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4), positions = layout2position(lay), add = matrix(0, ncol = 4, nrow = 4), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.foucart" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "foucart"))
+    stop("Object of class 'foucart' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf)
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")
+  
+  ## sort parameters for each graph
+  graphsnames <- c("rowB", "colB", "row", "col")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## compute limits
+  df <- rbind(as.matrix(x$li), as.matrix(x$Tli), as.matrix(x$Tco))
+  adegtot <- adegpar()
+  lim.global <- setlimits2D(minX = min(df[, xax]), maxX = max(df[, xax]), minY = min(df[, yax]), maxY = max(df[, yax]), origin = adegtot$porigin$origin, aspect.ratio = adegtot$paxes$aspectratio, includeOr = adegtot$porigin$include)
+  
+  ## pdefault values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "Rows (Base)"), xlim = lim.global$xlim, ylim = lim.global$ylim, plabels = list(cex = 1.25))
+  params[[2]] <- list(psub = list(text = "Columns (Base)"), xlim = lim.global$xlim, ylim = lim.global$ylim, plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Rows"), xlim = lim.global$xlim, ylim = lim.global$ylim, pellipses = list(axes = list(draw = FALSE)))
+  params[[4]] <- list(psub = list(text = "Columns"), xlim = lim.global$xlim, ylim = lim.global$ylim, pellipses = list(axes = list(draw = FALSE)), plabels = list(cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.label", c(list(dfxy = substitute(x$li), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s.label", c(list(dfxy = substitute(x$co), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("s.class", c(list(dfxy = substitute(x$Tli), fac = substitute(x$TL[, 2]), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s.class", c(list(dfxy = substitute(x$Tco), fac = substitute(x$TC[, 2]), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 3, 2, 4), 2, 2)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4), positions = layout2position(lay), add = matrix(0, ncol = 4, nrow = 4), Call = match.call())
+  names(object) <- graphsnames
+  if(plot) 
+    print(object)
+  invisible(object)  
+}
+
+
+"plot.mfa" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "mfa")) 
+    stop("Object of class 'mfa' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf) 
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")
+  
+  ## sort parameters for each graph
+  graphsnames <- c("row", "comp", "col", "link")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames, nbsubgraphs = c(1, 2, 1, 1))
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "Rows"), pellipses = list(alpha = 0, axes = list(draw = FALSE)), label = row.names(x$li), plabels = list(cex = 1.25))
+  params[[2]] <- list()
+  params[[2]]$l1 <- list(psub = list(text = "Components (separate analyses)", position = "topleft"), pbackground = list(box = FALSE), fullcircle = FALSE, plabels = list(cex = 1.25))
+  params[[2]]$l2 <- list(psub = list(text = "Eigenvalues"), pbackground = list(box = TRUE))
+  params[[3]] <- list(psub = list(text = "Columns"), plabels = list(cex = 1.25))
+  params[[4]] <- list(porigin = list(include = FALSE), paxes = list(aspectratio = "fill", draw = TRUE), main = "Link", xlab = "Comp1", ylab = "Comp2", plabels = list(cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.class", c(list(dfxy = substitute(x$lisup), fac = substitute(as.factor(x$TL[, 2])), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g21 <- do.call("s.corcircle", c(list(dfxy = substitute(x$T4comp[x$T4[, 2] == 1, ]), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]][[1]]))
+  g22 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]][[2]]))
+  g2 <- do.call("insert", list(g22 at Call, g21 at Call, posi = "bottomleft", plot = FALSE, inset = 0, ratio = 0.2))
+  g3 <- do.call("s.arrow", c(list(dfxy = substitute(x$co), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s.label", c(list(dfxy = substitute(x$link), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 2, 3, 4), 2, 2)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4), positions = layout2position(lay), add = matrix(0, ncol = 4, nrow = 4), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.multispati" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "multispati")) 
+    stop("Object of class 'multispati' expected")
+  if((xax == yax) || ((x$nfposi + x$nfnega) == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > (x$nfposi + x$nfnega)) 
+    stop("Non convenient xax")
+  if(yax > (x$nfposi + x$nfnega)) 
+    stop("Non convenient yax")
+  
+  ## sort parameters for each graph
+  graphsnames <- c("row", "eig", "loadings", "Xax")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "Scores and lag scores"))
+  params[[2]] <- list(psub = list(text = "Eigenvalues"), paxes = list(draw = TRUE, x = list(draw = FALSE), y = list(draw = TRUE)))
+  params[[3]] <- list(psub = list(text = "Loadings"))
+  params[[4]] <- list(psub = list(text = "Unconstrained axes"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.match", c(list(dfxy1 = substitute(x$li), dfxy2 = substitute(x$ls), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = c(1:x$nfposi, length(x$eig):(length(x$eig) - x$nfnega + 1)), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("s.arrow", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s.corcircle",c(list(dfxy = substitute(x$as), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  
+  ## ADEgS creation
+  lay <-  matrix(c(rep(0, 4), 2, 2, rep(1, 4), 2, 2, rep(1, 4), 3, 3, rep(1, 4), 3, 3, rep(1, 4), 4, 4, rep(0, 4), 4, 4), 6, 6) 
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4), positions = layout2position(lay), add = matrix(0, ncol = 4, nrow = 4), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)   
+}
+
+
+"plot.niche" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "niche")) 
+    stop("Object of class 'niche' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf) 
+    stop("Non convenient xax")
+  if(yax > x$nf) 
+    stop("Non convenient yax")
+  
+  ## sort parameters for each graph
+  graphsnames <- c("Xax", "var", "eig", "species", "samples", "niches")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames, nbsubgraphs = c(1, 1, 1, 2, 1, 1))
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "Unconstrained axes"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[2]] <- list(psub = list(text = "Variables"), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Eigenvalues"))
+  params[[4]] <- list()
+  params[[4]]$l1 <- list(psub = list(text = "Samples and Species"), plabels = list(alpha = 0, boxes = list(draw = FALSE)))
+  params[[4]]$l2 <- list(plabels = list(cex = 1.25))
+  params[[5]] <- list(psub = list(text = "Samples"))
+  params[[6]] <- list(psub = list(text = "Niches"), plines = list(col = "transparent"), pellipses = list(axes = list(draw = FALSE)), ellipseSize = 1, plabels = list(alpha = 0, boxes = list(draw = FALSE)))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.corcircle", c(list(dfxy = substitute(x$as), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s.arrow", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]])) 
+  g41 <- do.call("s.label", c(list(dfxy = substitute(x$ls), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]][[1]]))
+  g42 <- do.call("s.label", c(list(dfxy = substitute(x$li), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]][[2]]))
+  g4 <- do.call("superpose", list(g41, g42))
+  g4 at Call <- call("superpose", g41 at Call, g42 at Call)
+  g5 <- do.call("s.label", c(list(dfxy = substitute(x$ls), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[5]]))
+  g6 <- do.call("s.distri", c(list(dfxy = substitute(x$ls), dfdistri = as.list(x$call)[[3]], xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[6]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 2, 3, 4, 4, 5, 4, 4, 6), 3, 3)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4, g5, g6), positions = layout2position(lay), add = matrix(0, ncol = 6, nrow = 6), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.procuste" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "procuste")) 
+    stop("Object of class 'procuste' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf) 
+    stop("Non convenient xax")
+  if(yax > x$nf) 
+    stop("Non convenient yax")
+  
+  ## sort parameters for each graph
+  graphsnames <- c("Xloadings", "Yloadings", "eig", "XYmatch", "Xrow", "Yrow")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "X loadings"), plabels = list(cex = 1.25))
+  params[[2]] <- list(psub = list(text = "Y loadings"), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Eigenvalues"))
+  params[[4]] <- list(psub = list(text = "Row scores (X -> Y)"))
+  params[[5]] <- list(psub = list(text = "X row scores"))
+  params[[6]] <- list(psub = list(text = "Y row scores"))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.arrow", c(list(dfxy = substitute(x$loadX), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s.arrow", c(list(dfxy = substitute(x$loadY), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("plotEig", c(list(eigvalue = substitute(x$d^2), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]])) 
+  g4 <- do.call("s.match", c(list(dfxy1 = substitute(x$scorX), dfxy2 = substitute(x$scorY), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  g5 <- do.call("s.label", c(list(dfxy = substitute(x$scorX), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[5]]))
+  g6 <- do.call("s.label", c(list(dfxy = substitute(x$scorY), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[6]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 2, 3, 4, 4, 5, 4, 4, 6), 3, 3)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4, g5, g6), positions = layout2position(lay), add = matrix(0, ncol = 6, nrow = 6), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.rlq" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "rlq")) 
+    stop("Object of class 'rlq' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf)
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")
+  
+  appel <- as.list(x$call)
+  fac <- eval.parent(appel$fac)
+  
+  ## sort parameters for each graph
+  graphsnames <- c("Rrow", "Qrow", "Rax", "Rloadings","Qloadings", "Qax", "eig")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "R row scores"), plabels = list(cex = 1.25))
+  params[[2]] <- list(psub = list(text = "Q row scores"), plabels = list(cex = 1.25))
+  params[[3]] <- list(psub = list(text = "Unconstrained axes (R)"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[4]] <- list(psub = list(text = "R loadings"))
+  params[[5]] <- list(psub = list(text = "Unconstrained axes (Q)"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[6]] <- list(psub = list(text = "Q loadings"))
+  params[[7]] <- list(psub = list(text = "Eigenvalues"))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.label", c(list(dfxy = substitute(x$lR), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s.label", c(list(dfxy = substitute(x$lQ), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("s.corcircle", c(list(dfxy = substitute(x$aR), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s.arrow", c(list(dfxy = substitute(x$l1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  g5 <- do.call("s.corcircle", c(list(dfxy = substitute(x$aQ), xax, yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[5]]))
+  g6 <- do.call("s.arrow", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[6]]))
+  g7 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[7]])) 
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 1, 3, 1, 1, 4, 2, 2, 5, 2, 2, 6, 0, 0, 7), 3, 5)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4, g6, g5, g7), positions = layout2position(lay), add = matrix(0, ncol = 7, nrow = 7), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.pta" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "pta")) 
+    stop("Object of class 'pta' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf) 
+    stop("Non convenient xax")
+  if(yax > x$nf) 
+    stop("Non convenient yax")
+  
+  ## prepare
+  dfxy <- substitute(matrix(c(x$tabw, x$cos2), nrow = length(x$tabw), ncol = 2, dimnames = list(rownames(x$RV))))
+  
+  ## sort parameters for each graph
+  graphsnames <- c("inter", "col", "row", "typo")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames, nbsubgraphs = c(2, 1, 2, 1))
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list()
+  params[[1]]$l1 <- list(psub = list(text = "Interstructure", position = "topleft"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[1]]$l2 <- list(psub = list(text = "Eigenvalues"), pbackground = list(box = TRUE), p1d = list(horizontal = FALSE))
+  params[[2]] <- list(psub = list(text = "Columns (compromise)", position = "topleft"), plabels = list(cex = 1.25))
+  params[[3]] <- list()
+  params[[3]]$l1 <- list(psub = list(text = "Rows (compromise)", position = "topleft"), plabels = list(cex = 1.25))
+  params[[3]]$l2 <- list(psub = list(text = "Eigenvalues"), pbackground = list(box = TRUE), p1d = list(horizontal = FALSE))
+  params[[4]] <- list(porigin = list(include = FALSE), paxes = list(aspectratio = "fill", draw = TRUE), main = "Typological value", xlab = "Tables weights", ylab = "Cos 2", plabels = list(cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g11 <- do.call("s.corcircle", c(list(dfxy = substitute(x$RV.coo), xax = 1, yax = 2, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]$l1))
+  g12 <- do.call("plotEig", c(list(eigvalue = substitute(x$RV.eig), nf = 1:length(x$RV.eig), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]$l2))
+  g1 <- do.call("insert", list(g12 at Call, g11 at Call, posi = "bottomleft", plot = FALSE, ratio = 0.25, inset = 0))
+  g2 <- do.call("s.arrow", c(list(dfxy = substitute(x$co), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g31 <- do.call("s.label", c(list(dfxy = substitute(x$li), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]$l1))
+  g32 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]$l2))
+  g3 <- do.call("insert", list(g32 at Call, g31 at Call, posi = "bottomleft", plot = FALSE, ratio = 0.25, inset = 0))
+  g4 <- do.call("s.label", c(list(dfxy = dfxy, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 2, 3, 4), 2, 2)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4), positions = layout2position(lay), add = matrix(0, ncol = 4, nrow = 4), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.sepan" <- function(x, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "sepan")) 
+    stop("Object of class 'sepan' expected")
+  
+  ## prepare 
+  facets <- substitute(reorder(as.factor(rep(x$tab.names, x$rank)), rep(1:length(x$rank), x$rank)))
+  
+  ## default values for parameters
+  sortparameters <- sortparamADEg(...)
+  params <- list()
+  params$adepar <- list(pbackground = list(box = TRUE), pgrid = list(draw = TRUE, text = list(cex = 0)), paxes = list(draw = TRUE, x = list(draw = FALSE)))
+  if(isTRUE(sortparameters$adepar$p1d$horizontal))
+    params$g.args <- list(ylim = c(0, max(x$rank) + 1))
+  else
+    params$g.args <- list(xlim = c(0, max(x$rank) + 1))
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## ADEgS creation
+  object <- do.call("plotEig", c(list(eigvalue = substitute(x$Eig), nf = 1:ncol(x$Li), xax = 1, yax = 2, pos = pos, storeData = storeData, plot = FALSE, facets = facets), sortparameters$adepar, sortparameters$trellis, sortparameters$g.args))
+  object at Call <- match.call()
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.statis" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "statis")) 
+    stop("Object of class 'statis' expected")
+  if((xax == yax) || (x$C.nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$C.nf) 
+    stop("Non convenient xax")
+  if(yax > x$C.nf) 
+    stop("Non convenient yax")
+  
+  ## prepare
+  dfxy <- substitute(matrix(c(x$RV.tabw, x$cos2), nrow = length(x$RV.tabw), ncol = 2, dimnames = list(rownames(x$RV))))
+  
+  ## sort parameters for each graph
+  graphsnames <- c("inter", "typo", "row", "comp")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames, nbsubgraphs = c(1, 1, 2, 1))
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(psub = list(text = "Interstructure", position = "topleft"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  params[[2]] <- list(porigin = list(include = FALSE), paxes = list(aspectratio = "fill", draw = TRUE), main = "Typological Value", xlab = "Tables Weights", ylab = "Cos 2", plabels = list(cex = 1.25))
+  params[[3]] <- list()
+  params[[3]]$l1 <- list(psub = list(text = "Rows (compromise)", position = "topleft"), plabels = list(cex = 1.25))
+  params[[3]]$l2 <- list(psub = list(text = "Eigenvalues"), pbackground = list(box = TRUE))
+  params[[4]] <- list(psub = list(text = "Components (separate analyses)", position = "topleft"), pbackground = list(box = FALSE), plabels = list(cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.corcircle", c(list(dfxy = substitute(x$RV.coo), xax = 1, yax = 2, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s.label", c(list(dfxy = dfxy, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g31 <- do.call("s.label", c(list(dfxy = substitute(x$C.li), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]][[1]]))
+  g32 <- do.call("plotEig", c(list(eigvalue = substitute(x$C.eig), nf = 1:x$C.nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData), sortparameters[[3]][[2]]))
+  g3 <- do.call("insert", list(g32 at Call, g31 at Call, posi = "bottomleft", plot = FALSE, ratio = 0.25, inset = 0))
+  g4 <- do.call("s.corcircle", c(list(dfxy = substitute(x$C.T4[x$T4[, 2] == 1, ]), xax = 1, yax = 2, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(1, 2, 3, 4), 2, 2)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4), positions = layout2position(lay), add = matrix(0, ncol = 4, nrow = 4), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.multiblock" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "multiblock")) 
+    stop("Object of class 'multiblock' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf) 
+    stop("Non convenient xax")
+  if(yax > x$nf) 
+    stop("Non convenient yax")
+  
+  ## sort parameters for each graph
+  graphsnames <- c("Xrow", "eig", "cov2", "Ycol", "Xloadings")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]]<- list(psub = list(text = "Row scores (X)"), plabels = list(cex = 1.25))
+  params[[2]]<- list(psub = list(text = "Eigenvalues"))
+  params[[3]] <- list(psub = list(text = "Cov^2"), plabels = list(cex = 1.25))
+  params[[4]] <- list(psub = list(text = "Y columns"), plabels = list(cex = 1.25))
+  params[[5]] <- list(psub = list(text = "X loadings"), plabels = list(cex = 1.25))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s.label", c(list(dfxy = substitute(x$lX), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("s.arrow", c(list(dfxy = substitute(x$cov2), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s.arrow", c(list(dfxy = substitute(x$Yco), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  g5 <- do.call("s.arrow", c(list(dfxy = substitute(x$faX), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[5]]))
+  
+  ## ADEgS creation
+  lay <- matrix(c(rep(c(0, 0, 2, 2, 3, 3), 2), rep(c(rep(1, 4), 4, 4), 2), rep(c(rep(1, 4), 5, 5), 2)), 6, 6)
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4, g5), positions = layout2position(lay), add = matrix(0, ncol = 5, nrow = 5), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.randxval" <- function(x, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "randxval")) 
+    stop("Object of class 'randxval' expected")
+  
+  ## Plot results 
+  graphsnames <- c("RMSEcMean", "RMSEcQuantiles", "RMSEvMean", "RMSEvQuantiles")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## compute common limits
+  lim <- range(x$stats)
+  origin <- if(is.null(sortparameters[[1]]$porigin)) list(origin = 0, include = FALSE) else sortparameters[[1]]$porigin
+  lim <- setlimits1D(lim[1], lim[2], origin = origin$origin[1], includeOr = origin$include)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(plines.col = "red", ppoints.col = "red", p1d.horizontal = FALSE, paxes.draw = TRUE, ppoints.cex = 2, ylab = "Root Mean Square Error", ylim = lim, porigin = origin)
+  params[[2]] <- list(plines.col = "red", ppoly.col = "red", p1d.horizontal = FALSE, paxes.draw = TRUE, method = "bars")
+  params[[3]] <- list(plines.col = "blue", ppoints.col = "blue", p1d.horizontal = FALSE, paxes.draw = TRUE, ppoints.cex = 2)
+  params[[4]] <- list(plines.col = "blue", ppoly.col = "blue", p1d.horizontal = FALSE, paxes.draw = TRUE, method = "bars")
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s1d.curve", c(list(score = substitute(x$stats[1, 1]), plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s1d.interval", c(list(score1 = substitute(x$stats[1, 2]), score2 = substitute(x$stats[1, 3]), plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("s1d.curve", c(list(score = substitute(x$stats[2, 1]), plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s1d.interval", c(list(score1 = substitute(x$stats[2, 2]), score2 = substitute(x$stats[2, 3]), plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  
+  ## ADEgS creation
+  add.mat <- matrix(0, nrow = 4, ncol = 4)
+  add.mat[upper.tri(add.mat)] <- 1
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4), positions = matrix(rep(c(0, 0, 1, 1), 4), nrow = 4, byrow = TRUE), add = add.mat, Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.krandxval" <- function(x, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "krandxval")) 
+    stop("Object of class 'krandxval' expected")
+  
+  ## Plot results 
+  graphsnames <- c("RMSEcMean", "RMSEcQuantiles", "RMSEvMean", "RMSEvQuantiles")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## compute common limits
+  lim <- range(x$statsRMSEc[, -1], x$statsRMSEv[, -1])
+  origin <- if(is.null(sortparameters[[1]]$porigin)) list(origin = 0, include = FALSE) else sortparameters[[1]]$porigin
+  lim <- setlimits1D(lim[1], lim[2], origin = origin$origin[1], includeOr = origin$include)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(plines.col = "red", ppoints.col = "red", p1d.horizontal = FALSE, paxes.draw = TRUE, ppoints.cex = 2, ylab = "Root Mean Square Error", ylim = lim, porigin = origin)
+  params[[2]] <- list(plines.col = "red", ppoly.col = "red", p1d.horizontal = FALSE, paxes.draw = TRUE, method = "area")
+  params[[3]] <- list(plines.col = "blue", ppoints.col = "blue", p1d.horizontal = FALSE, paxes.draw = TRUE, ppoints.cex = 2)
+  params[[4]] <- list(plines.col = "blue", ppoly.col = "blue", p1d.horizontal = FALSE, paxes.draw = TRUE, method = "area")
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s1d.curve", c(list(score = substitute(x$statsRMSEc[, 1]), key = list(corner = c(0,1), text = list(c("RMSEc", "RMSEv"), col = c(sortparameters[[1]]$plines.col, sortparameters[[3]]$plines.col))), plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s1d.interval", c(list(score1 = substitute(x$statsRMSEc[, 2]), score2 = substitute(x$statsRMSEc[, 3]), plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  g3 <- do.call("s1d.curve", c(list(score = substitute(x$statsRMSEv[, 1]), plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]]))
+  g4 <- do.call("s1d.interval", c(list(score1 = substitute(x$statsRMSEv[, 2]), score2 = substitute(x$statsRMSEv[, 3]), plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[4]]))
+  
+  ## ADEgS creation
+  add.mat <- matrix(0, nrow = 4, ncol = 4)
+  add.mat[upper.tri(add.mat)] <- 1
+  object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3, g4), positions = matrix(rep(c(0, 0, 1, 1), 4), nrow = 4, byrow = TRUE), add = add.mat, Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.randboot" <- function(x, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "randboot")) 
+    stop("Object of class 'randboot' expected")
+  
+  ## Plot results 
+  graphsnames <- c("obs", "quantiles")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## compute common limits
+  lim <- range(c(x$obs, x$stats))
+  origin <- if(is.null(sortparameters[[1]]$porigin)) list(origin = 0, include = FALSE) else sortparameters[[1]]$porigin
+  lim <- setlimits1D(lim[1], lim[2], origin = origin$origin[1], includeOr = origin$include)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(p1d.horizontal = FALSE, paxes.draw = TRUE, ppoints.cex = 2, ylim = lim, porigin = origin)
+  params[[2]] <- list(p1d.horizontal = FALSE, paxes.draw = TRUE, method = "bars")
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  g1 <- do.call("s1d.curve", c(list(score = substitute(x$obs), plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s1d.interval", c(list(score1 = substitute(x$stats[1]), score2 = substitute(x$stats[2]), plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  
+  ## ADEgS creation
+  object <- superpose(g1, g2)
+  object at Call <- match.call()
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.krandboot" <- function(x, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "krandboot")) 
+    stop("Object of class 'krandboot' expected")
+  
+  ## Plot results 
+  graphsnames <- c("obs", "quantiles")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## compute common limits
+  lim <- range(c(x$obs, range(x$stats)))
+  origin <- if(is.null(sortparameters[[1]]$porigin)) list(origin = 0, include = FALSE) else sortparameters[[1]]$porigin
+  lim <- setlimits1D(lim[1], lim[2], origin = origin$origin[1], includeOr = origin$include)
+  
+  ## default values for parameters
+  params <- list()
+  params[[1]] <- list(p1d.horizontal = FALSE, paxes.draw = TRUE, ppoints.cex = 2, ylim = lim, porigin = origin)
+  params[[2]] <- list(p1d.horizontal = FALSE, paxes.draw = TRUE, method = "bars")
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  lab <- list(list(labels = rownames(x$stats), rot = 90))
+  names(lab) <- ifelse(sortparameters[[1]]$p1d.horizontal == FALSE, "x", "y")
+  ## creation of each individual ADEg
+  g1 <- do.call("s1d.curve", c(list(score = substitute(x$obs), scales = lab, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+  g2 <- do.call("s1d.interval", c(list(score1 = substitute(x$stats[, 1]), score2 = substitute(x$stats[, 2]), plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+  
+  ## ADEgS creation
+  object <- superpose(g1, g2)
+  object at Call <- match.call()
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.inertia" <- function(x, xax = 1, yax = 2, cont = 0.1, type = c("label", "cross", "ellipse", "both"), ellipseSize = 1.5, 
+                           posieig = "none", plot = TRUE, storeData = TRUE, pos = -1, ...) { 
+  
+  if(!inherits(x, "inertia")) 
+    stop("Object of class 'inertia' expected")
+  
+  ## data management
+  ori <- as.list(x$call)
+  evTab <- eval.parent(ori[[2]])
+  
+  if(length(xax) > 1)
+    stop("Not implemented for multiple xax")
+  if(xax > evTab$nf)
+    stop("Non convenient xax")
+  
+  if(length(yax) > 1)
+    stop("Not implemented for multiple yax")
+  if(yax > evTab$nf)
+    stop("Non convenient yax") 
+  
+  adegtot <- adegpar()
+  position <- match.arg(posieig[1], choices = c("bottomleft", "bottomright", "topleft", "topright", "none"), several.ok = FALSE)
+  type <- match.arg(type)
+  
+  ## sort parameters for each graph
+  graphsnames <- c("light_row", "heavy_row", "light_col", "heavy_col", "eig")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## parameters management
+  adegtot <- adegpar()
+  params <- list()
+  params$light_row <- list(plabels = list(cex = 0), ppoints = list(col = "grey20", alpha = 0.45, cex = 1.2, pch = 19))
+  params$light_col <- list(plabels = list(cex = 0), ppoints = list(col = "grey20", alpha = 0.45, cex = 1.2, pch = 19))
+  
+  if(type == "label") {
+    params$heavy_row <- list(plabels = list(box = list(draw = FALSE), col = "red"), ppoints = list(cex = 0))
+    params$heavy_col <- list(plabels = list(box = list(draw = FALSE), col = "blue"), ppoints = list(cex = 0))
+  } else if(type == "cross") {
+    params$heavy_row <- list(ellipseSize = ellipseSize, plabels = list(box = list(draw = FALSE), col = "red"), ppoints = list(cex = 0), pellipses = list(lwd = 0, axes = list(col = "red", lty = 1)), plines = list(lwd = 0), plegend = list(drawKey = FALSE))
+    params$heavy_col <- list(ellipseSize = ellipseSize, plabels = list(box = list(draw = FALSE), col = "blue"), ppoints = list(cex = 0), pellipses = list(lwd = 0, axes = list(col = "blue", lty = 1)), plines = list(lwd = 0), plegend = list(drawKey = FALSE))
+  } else if(type == "ellipse") {
+    params$heavy_row <- list(ellipseSize = ellipseSize, plabels = list(box = list(draw = FALSE), col = "red"), ppoints = list(cex = 0), pellipses = list(border = "red", axes = list(lwd = 0)), plines = list(col = 0))
+    params$heavy_col <- list(ellipseSize = ellipseSize, plabels = list(box = list(draw = FALSE), col = "blue"), ppoints = list(cex = 0), pellipses = list(border = "blue", axes = list(lwd = 0)), plines = list(lwd = 0))
+  } else if(type == "both") {
+    params$heavy_row <- list(ellipseSize = 1.5, plabels = list(box = list(draw = FALSE), col = "red"), ppoints = list(cex = 0), pellipses = list(border = "red", axes = list(col = "red", lty = 1)), plines = list(lwd = 0))
+    params$heavy_col <- list(ellipseSize = 1.5, plabels = list(box = list(draw = FALSE), col = "blue"), ppoints = list(cex = 0), pellipses = list(border = "blue", axes = list(col = "blue", lty = 1)), plines = list(lwd = 0))
+  }
+  params$eig <- list(pbackground = list(box = TRUE), psub = list(text = "Eigenvalues"))
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+
+  ## management of the data and the parameters about the rows' contribution (individuals) on axes
+  if(!is.null(x$row.abs)) {
+    inertrow <- x$row.abs[, c(xax, yax)] / 100
+    inertrowcall <- call("/", call("[", call("$", substitute(x), "row.abs"), call(":", 1, call("NROW", call("$", substitute(x), "row.abs"))), c(xax, yax)), 100)
+    light_row <- subset(evTab$li[, c(xax, yax)], inertrow[, 1] < cont & inertrow[, 2] < cont)
+    light_rowcall <- call("subset", call("[", call("$", ori[[2]], "li"), call(":", 1, call("NROW", call("$", ori[[2]], "li"))), c(xax, yax)), call("&", call("<", call("[", inertrowcall, 1), cont), call("<", call("[", inertrowcall, 2), cont)))
+    
+    heavy_row <- subset(evTab$li[, c(xax, yax)], inertrow[, 1] >= cont | inertrow[, 2] >= cont)
+    if(nrow(heavy_row) == 0)
+      stop("No points to draw, try lowering 'cont'")
+    heavy_inertrow <- subset(inertrow, inertrow[, 1] >= cont | inertrow[, 2] >= cont)
+    heavy_inertrowcum <- apply(heavy_inertrow, 1, sum)
+    
+    if(type == "label"){
+      if(is.null(sortparameters$heavy_row$plabels$cex)) {
+        sortparameters$heavy_row$plabels$cex <- heavy_inertrowcum / (max(heavy_inertrowcum) / 1.5)
+      } else {
+        sortparameters$heavy_row$plabels$cex <- sortparameters$heavy_row$plabels$cex * heavy_inertrowcum / (max(heavy_inertrowcum) / 1.5)
+      }
+    }
+    
+    lim.global <- setlimits2D(minX = min(c(heavy_row[, 1], light_row[, 1])), maxX = max(c(heavy_row[, 1], light_row[, 1])), 
+                              minY = min(c(heavy_row[, 2], light_row[, 2])), maxY = max(c(heavy_row[, 2], light_row[, 2])),
+                              origin = adegtot$porigin$origin, aspect.ratio = adegtot$paxes$aspectratio, includeOr = adegtot$porigin$include)
+    
+    if(type != "label") {
+      # if ellipses or crosses are drawn, the limits are re-calculated and the elipses size are normalized
+      heavy_inertrowmax <- apply(heavy_inertrow, 2, max)
+      heavy_inertrownorm <- matrix(NA, NROW(heavy_inertrow), 2)
+      for (i in 1:2) {heavy_inertrownorm[, i] <- (heavy_inertrow[, i] / heavy_inertrowmax[i]) * (diff(lim.global[[i]]) / 10)}
+      
+      # TODO
+      # add 0.00001 to the coordinates to avoid the bug in the '.util.ellipse' function (waiting to correct it)
+      cont_row <- cbind(c(heavy_row[, 1] - heavy_inertrownorm[, 1]/2, heavy_row[, 1] + heavy_inertrownorm[, 1]/2, heavy_row[, 1], heavy_row[, 1] + 0.00001), 
+                        c(heavy_row[, 2] + 0.00001, heavy_row[, 2], heavy_row[, 2] - heavy_inertrownorm[, 2]/2, heavy_row[, 2] + heavy_inertrownorm[, 2]/2)) 
+      fac_row <- as.factor(rep(rownames(heavy_row), 4))
+      lim.global <- setlimits2D(minX = min(c(cont_row[, 1], light_row[, 1])), maxX = max(c(cont_row[, 1], light_row[, 1])), 
+                                minY = min(c(cont_row[, 2], light_row[, 2])), maxY = max(c(cont_row[, 2], light_row[, 2])),
+                                origin = adegtot$porigin$origin, aspect.ratio = adegtot$paxes$aspectratio, includeOr = adegtot$porigin$include)
+    }
+    
+    params <- list()
+    params$light_row <- list(xlim = lim.global$xlim, ylim = lim.global$ylim)
+    sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  }
+  
+  ## management of the data and the parameters about the columns' contribution (variables) on axes
+  if(!is.null(x$col.abs)) {
+    inertcol <- x$col.abs[, c(xax, yax)] / 100
+    inertcolcall <- call("/", call("[", call("$", substitute(x), "col.abs"), call(":", 1, call("NROW", call("$", substitute(x), "col.abs"))), c(xax, yax)), 100)
+    light_col <- subset(evTab$co[, c(xax, yax)], inertcol[, 1] < cont & inertcol[, 2] < cont)
+    light_colcall <- call("subset", call("[", call("$", ori[[2]], "co"), call(":", 1, call("NROW", call("$", ori[[2]], "co"))), c(xax, yax)), call("&", call("<", call("[", inertcolcall, 1), cont), call("<", call("[", inertcolcall, 2), cont)))
+    
+    heavy_col <- subset(evTab$co[, c(xax, yax)], inertcol[, 1] >= cont | inertcol[, 2] >= cont)
+    if(nrow(heavy_col) == 0)
+      stop("No points to draw, try lowering 'cont'")
+    heavy_inertcol <- subset(inertcol, inertcol[, 1] >= cont | inertcol[, 2] >= cont)
+    heavy_inertcolcum <- apply(heavy_inertcol, 1, sum)
+    
+    if(type == "label") {
+      if(is.null(sortparameters$heavy_col$plabels$cex)) {
+        sortparameters$heavy_col$plabels$cex <- heavy_inertcolcum / (max(heavy_inertcolcum) / 1.5)
+      } else {
+        sortparameters$heavy_col$plabels$cex <- sortparameters$heavy_col$plabels$cex * heavy_inertcolcum / (max(heavy_inertcolcum) / 1.5)
+      }
+    }
+    
+    lim.global <- setlimits2D(minX = min(c(heavy_col[, 1], light_col[, 1])), maxX = max(c(heavy_col[, 1], light_col[, 1])), 
+                              minY = min(c(heavy_col[, 2], light_col[, 2])), maxY = max(c(heavy_col[, 2], light_col[, 2])),
+                              origin = adegtot$porigin$origin, aspect.ratio = adegtot$paxes$aspectratio, includeOr = adegtot$porigin$include)
+    
+    if(type != "label") {
+      # if ellipses or crosses are drawn, the limits are re-calculated and the elipse size are normalized
+      heavy_inertcolmax <- apply(heavy_inertcol, 2, max)
+      heavy_inertcolnorm <- matrix(NA, NROW(heavy_inertcol), 2)
+      for (i in 1:2) {heavy_inertcolnorm[, i] <- (heavy_inertcol[, i] / heavy_inertcolmax[i]) * (diff(lim.global[[i]]) / 10)}
+      
+      # TODO
+      # add 0.00001 to the coordinates to avoid the bug in the '.util.ellipse' function (waiting to correct it)
+      cont_col <- cbind(c(heavy_col[, 1] - heavy_inertcolnorm[, 1]/2, heavy_col[, 1] + heavy_inertcolnorm[, 1]/2, heavy_col[, 1], heavy_col[, 1] + 0.00001), 
+                        c(heavy_col[, 2] + 0.00001, heavy_col[, 2], heavy_col[, 2] - heavy_inertcolnorm[, 2]/2, heavy_col[, 2] + heavy_inertcolnorm[, 2]/2))  
+      fac_col <- as.factor(rep(rownames(heavy_col), 4))
+      lim.global <- setlimits2D(minX = min(c(cont_col[, 1], light_col[, 1])), maxX = max(c(cont_col[, 1], light_col[, 1])), 
+                                minY = min(c(cont_col[, 2], light_col[, 2])), maxY = max(c(cont_col[, 2], light_col[, 2])),
+                                origin = adegtot$porigin$origin, aspect.ratio = adegtot$paxes$aspectratio, includeOr = adegtot$porigin$include)
+    }
+    
+    params <- list()
+    params$light_col <- list(xlim = lim.global$xlim, ylim = lim.global$ylim)
+    sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  }
+  
+  
+  ## displaying of the eigen values
+  if(position != "none")
+    geig <- do.call("plotEig", c(list(eigvalue = call("$", ori[[2]], "eig"), nf = 1:evTab$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$eig))
+  
+  ## function to create the graphics about the row' contribution (individuals) on axes
+  f_row <- function(posi = "none", pos){
+    graphnames <- c("light_row", "heavy_row", if(posi != "none") {"eig"})
+    g1 <- do.call("s.label", c(list(dfxy = light_row, xax = 1, yax = 2, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$light_row))
+    if(type == "label")
+      g2 <- do.call("s.label", c(list(dfxy = heavy_row, xax = 1, yax = 2, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$heavy_row))
+    else
+      g2 <- do.call("s.class", c(list(dfxy = cont_row, fac = fac_row, xax = 1, yax = 2, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$heavy_row))
+    grow <- do.call("superpose", list(g1, g2))
+    grow at Call <- call("superpose", list(g1 at Call, g2 at Call))
+    if(posi != "none")
+      grow <- do.call("insert", list(geig, grow, posi = posi, plot = FALSE, ratio = 0.25))
+    names(grow) <- graphnames
+    return(grow)
+  }
+  
+  # function to create the graphics about the columns' contribution (variables) on axes
+  f_col <- function(posi = "none", pos) {
+    graphnames <- c("light_col", "heavy_col", if(posi != "none") {"eig"})
+    g3 <- do.call("s.label", c(list(dfxy = light_col, xax = 1, yax = 2, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$light_col))
+    if(type == "label")
+      g4 <- do.call("s.label", c(list(dfxy = heavy_col, xax = 1, yax = 2, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$heavy_col))
+    else
+      g4 <- do.call("s.class", c(list(dfxy = cont_col, fac = fac_col, xax = 1, yax = 2, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$heavy_col))
+    gcol <- do.call("superpose", list(g3, g4))
+    gcol at Call <- call("superpose", list(g3 at Call, g4 at Call))
+    if(posi != "none")
+      gcol <- do.call("insert", list(geig, gcol, posi = posi, plot = FALSE, ratio = 0.25))
+    names(gcol) <- graphnames
+    return(gcol)
+  }
+  
+  ## function to create a layout of the graphics about the contribution of rows (individuals) and columns (variables) on axes
+  f_both <- function(posi = "none", pos) {
+    object <- do.call("cbindADEg", c(list(f_row(posi = "none", pos = pos - 1), f_col(posi = posi, pos = pos - 1))))
+    names(object) <- c("row", "col")
+    return(object)
+  }
+  
+  ## creation of the appropriate plot according to the input data
+  if(!is.null(x$row.abs) & is.null(x$col.abs))
+    object <- f_row(posi = position, pos = pos)
+  if(!is.null(x$col.abs) & is.null(x$row.abs))
+    object <- f_col(posi = position, pos = pos)
+  if(!is.null(x$row.abs) & !is.null(x$col.abs))
+    object <- f_both(posi = position, pos = pos)
+  if(is.null(x$row.abs) & is.null(x$col.abs))
+    stop(paste("No inertia was calculated in the ", substitute(x), " object", sep = ""))
+  
+  object at Call <- match.call()
+  
+  if(plot)
+    print(object)
+  invisible(object)
+}
diff --git a/R/ade4-scatter.R b/R/ade4-scatter.R
new file mode 100644
index 0000000..6d36a14
--- /dev/null
+++ b/R/ade4-scatter.R
@@ -0,0 +1,694 @@
+"scatter.dudi" <- function(x, xax = 1, yax = 2, permute = FALSE, posieig = "topleft", prop = FALSE, 
+  density.plot = ifelse(permute, ncol(x$tab) > 1000, nrow(x$tab) > 1000), plot = TRUE, storeData = TRUE, pos = -1, ...) {
+  if(!inherits(x, "dudi")) 
+    stop("Object of class 'dudi' expected")
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf)
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")  
+  
+  position <- match.arg(posieig[1], choices = c("bottomleft", "bottomright", "topleft", "topright", "none"), several.ok = FALSE)
+  
+  ## sort parameters for each graph
+  graphsnames <- c("row", "col", "eig")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## parameters management
+  params <- list()
+  params$row <- list(plabels = list(cex = 0.75))
+  params$col <- list()
+  params$eig <- list(pbackground = list(box = TRUE), psub = list(text = "Eigenvalues"))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  if(prop) {
+    id <- inertia.dudi(x, col.inertia = TRUE)
+    if(is.null(sortparameters[[2]]$plabels$cex)) {
+      sortparameters$col$plabels$cex <- id$col.cum[, 2] / (max(id$col.cum[, 2]) / 1.5)
+    } else {
+	    sortparameters$col$plabels$cex <- sortparameters$col$plabels$cex * id$col.cum[, 2] / (max(id$col.cum[, 2]) / 1.5)
+    }
+  }
+  
+  ## prepare and create g1
+  if(permute)
+    df1 <- substitute(x$co)
+  else
+    df1 <- substitute(x$li)
+  g1 <- do.call(ifelse(density.plot, "s.density", "s.label"), c(list(dfxy = df1, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$row))
+  
+  ## prepare and create g2
+  if(permute) {
+    colss <- x$l1
+  } else {
+    colss <- x$c1
+  }
+  knormali <- c(min(colss[, xax]), max(colss[, xax]), min(colss[, yax]), max(colss[, yax])) / c(g1 at g.args$xlim, g1 at g.args$ylim)
+  csts <- 0.9 / max(knormali)
+  if(permute) {
+    df2 <- substitute(x$l1 * csts)
+  } else {
+    df2 <- substitute(x$c1 * csts)
+  }
+  g2 <- do.call("s.arrow", c(list(dfxy = df2, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$col))
+  
+  ## create the final ADEgS
+  object <- do.call("superpose", list(g1, g2))
+  object at Call <- call("superpose", g1 at Call, g2 at Call)
+  if(position != "none") {
+    g3 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$eig))
+    object <- do.call("insert", list(g3 at Call, object at Call, posi = position, plot = FALSE, ratio = 0.25))
+  }
+  
+  names(object) <- graphsnames[1:length(object)]
+  object at Call <- match.call()
+  if(plot) 
+    print(object)
+  invisible(object)
+}
+
+
+"scatter.coa" <- function(x, xax = 1, yax = 2, method = 1:3, posieig = "topleft", pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "dudi"))
+    stop("Object of class 'dudi' expected")
+  if(!inherits(x, "coa"))
+    stop("Object of class 'coa' expected")
+  
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf)
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")
+  
+  position <- match.arg(posieig[1], choices = c("bottomleft", "bottomright", "topleft", "topright", "none"), several.ok = FALSE)
+  method <- method[1]
+  
+  ## limits management
+  if(method == 1)
+    x.global <- rbind(as.matrix(x$li), as.matrix(x$co))
+  else if(method == 2)
+    x.global <- rbind(as.matrix(x$c1), as.matrix(x$li))
+  else if(method == 3)
+    x.global <- rbind(as.matrix(x$l1), as.matrix(x$co))
+  adegtot <- adegpar()
+  lim.global <- setlimits2D(minX = min(x.global[, xax]), maxX = max(x.global[, xax]), minY = min(x.global[, yax]), maxY = max(x.global[, yax]), origin = adegtot$porigin$origin, aspect.ratio = adegtot$paxes$aspectratio, includeOr = adegtot$porigin$include)
+  
+  ## sort parameters for each graph
+  graphsnames <- c("row", "col", "eig")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## parameters management
+  params <- list()
+  params$row <- list(plabels = list(cex = 0.75), xlim = lim.global$xlim, ylim = lim.global$ylim)
+  params$col <- list(xlim = lim.global$xlim, ylim = lim.global$ylim)
+  params$eig <- list(pbackground = list(box = TRUE), psub = list(text = "Eigenvalues"))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg and of the final ADEgS
+  if(method == 1) {
+    g1 <- do.call("s.label", c(list(dfxy = substitute(x$li), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$row))
+    g2 <- do.call("s.label", c(list(dfxy = substitute(x$co), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$col))
+  } else if(method == 2) {
+    g1 <- do.call("s.label", c(list(dfxy = substitute(x$c1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$col))
+    g2 <- do.call("s.label", c(list(dfxy = substitute(x$li), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$row))
+  } else if(method == 3) {
+    g1 <- do.call("s.label", c(list(dfxy = substitute(x$l1), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$row))
+    g2 <- do.call("s.label", c(list(dfxy = substitute(x$co), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$col))
+  }  
+  object <- do.call("superpose", list(g1, g2))
+  object at Call <- call("superpose", g1 at Call, g2 at Call)
+  if(position != "none") {
+    g3 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$eig))
+    object <- do.call("insert", list(g3 at Call, object at Call, posi = position, plot = FALSE, ratio = 0.25))
+  }
+  
+  object at Call <- match.call()
+  names(object) <- graphsnames[1:length(object)]
+  if(plot) 
+    print(object)
+  invisible(object)
+}
+
+
+"plot.acm"  <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "dudi"))
+    stop("Object of class 'dudi' expected")
+  if(!inherits(x, "acm"))
+    stop("Object of class 'acm' expected")
+  
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf)
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")
+  
+  ## prepare
+  oritab <- as.list(x$call)[[2]]
+  
+  ## parameter management
+  sortparameters <- sortparamADEg(...)
+  params <- list()
+  params$g.args <- list(starSize = 0)
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  object <- do.call("s.class", c(list(dfxy = substitute(x$li), fac = oritab, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$adepar, sortparameters$trellis, sortparameters$g.args, sortparameters$rest))
+  object at Call <- match.call()
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"plot.fca" <- function(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "dudi"))
+    stop("Object of class 'dudi' expected")
+  if(!inherits(x, "fca"))
+    stop("Object of class 'fca' expected")
+  
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf)
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")
+  
+  ## prepare
+  oritab <- as.list(x$call)[[2]]
+  evTab <- eval.parent(oritab)
+  indica <- factor(rep(names(x$blo), x$blo))
+  ng <- length(levels(indica))   
+  
+  ## parameter management
+  graphsnames <- as.character(levels(indica))
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  params <- list()
+  params <- lapply(1:length(graphsnames), function(i) {params[[i]] <- list(starSize = 0.5, ellipseSize = 0, plabels = list(cex = 1.25), psub = list(text = graphsnames[i]))})
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  l <- list()
+  l <- sapply(1:length(levels(indica)), function(i) {do.call("s.distri", c(list(dfxy = substitute(x$l1, env = sys.frame(-3)), dfdistri = call("[", oritab, call(":", 1, nrow(evTab)), which(indica == levels(indica)[i])), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[i]]))})
+  
+  ## ADEgS creation
+  object <- new(Class = "ADEgS", ADEglist = l, positions = layout2position(.n2mfrow(ng), ng  = ng), add = matrix(0, ncol = ng, nrow = ng), Call = match.call())
+  names(object) <- graphsnames
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"scatter.pco" <- function(x, xax = 1, yax = 2, posieig = "topleft", pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "dudi"))
+    stop("Object of class 'dudi' expected")
+  if(!inherits(x, "pco"))
+    stop("Object of class 'pco' expected")
+  
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf)
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")
+  
+  position <- match.arg(posieig[1], choices = c("bottomleft", "bottomright", "topleft", "topright", "none"), several.ok = FALSE)
+  
+  ## sort parameters for each graph
+  graphsnames <- c("row", "eig")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## parameters management
+  params <- list()
+  params$row <- list()
+  params$eig <- list(pbackground = list(box = TRUE), psub = list(text = "Eigenvalues"))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg and of the final ADEgS
+  object <- do.call("s.label", c(list(dfxy = substitute(x$li), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$row))
+  if(position != "none") {
+    g2 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$eig))
+    object <- do.call("insert", list(g2 at Call, object at Call, posi = position, plot = FALSE, ratio = 0.25))
+    names(object) <- graphsnames[1:length(object)]
+  }
+  
+  object at Call <- match.call()
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"scatter.nipals" <- function(x, xax = 1, yax = 2, posieig = "topleft", pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "nipals"))
+    stop("Object of class 'nipals' expected")
+  
+  if((xax == yax) || (x$nf == 1))
+    stop("One axis only : not yet implemented")
+  if(length(xax) > 1 | length(yax) > 1)
+    stop("Not implemented for multiple xax/yax")
+  
+  if(xax > x$nf)
+    stop("Non convenient xax")
+  if(yax > x$nf)
+    stop("Non convenient yax")
+  
+  position <- match.arg(posieig[1], choices = c("bottomleft", "bottomright", "topleft", "topright", "none"), several.ok = FALSE)
+  
+  ## sort parameters for each graph
+  graphsnames <- c("row", "col", "eig")
+  sortparameters <- sortparamADEgS(..., graphsnames = graphsnames)
+  
+  ## parameters management
+  params <- list()
+  params$row <- list(plabels = list(cex = 0.75))
+  params$col <- list()
+  params$eig <- list(pbackground = list(box = TRUE), psub = list(text = "Eigenvalues"))
+  names(params) <- graphsnames
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## prepare and create g1
+  g1 <- do.call("s.label", c(list(dfxy = substitute(x$li), xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$row))
+  
+  ## prepare and create g2
+  knormali <- c(min(x$c1[, xax]), max(x$c1[, xax]), min(x$c1[, yax]), max(x$c1[, yax])) / c(g1 at g.args$xlim, g1 at g.args$ylim)
+  csts <- 0.8 / max(knormali)
+  df2 <- substitute(x$c1 * csts)
+  g2 <- do.call("s.arrow", c(list(dfxy = df2, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$col))
+  
+  ## creation of each individual ADEg and of the final ADEgS
+  object <- do.call("superpose", list(g1, g2))
+  object at Call <- call("superpose", g1 at Call, g2 at Call)
+  if(position != "none") {
+    g3 <- do.call("plotEig", c(list(eigvalue = substitute(x$eig), nf = 1:x$nf, xax = xax, yax = yax, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$eig))
+    object <- do.call("insert", list(g3 at Call, object at Call, posi = position, plot = FALSE, ratio = 0.25))
+  }
+  
+  names(object) <- graphsnames[1:length(object)]
+  object at Call <- match.call()
+  if(plot)
+    print(object)
+  invisible(object)
+}
+
+
+"score.acm" <- function (x, xax = 1, which.var = NULL, type = c("points", "boxplot"), pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "acm")) 
+    stop("Object of class 'acm' expected")
+  if(x$nf == 1) 
+    xax <- 1
+  if((xax < 1) || (xax > x$nf)) 
+    stop("non convenient axe number")
+  
+  ## prepare
+  oritab <- as.list(x$call)[[2]]
+  evTab <- eval.parent(oritab)
+  if(is.null(which.var))
+    which.var <- 1:ncol(evTab)
+  
+  type <- match.arg(type)
+  
+  ## parameter management
+  sortparameters <- sortparamADEg(...)
+  params <- list()
+  
+  if(type == "boxplot") {
+    ## parameter management
+    params$adepar <- list(plabels = list(boxes = list(draw = FALSE)), p1d = list(rug = list(draw = TRUE)), paxes = list(draw = TRUE, y = list(draw = FALSE)), 
+      plegend = list(drawKey = FALSE), pgrid = list(text = list(cex = 0)), psub = list(position = "topleft"))
+    params$g.args <- list(samelimits = FALSE)
+    sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+    
+    ## ADEgS creation
+    scorecall <- substitute(x$l1[, xax])
+    fac <- call("[", oritab, which.var)
+    object <- do.call("s1d.boxplot", c(list(score = scorecall, fac = fac, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$adepar, sortparameters$trellis, sortparameters$g.args, sortparameters$rest))
+    
+  } else if(type == "points") {
+    ## parameter management
+    params$adepar <- list(ppoints = list(pch = "|"), porigin = list(draw = FALSE), pgrid = list(draw = FALSE), psub = list(position = "topleft"), paxes = list(draw = TRUE), plabels = list(cex = 1.25))
+    sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+    
+    ## creation of each individual ADEg
+    ADEglist <- list()
+    score <- x$l1[, xax]
+    scorecall <- substitute(x$l1[, xax])
+    for(i in which.var) {
+      ## data management
+      fac <- evTab[, i]
+      faccall <- call("[", oritab, 1:NROW(evTab), i)
+      meangroup <- call("as.numeric", call("tapply", scorecall, faccall, mean))
+      dfxy <- call("cbind", scorecall, call("as.numeric", call("[", meangroup, faccall)))
+      
+      ## ADEg creation
+      g1 <- do.call("s.class", c(list(dfxy = dfxy, fac = faccall, plot = FALSE, storeData = storeData, pos = pos - 2), c(sortparameters$adepar, list(psub.text = colnames(evTab)[i])), sortparameters$trellis, sortparameters$g.args, sortparameters$rest))
+      xlimg1 <- g1 at g.args$xlim
+      ylimg1 <- g1 at g.args$ylim
+      g2 <- xyplot(score ~ fac, xlab = "", ylab = "", scales = list(x = list(tck = c(1, 0)), y = list(tck = c(1, 0))), xlim = xlimg1, ylim = ylimg1, 
+                   aspect = g1 at adeg.par$paxes$aspectratio, panel = function(x, y) {panel.abline(h = as.numeric(tapply(y, x, mean)), a = 0, b = 1, lty = 1)})
+      g2$call <- call("xyplot", substitute(scorecall ~ faccall), xlab = "", ylab = "", scales = list(x = list(tck = c(1, 0)), y = list(tck = c(1, 0))), xlim = substitute(xlimg1), ylim = substitute(ylimg1),
+                      aspect = g1 at adeg.par$paxes$aspectratio, panel = function(x, y) {panel.abline(h = as.numeric(tapply(y, x, mean)), a = 0, b = 1, lty = 1)})
+      ADEglist[[i]] <- superpose(g2, g1, plot = FALSE)
+    }
+    ADEglist <- ADEglist[which.var]
+    
+    ## ADEgS creation
+    posmatrix <- layout2position(.n2mfrow(length(which.var)), ng = length(which.var))
+    object <- new(Class = "ADEgS", ADEglist = ADEglist, positions = posmatrix, add = matrix(0, ncol = length(which.var), nrow = length(which.var)), Call = match.call())
+  } 
+  
+  names(object) <- colnames(evTab)[which.var]
+  object at Call <- match.call()
+  if(plot) 
+    print(object)
+  invisible(object)
+}
+
+
+#"score.coa" <- function (x, xax = 1, dotchart = FALSE, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+#
+#  if(!inherits(x, "coa")) 
+#    stop("Object of class 'coa' expected")
+#  if(x$nf == 1) 
+#    xax <- 1
+#  if((xax < 1) || (xax > x$nf)) 
+#    stop("non convenient axe number")
+#  
+#  if(dotchart)
+#    stop("TRUE 'dotchart' not yet implemented")
+#  
+#  
+#
+#  def.par <- par(mar = par("mar"))
+#  on.exit(par(def.par))
+#  par(mar = c(0.1, 0.1, 0.1, 0.1))
+#  
+#  sco.distri.class.2g <- function(score, fac1, fac2, weight, labels1 = as.character(levels(fac1)), labels2 = as.character(levels(fac2)), clab1, clab2, cpoi, cet) {
+#    nvar1 <- nlevels(fac1)
+#    nvar2 <- nlevels(fac2)
+#    ymin <- scoreutil.base(y = score, xlim = NULL, grid = TRUE, cgrid = 0.75, include.origin = TRUE, origin = 0, sub = NULL, csub = 0)
+#    ymax <- par("usr")[4]
+#    ylabel <- strheight("A", cex = par("cex") * max(1, clab1, clab2)) * 1.4
+#    xmin <- par("usr")[1]
+#    xmax <- par("usr")[2]
+#    xaxp <- par("xaxp")
+#    nline <- xaxp[3] + 1
+#    v0 <- seq(xaxp[1], xaxp[2], le = nline)
+#    
+#    ## dessine la grille
+#    segments(v0, rep(ymin, nline), v0, rep(ymax, nline), col = gray(0.5), lty = 1)
+#    
+#    ## dessine le cadre
+#    rect(xmin, ymin, xmax, ymax)
+#    
+#    
+#    sum.col1 <- unlist(tapply(weight, fac1, sum))
+#    sum.col2 <- unlist(tapply(weight, fac2, sum))
+#    sum.col1[sum.col1 == 0] <- 1
+#    sum.col2[sum.col2 == 0] <- 1
+#    
+#    weight1 <- weight/sum.col1[fac1]
+#    weight2 <- weight/sum.col2[fac2]
+#    
+#    y.distri1 <- tapply(score * weight1, fac1, sum)
+#    y.distri1 <- rank(y.distri1)
+#    y.distri2 <- tapply(score * weight2, fac2, sum)
+#    y.distri2 <- rank(y.distri2) + nvar1 + 2
+#    y.distri <- c(y.distri1, y.distri2)
+#    
+#    ylabel <- strheight("A", cex = par("cex") * max(1, clab1, clab2)) * 1.4
+#    y.distri1 <- (y.distri1 - min(y.distri))/(max(y.distri) - min(y.distri))
+#    y.distri1 <- ymin + ylabel + (ymax - ymin - 2 * ylabel) * y.distri1
+#    y.distri2 <- (y.distri2 - min(y.distri))/(max(y.distri) - min(y.distri))
+#    y.distri2 <- ymin + ylabel + (ymax - ymin - 2 * ylabel) * y.distri2
+#    
+#    for (i in 1:nvar1) {
+#      w <- weight1[fac1 == levels(fac1)[i]]
+#      y0 <- y.distri1[i]
+#      score0 <- score[fac1 == levels(fac1)[i]]
+#      x.moy <- sum(w * score0)
+#      x.et <- sqrt(sum(w * (score0 - x.moy)^2))
+#      x1 <- x.moy - cet * x.et
+#      x2 <- x.moy + cet * x.et
+#      etiagauche <- TRUE
+#      if ((x1 - xmin) < (xmax - x2)) 
+#        etiagauche <- FALSE
+#      segments(x1, y0, x2, y0)
+#      if (clab1 > 0) {
+#        cha <- labels1[i]
+#        cex0 <- par("cex") * clab1
+#        xh <- strwidth(cha, cex = cex0)
+#        xh <- xh + strwidth("x", cex = cex0)
+#        yh <- strheight(cha, cex = cex0) * 5/6
+#        if (etiagauche) 
+#          x0 <- x1 - xh/2
+#        else x0 <- x2 + xh/2
+#        rect(x0 - xh/2, y0 - yh, x0 + xh/2, y0 + yh, col = "white", border = 1)
+#        text(x0, y0, cha, cex = cex0)
+#      }
+#      points(x.moy, y0, pch = 20, cex = par("cex") * cpoi)
+#    }
+#    for (i in 1:nvar2) {
+#      w <- weight2[fac2 == levels(fac2)[i]]
+#      y0 <- y.distri2[i]
+#      score0 <- score[fac2 == levels(fac2)[i]]
+#      x.moy <- sum(w * score0)
+#      x.et <- sqrt(sum(w * (score0 - x.moy)^2))
+#      x1 <- x.moy - cet * x.et
+#      x2 <- x.moy + cet * x.et
+#      etiagauche <- TRUE
+#      if ((x1 - xmin) < (xmax - x2)) 
+#        etiagauche <- FALSE
+#      segments(x1, y0, x2, y0)
+#      if (clab2 > 0) {
+#        cha <- labels2[i]
+#        cex0 <- par("cex") * clab2
+#        xh <- strwidth(cha, cex = cex0)
+#        xh <- xh + strwidth("x", cex = cex0)
+#        yh <- strheight(cha, cex = cex0) * 5/6
+#        if (etiagauche) 
+#          x0 <- x1 - xh/2
+#        else x0 <- x2 + xh/2
+#        rect(x0 - xh/2, y0 - yh, x0 + xh/2, y0 + yh, col = "white", border = 1)
+#        text(x0, y0, cha, cex = cex0)
+#      }
+#      points(x.moy, y0, pch = 20, cex = par("cex") * cpoi)
+#    }
+#  }
+#  
+#  if (inherits(x, "witwit")) {
+#    y <- eval.parent(as.list(x$call)[[2]])
+#    oritab <- eval.parent(as.list(y$call)[[2]])
+#  } else 
+#    oritab <- eval.parent(as.list(x$call)[[2]])
+#  
+#  l.names <- row.names(oritab)
+#  c.names <- names(oritab)
+#  oritab <- as.matrix(oritab)
+#  a <- x$co[col(oritab), xax]
+#  a <- a + x$li[row(oritab), xax]
+#  a <- a/sqrt(2 * x$eig[xax] * (1 + sqrt(x$eig[xax])))
+#  a <- a[oritab > 0]
+#  aco <- col(oritab)[oritab > 0]
+#  aco <- factor(aco)
+#  levels(aco) <- c.names
+#  ali <- row(oritab)[oritab > 0]
+#  ali <- factor(ali)
+#  levels(ali) <- l.names
+#  aw <- oritab[oritab > 0]/sum(oritab)
+#  
+#  sco.distri.class.2g(a, aco, ali, aw, clab1 = clab.c, clab2 = clab.r, cpoi = cpoi, cet = cet)
+#  scatterutil.sub("Rows", csub = csub, possub = "topleft")
+#  scatterutil.sub("Columns", csub = csub, possub = "bottomright")
+#}
+
+
+
+"score.mix" <- function (x, xax = 1, which.var = NULL, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "mix")) 
+    stop("Object of class 'mix' expected")
+  if(x$nf == 1) 
+    xax <- 1
+  if((xax < 1) || (xax > x$nf)) 
+    stop("non convenient axe number")
+  
+  ## internal function
+  lm.pcaiv <- function(x, df, weights) {
+    lm0 <- lm(as.formula(paste("reponse.generic ~ ", paste(names(df), collapse = "+"))), data = cbind.data.frame(x, df), weights = weights)
+    return(predict(lm0))
+  }
+  
+  ## data management
+  oritab <- as.list(x$call)[[2]]
+  evTab <- eval.parent(oritab)
+  if(is.null(which.var)) 
+    which.var <- 1:length(x$index)
+  
+  index <- as.character(x$index)
+  score <- x$l1[, xax]
+  scorecall <- substitute(x$l1[, xax])
+  
+  ADEglist <- list()
+  for (i in which.var) {
+    ## parameters management
+    sortparameters <- sortparamADEg(...)
+    params <- list()
+    
+    ## data management
+    type.var <- index[i]
+    col.var <- which(x$assign == i)
+    y <- x$tab[, col.var]
+    ycall <- substitute(x$tab[, col.var])
+    
+    ## type of variable : quantitative
+    if(type.var == "q") {
+      ## parameters management
+      params$adepar <- list(psub = list(text = colnames(evTab)[i], position = "topleft"), paxes = list(aspectratio = "fill", draw = TRUE), porigin = list(include = FALSE), pgrid = list(draw = FALSE), plabels = list(cex = 0))
+      sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+      
+      if(length(col.var) == 1) {
+        g1 <- do.call("s.label", c(list(dfxy = call("cbind", scorecall, ycall), plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$adepar, sortparameters$trellis, sortparameters$g.args, sortparameters$rest))
+        g2 <- xyplot(y ~ score, panel = function(x, y) {panel.abline(lm(y ~ x), lty = 1)})
+        g2$call <- call("xyplot", substitute(ycall ~ scorecall), panel = function(x, y) {panel.abline(lm(y ~ x), lty = 1)})
+        ADEglist[[i]] <- superpose(g1, g2)
+        
+      } else {
+        ## data management
+        lm0 <- lm(as.formula(paste("reponse.generic ~ ", paste(names(y), collapse = "+"))), data = cbind.data.frame(reponse.generic = score, y), weights = rep(1, nrow(y))/nrow(y))
+        lm0call <- substitute(lm(as.formula(paste("reponse.generic ~ ", paste(names(ycall), collapse = "+"))), data = cbind.data.frame(reponse.generic = scorecall, ycall), weights = rep(1, nrow(ycall))/nrow(ycall)))
+        score.est <- predict(lm0)
+        score.estcall <- substitute(predict(lm0call))
+        ord0 <- order(y[, 1])
+        ord0call <- substitute(order(ycall[, 1]))
+        y1call <- call("[", ycall, ord0call, 1)
+        x1call <- call("[", score.estcall, ord0call)
+        
+        ## ADEgS creation
+        g1 <- do.call("s.label", c(list(dfxy = call("cbind", scorecall, call("[", ycall, 1:NROW(y), 1)), plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$adepar, sortparameters$trellis, sortparameters$g.args, sortparameters$rest))
+        g2 <- xyplot(y[ord0, 1] ~ score.est[ord0], panel = function(x, y) {panel.lines(x, y, lty = 1)})
+        g2$call <- call("xyplot", substitute(y1call ~ x1call), panel = function(x, y) {panel.lines(x, y, lty = 1)})
+        ADEglist[[i]] <- superpose(g1, g2)
+      }
+    }
+    
+    ## type of variable : factor
+    else if(type.var == "f") {
+      ## parameters management
+      params$adepar <- list(ppoints = list(pch = "|"), paxes = list(aspectratio = "fill", draw = TRUE), porigin = list(draw = FALSE), pgrid = list(draw = FALSE), psub = list(text = colnames(evTab)[i], position = "topleft"))
+      sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+      
+      ## data management
+      fac <- evTab[, i]
+      faccall <- call("[", oritab, 1:NROW(evTab), i)
+      meangroup <- call("as.numeric", call("tapply", scorecall, faccall, mean))
+      dfxy <- call("cbind", scorecall, call("as.numeric", call("[", meangroup, faccall)))
+      
+      ## ADEg creation
+      g1 <- do.call("s.class", c(list(dfxy = dfxy, fac = faccall, plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$adepar, sortparameters$trellis, sortparameters$g.args, sortparameters$rest))
+      xlimg1 <- g1 at g.args$xlim
+      ylimg1 <- g1 at g.args$ylim
+      g2 <- xyplot(score ~ fac, xlab = "", ylab = "", scales = list(x = list(tck = c(1, 0)), y = list(tck = c(1, 0))), xlim = xlimg1, ylim = ylimg1, 
+                   aspect = g1 at adeg.par$paxes$aspectratio, panel = function(x, y) {panel.abline(h = as.numeric(tapply(y, x, mean)), a = 0, b = 1, lty = 1)})
+      g2$call <- call("xyplot", substitute(scorecall ~ faccall), xlab = "", ylab = "", scales = list(x = list(tck = c(1, 0)), y = list(tck = c(1, 0))), xlim = substitute(xlimg1), 
+                      ylim = substitute(ylimg1), aspect = g1 at adeg.par$paxes$aspectratio, panel = function(x, y) {panel.abline(h = as.numeric(tapply(y, x, mean)), a = 0, b = 1, lty = 1)})
+      ADEglist[[i]] <- superpose(g1, g2)
+    }
+    
+    ## type of variable : ordered
+    else if(type.var == "o") {
+      ## parameters management
+      params$adepar <- list(ppoints = list(pch = 20), paxes = list(aspectratio = "fill", draw = TRUE), porigin = list(draw = FALSE), pgrid = list(draw = FALSE), psub = list(text = colnames(evTab)[i], position = "topleft"))
+      sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+      
+      ## data management
+      lm0 <- lm(as.formula(paste("reponse.generic ~ ", paste(names(y), collapse = "+"))), data = cbind.data.frame(reponse.generic = score, y), weights = rep(1, nrow(y))/nrow(y))
+      lm0call <- substitute(lm(as.formula(paste("reponse.generic ~ ", paste(names(ycall), collapse = "+"))), data = cbind.data.frame(reponse.generic = scorecall, ycall), weights = rep(1, nrow(ycall))/nrow(ycall)))
+      score.est <- predict(lm0)
+      score.estcall <- substitute(predict(lm0call))
+      ord0 <- order(y[, 1])
+      ord0call <- substitute(order(ycall[, 1]))
+      y1call <- call("[", ycall, ord0call, 1)
+      x1call <- call("[", score.estcall, ord0call)
+      
+      ## ADEgS creation
+      g1 <- do.call("s.label", c(list(dfxy = call("cbind", scorecall, call("[", ycall, 1:NROW(y), 1)), plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters$adepar, sortparameters$trellis, sortparameters$g.args, sortparameters$rest))
+      g2 <- xyplot(y[ord0, 1] ~ score.est[ord0], panel = function(x, y) {panel.lines(x, y)})
+      g2$call <- call("xyplot", substitute(y1call ~ x1call), panel = function(x, y) {panel.lines(x, y)})
+      ADEglist[[i]] <- superpose(g1, g2)
+    }
+  }
+  ADEglist <- ADEglist[which.var]
+  
+  ## ADEgS creation
+  posmatrix <- layout2position(.n2mfrow(length(which.var)), ng = length(which.var))
+  object <- new(Class = "ADEgS", ADEglist = ADEglist, positions = posmatrix, add = matrix(0, ncol = length(which.var), nrow = length(which.var)), Call = match.call())
+  names(object) <- colnames(evTab)[which.var]
+  object at Call <- match.call()
+  if(plot) 
+    print(object)
+  invisible(object)
+}
+
+
+"score.pca" <- function (x, xax = 1, which.var = NULL, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+  if(!inherits(x, "pca")) 
+    stop("Object of class 'pca' expected")
+  if(x$nf == 1) 
+    xax <- 1
+  if((xax < 1) || (xax > x$nf))
+    stop("non convenient axe number")
+  
+  ## prepare
+  oritab <- as.list(x$call)[[2]]
+  evTab <- eval.parent(oritab)
+  if(is.null(which.var))
+    which.var <- 1:ncol(evTab)
+  
+  ## parameter management
+  sortparameters <- sortparamADEg(...)
+  params <- list()
+  params$adepar <- list(paxes = list(aspectratio = "fill", draw = TRUE), porigin = list(include = FALSE), pgrid = list(draw = FALSE), plabels = list(cex = 0))
+  sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+  
+  ## creation of each individual ADEg
+  ADEglist <- list()
+  for(i in which.var) {
+    dfxy <- call("cbind", substitute(x$l1[, xax]), call("[", oritab, 1:NROW(evTab), i))
+    
+    g1 <- do.call("s.label", c(list(dfxy = dfxy, plot = FALSE, storeData = storeData, pos = pos - 2), c(sortparameters$adepar, list(psub.text = colnames(evTab)[i])), sortparameters$trellis, sortparameters$g.args, sortparameters$rest))
+    g2 <- xyplot(eval(dfxy)[, 2] ~ eval(dfxy)[, 1], aspect = g1 at adeg.par$paxes$aspectratio, panel = function(x, y) {panel.abline(lm(y ~ x))})
+    g2$call <- call("xyplot", substitute(dfxy[, 2] ~ dfxy[, 1]), aspect = g1 at adeg.par$paxes$aspectratio, panel = function(x, y) {panel.abline(lm(y ~ x))})
+    ADEglist[[i]] <- superpose(g1, g2)
+  }
+  ADEglist <- ADEglist[which.var]
+  
+  ## ADEgS creation
+  posmatrix <- layout2position(.n2mfrow(length(which.var)), ng = length(which.var))
+  object <- new(Class = "ADEgS", ADEglist = ADEglist, positions = posmatrix, add = matrix(0, ncol = length(which.var), nrow = length(which.var)), Call = match.call())
+  names(object) <- colnames(evTab)[which.var]
+  object at Call <- match.call()
+  if(plot) 
+    print(object)
+  invisible(object)
+}
diff --git a/R/adeGsenv.R b/R/adeGsenv.R
new file mode 100644
index 0000000..e0cf9b3
--- /dev/null
+++ b/R/adeGsenv.R
@@ -0,0 +1,76 @@
+## At the loading of the package, creation of an environment .ADEgEnv to store:
+## - the list of graphical parameters   
+## - the theme adeg                     
+## - the last plotted graphics          
+
+.ADEgEnv <- new.env()
+
+.onLoad <- function(libname, pkgname) {
+    assign("padegraphic",
+           list(p1d = list(horizontal = TRUE, reverse = FALSE, rug = list(draw = TRUE, tck = 0.5, margin = 0.07, line = TRUE)),
+                
+                parrows = list(angle = 15, ends = "last", length = 0.1),
+                
+                paxes = list(aspectratio = "iso", draw = FALSE, x = list(draw = TRUE), y = list(draw = TRUE)),
+                
+                pbackground = list(col = "white", box = TRUE),
+                
+                pellipses = list(alpha = 0.5, axes = list(draw = TRUE, col = "black", lty = 4, lwd = 1), border = "black", col = "transparent", lty = 1, lwd = 1),
+                
+                pgrid = list(col = "grey", draw = TRUE, lty = 1, lwd = 1, nint = 5, text = list(cex = 1, col = "black", pos = "topright")),
+                
+                plabels = list(alpha = 1, cex = 1, col = "black", srt = "horizontal", optim = FALSE, 
+                    boxes = list(alpha = 1, border = "black", col = "white", draw = TRUE, lwd = 1, lty = 1)),
+                
+                plegend = list(drawKey = TRUE, drawColorKey = FALSE, size = 1), 
+                
+                plines = list(col = "black", lty = 1, lwd = 1),
+                
+                pnb = list(edge = list(col = "black", lwd = 1, lty = 1), node = list(pch = 20, cex = 1, col = "black", alpha = 1)),
+                
+                porigin = list(alpha = 1, col = "black", draw = TRUE, include = TRUE, lty = 1, lwd = 1, origin = c(0, 0)),
+                
+                ppalette = list(quanti = colorRampPalette(c("white", "black")),
+                    quali = function(n, name = "Set1") {
+                        if(n > 9)
+                            return(rainbow(n))
+                        else if(n > 2)
+                            return(brewer.pal(n, name))
+                        else
+                            return(brewer.pal(n + 2, name)[1:n])
+                    }),  ## see http://colorbrewer2.org/
+                
+                ppoints = list(alpha = 1, cex = 1, col = "black", pch = 20, fill = "black"),
+                
+                ppolygons = list(border = "black", col = "grey", lty = 1, lwd = 1, alpha = 0.4),
+                
+                pSp = list(col = "grey", border = "black", lwd = 1, lty = 1, alpha = 1, cex = 3, pch = 20),
+                
+                psub = list(cex = 1, col = "black", position = "bottomleft", text = ""),
+                
+                ptable = list(x = list(srt = 0, pos = "top", tck = 5, adj = NA),
+                              y = list(srt = 90, pos = "right", tck = 5, adj = NA),
+                              margin = list(bottom = 5, left = 5, top = 5, right = 5))
+                
+                ),
+           envir = .ADEgEnv)
+    
+    assign("adegtheme",
+           list(layout.heights = list(
+                    top.padding = 0, main.key.padding = 0,
+                    key.axis.padding = 0,	axis.xlab.padding = 0,
+                    xlab.key.padding = 0,	key.sub.padding = 0,
+                    bottom.padding = 0),
+                layout.widths = list(left.padding = 0, key.ylab.padding = 0, ylab.axis.padding = 0, axis.key.padding = 0, right.padding = 0),
+                background = list(col = "transparent", alpha = 1),
+                plot.polygon = list(col = "#F2F2F2"),
+                plot.line = list(col = "#000000"),
+                add.line = list(col =  "#000000", lty = 2),    
+                ## clipping allows drawing to go outside panel (i.e : drawings) limits
+                as.table = TRUE
+                ), envir = .ADEgEnv
+           )
+    
+    changelatticetheme(get("adegtheme", envir = .ADEgEnv))
+    assign("currentadeg", list(), envir = .ADEgEnv)
+}
diff --git a/R/genericMethod.R b/R/genericMethod.R
new file mode 100644
index 0000000..ac9b30a
--- /dev/null
+++ b/R/genericMethod.R
@@ -0,0 +1,32 @@
+###################################################
+##        definition of generic methods         ###
+###################################################
+
+setGeneric("getparameters", function(object, number) {standardGeneric("getparameters")})
+setGeneric("getlatticecall", function(object, number) {standardGeneric("getlatticecall")})
+setGeneric("gettrellis", function(object) {standardGeneric("gettrellis")})
+setGeneric("getcall", function(object) {standardGeneric("getcall")})
+setGeneric("getgraphics", function(object) {standardGeneric("getgraphics")})
+setGeneric("add.ADEg", function(object) {standardGeneric("add.ADEg")})
+setGeneric("panel", function(object, x, y, ...) {standardGeneric("panel")})
+setGeneric("panelbase", function(object, x, y) {"panelbase"})
+
+setGeneric("zoom", function(object, zoom, center) {standardGeneric("zoom")}) 
+setGeneric("prepare", function(object) {standardGeneric("prepare")})
+setGeneric("setlatticecall", function(object) {standardGeneric("setlatticecall")})
+
+setGeneric("addhist", function(object, bandwidth, gridsize = 60, kernel = "normal", cbreaks = 2, storeData = TRUE, plot = TRUE, pos = -1, ...) {standardGeneric("addhist")})
+setGeneric("addtext", function(object, xcoord, ycoord, label, plot = TRUE, ...) {standardGeneric("addtext")})
+setGeneric("createkey", function(object) {standardGeneric("createkey")})
+setGeneric("addkey", function(object) {standardGeneric("addkey")})
+setGeneric("createcolorkey", function(object) {standardGeneric("createcolorkey")})
+
+setGeneric("getpositions", function(object) {standardGeneric("getpositions")})
+setGeneric("getstats", function(object) {standardGeneric("getstats")})
+setGeneric("superpose", function(g1, g2, which, plot = FALSE) {standardGeneric("superpose")})
+setGeneric("printSuperpose", function(g1, refg, position) {standardGeneric("printSuperpose")})
+setGeneric("insert", function(graphics, oldgraphics, posi = c("bottomleft", "bottomright", "topleft", "topright"), ratio = 0.2, inset = 0.0, plot = TRUE, which, dispatch = FALSE) {standardGeneric("insert")})
+
+setGeneric("cbindADEg", function(g1, g2, ..., plot = FALSE) {standardGeneric("cbindADEg")})
+setGeneric("rbindADEg", function(g1, g2, ..., plot = FALSE) {standardGeneric("rbindADEg")})
+
diff --git a/R/multiplot.R b/R/multiplot.R
new file mode 100644
index 0000000..5510e8b
--- /dev/null
+++ b/R/multiplot.R
@@ -0,0 +1,605 @@
+#######################################################################
+##                       S2. Class                                   ##
+#######################################################################
+
+multi.ax.S2 <- function(thecall) {
+  ## function to plot ADEgS when an s.* function is called and 'xax/yax' arguments are vectors of length > 1
+  
+  listGraph <- list()
+  thenewcall <- thecall
+ 
+  ## update some arguments
+  thenewcall$pos <- eval(thenewcall$pos) - 3
+  thenewcall$plot <- FALSE
+
+  if(thenewcall[[1]] == "s.value") {
+    if(is.null(thenewcall$psub.position))
+      thenewcall$psub.position <- "topleft"
+  }
+
+  ## evaluate some arguments in the correct frame
+  xax <- eval(thecall$xax, envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+  yax <- eval(thecall$yax, envir = sys.frame(sys.nframe() + thenewcall$pos + 2)) 
+  ## create ADEg plots
+  for(i in yax) {
+    for(j in xax) {
+      thenewcall$xax <- j
+      thenewcall$yax <- i
+      thenewcall$psub.text <- paste("xax=", j, ", yax=", i, collapse = "", sep = "")
+      listGraph <- c(listGraph, do.call(as.character(thenewcall[[1]]), thenewcall[-1]))
+    }
+  }
+
+  ## create the multiplot ADEgS
+  names(listGraph) <- paste("x", apply(expand.grid(xax, yax), 1, paste, collapse = "y"), sep = "")
+  posmatrix <- layout2position(c(length(yax), length(xax)), ng = length(listGraph), square = FALSE)
+  object <- new(Class = "ADEgS", ADEglist = listGraph, positions = posmatrix, add = matrix(0, ncol = length(listGraph), nrow = length(listGraph)), Call = as.call(thecall))
+  return(object)
+}
+
+
+##
+##
+##
+
+multi.facets.S2 <- function(thecall, adepar, samelimits = TRUE) {
+  ## function to plot ADEgS when the 'facets' argument is used
+  listGraph <- list()
+  
+  oldparamadeg <- adegpar()
+  on.exit(adegpar(oldparamadeg))
+  adegtot <- adegpar(adepar)
+  
+  ## update some arguments in the newcall
+  thenewcall <- thecall
+  thenewcall$plot <- FALSE
+  thenewcall$pos <- eval(thenewcall$pos) - 3
+  thenewcall$facets <- NULL
+  
+  ## evaluate some arguments in the correct frame
+  if(thecall[[1]] != "s.match")
+    dfxy <- eval(thecall$dfxy, envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+  else
+    dfxy <- do.call("rbind", list(thecall$dfxy1, thecall$dfxy2), envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+
+  facets <- factor(eval(thecall$facets, envir = sys.frame(sys.nframe() + thenewcall$pos + 2)))
+  
+  ## same limits for all sub-graphics
+  if((isTRUE(samelimits) | is.null(samelimits)) & (thecall[[1]] != "s.corcircle")) {
+    xax <- thenewcall$xax
+    yax <- thenewcall$yax
+    if(is.null(thenewcall$Sp))
+      lim.global <- setlimits2D(minX = min(dfxy[, xax]), maxX = max(dfxy[, xax]), minY = min(dfxy[, yax]), maxY = max(dfxy[, yax]),
+        origin = adegtot$porigin$origin, aspect.ratio = adegtot$paxes$aspectratio, includeOr = adegtot$porigin$include)
+    else { ## Sp: ex map, alors par defaut on prend la bbox
+      limsSp <- bbox(eval(thenewcall$Sp))
+      lim.global <- setlimits2D(minX = limsSp[1, 1], maxX = limsSp[1, 2], minY = limsSp[2, 1], maxY = limsSp[2, 2], origin = rep(adegtot$porigin$origin, le = 2), aspect.ratio = adegtot$paxes$aspectratio, includeOr = adegtot$porigin$include) 
+    }
+    if(is.null(thecall$xlim))
+      thenewcall$xlim <- lim.global$xlim
+    if(is.null(thecall$ylim))
+      thenewcall$ylim <- lim.global$ylim
+  }
+    
+  ## creation of the plots (ADEg objects)
+  for(i in 1:nlevels(facets)) {
+    thenewcall$psub.text <- levels(facets)[i]
+
+    ## specific arguments for the different functions
+    if(thecall[[1]] == "s.match") {
+      thenewcall$dfxy1 <- call("[[", call("split", call("as.data.frame", thecall$dfxy1), thecall$facets), i)
+      thenewcall$dfxy2 <- call("[[", call("split", call("as.data.frame", thecall$dfxy2), thecall$facets), i)
+      thenewcall$labels <- call("[[", call("split", thecall$labels, thecall$facets), i)
+    } else {
+      thenewcall$dfxy <- call("[[", call("split", call("as.data.frame", thecall$dfxy), thecall$facets), i)
+    }
+    
+    if(thecall[[1]] == "s.class") {
+      thenewcall$fac <- call("[[", call("split", thecall$fac, thecall$facets), i)
+      thenewcall$wt <- call("[[", call("split", thecall$wt, thecall$facets), i)
+    }
+    
+    if(thecall[[1]] == "s.distri")
+      thenewcall$dfdistri <- call("[[", call("split", thecall$dfdistri, thecall$facets), i)
+    
+    if(thecall[[1]] == "s.image")
+      thenewcall$z <- call("[[", call("split", thecall$z, thecall$facets), i)
+    
+    if(thecall[[1]] == "s.label" || thecall[[1]] == "s.corcircle"|| thecall[[1]] == "s.arrow")
+      thenewcall$labels <- call("[[", call("split", thecall$labels, thecall$facets), i)
+    
+    if(thecall[[1]] == "s.logo")
+      thenewcall$logos <- call("[[", call("split", thecall$logos, thecall$facets), i)
+    
+    if(thecall[[1]] == "s.traject") {
+      thenewcall$fac <- call("[[", call("split", thecall$fac, thecall$facets), i)
+      if(!is.null(thecall$order))
+        thenewcall$order <- call("[[", call("split", thecall$order, thecall$facets), i)
+    }
+    
+    if(thecall[[1]] == "s.value") {
+      thenewcall$z <- call("[[", call("split", thecall$z, thecall$facets), i)
+      if(is.null(thenewcall$breaks)) {
+        ## same breaks for all groups
+        z <- eval(thecall$z, envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+        breaks <- pretty(z, thenewcall$n)
+        thenewcall$breaks <- breakstest(breaks, z, n = length(breaks))
+      }
+      if(is.null(thenewcall$psub.position))
+        thenewcall$psub.position <- "topleft"
+    }
+   
+    listGraph <- c(listGraph, do.call(as.character(thenewcall[[1]]), thenewcall[-1]))
+  }
+
+  ## creation of the multi-plot (ADEgS object)
+  names(listGraph) <- levels(facets)
+  posmatrix <- layout2position(.n2mfrow(nlevels(facets)), ng = nlevels(facets), square = FALSE)
+  object <- new(Class = "ADEgS", ADEglist = listGraph, positions = posmatrix, add = matrix(0, ncol = nlevels(facets), nrow = nlevels(facets)), Call = as.call(thecall))
+  ## change pos et frame a posteriori ??
+  return(object)
+}
+
+##
+##
+##
+
+multi.variables.S2 <- function(thecall, arg.vary) {
+  ## function to plot ADEgS when an s.* function is called and an argument is multivariable (e.g., z in s.value, fac in s.class, etc)
+  ## the name of the varying argument is in name.vary
+  
+  listGraph <- list()
+  thenewcall <- thecall
+  ## update some arguments
+  thenewcall$pos <- eval(thecall$pos) - 3
+  thenewcall$plot <- FALSE
+
+  ## evaluate some arguments in the correct frame
+  name.vary <- thenewcall[[arg.vary]]
+  dfvary <- eval(name.vary, envir = sys.frame(sys.nframe() + thenewcall$pos + 2)) 
+  
+  ## create ADEg plots
+  for(j in 1:ncol(dfvary)) {
+    thenewcall[[arg.vary]] <- call("[", name.vary, substitute(1:nrow(name.vary)), j)
+    thenewcall$psub.text <- colnames(dfvary)[j]
+    if(thenewcall[[1]] == "s.class" || thenewcall[[1]] == "s.traject") {
+      thenewcall$labels <- call("levels", call("as.factor", thenewcall[[arg.vary]]))
+    }
+
+    if(thenewcall[[1]] == "s.value") {
+      if(is.null(thenewcall$psub.position))
+        thenewcall$psub.position <- "topleft"
+    }
+    
+    listGraph <- c(listGraph, do.call(as.character(thenewcall[[1]]), thenewcall[-1]))
+  }
+  
+  ## create the multiplot ADEgS
+  names(listGraph) <- colnames(dfvary)
+  posmatrix <- layout2position(.n2mfrow(ncol(dfvary)), ng = ncol(dfvary), square = FALSE)
+  object <- new(Class = "ADEgS", ADEglist = listGraph, positions = posmatrix, add = matrix(0, ncol = ncol(dfvary), nrow = ncol(dfvary)), Call = as.call(thecall))
+  return(object)
+}
+
+
+#######################################################################
+##                       C1. Class                                   ##
+#######################################################################
+
+multi.score.C1 <- function(thecall) {
+  ## function to plot ADEgS when an s1d.* function is called and score is a data.frame with multiple columns
+  listGraph <- list()
+  thenewcall <- thecall
+ 
+  ## update some arguments
+  thenewcall$pos <- eval(thenewcall$pos) - 3
+  thenewcall$plot <- FALSE
+
+  ## evaluate some arguments in the correct frame
+  if(thenewcall[[1]] != "s1d.interval") {
+    score <- eval(thecall$score, envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+    name.score <- thecall$score
+  } else {
+    score <- eval(thecall$score1, envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+    name.score <- thecall$score1
+  }
+  nc <- ncol(score)
+ 
+  ## create ADEg plots
+  for(i in 1:nc) {
+    thenewcall$psub.text <- colnames(score)[i]
+    ## specific arguments for the different functions
+    if(thenewcall[[1]] != "s1d.interval") {
+      thenewcall$score <- call("[", thecall$score, substitute(1:nrow(name.score)), i)
+   } else {
+      thenewcall$score1 <- call("[", thecall$score1, substitute(1:nrow(name.score)), i)
+      thenewcall$score2 <- call("[", thecall$score2, substitute(1:nrow(name.score)), i)
+    }
+
+    if(thenewcall[[1]] == "s1d.barchart") {
+      if(is.null(thenewcall$labels))
+        thenewcall$labels <- call("rownames", thecall$score)
+    }
+ 
+    listGraph <- c(listGraph, do.call(as.character(thenewcall[[1]]), thenewcall[-1]))
+  }
+
+  ## create the multiplot ADEgS
+  names(listGraph) <- colnames(score)
+  posmatrix <- layout2position(.n2mfrow(nc), ng = nc)
+  object <- new(Class = "ADEgS", ADEglist = listGraph, positions = posmatrix, add = matrix(0, ncol = length(listGraph), nrow = length(listGraph)), Call = as.call(thecall))
+  return(object)
+}
+
+
+##
+##
+##
+
+multi.facets.C1 <- function(thecall, adepar, samelimits = TRUE) {
+  ## function to plot ADEgS when the 'facets' argument is used
+  listGraph <- list()
+  
+  oldparamadeg <- adegpar()
+  on.exit(adegpar(oldparamadeg))
+  adegtot <- adegpar(adepar)
+  
+  ## update some arguments in the newcall
+  thenewcall <- thecall
+  thenewcall$plot <- FALSE
+  thenewcall$pos <- eval(thenewcall$pos) - 3
+  thenewcall$facets <- NULL
+  
+  ## evaluate some arguments in the correct frame
+  if(thenewcall[[1]] != "s1d.interval") {
+    score <- eval(thecall$score, envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+  } else {
+    score1 <- eval(thecall$score1, envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+    score2 <- eval(thecall$score2, envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+    score <- c(score1, score2)
+  }
+  
+  facets <- factor(eval(thecall$facets, envir = sys.frame(sys.nframe() + thenewcall$pos + 2)))
+  
+  ## same limits for all graphics
+  if(isTRUE(samelimits) | is.null(samelimits)) {
+    lim.axe1 <- setlimits1D(min(score), max(score), origin = adegtot$porigin$origin[1], includeOr = adegtot$porigin$include)
+    if(adegtot$p1d$horizontal & is.null(thecall$xlim)) {
+      thenewcall$xlim <- lim.axe1
+    }
+    if(!adegtot$p1d$horizontal & is.null(thecall$ylim)) {
+      thenewcall$ylim <- lim.axe1
+    }
+  }
+  
+  ## creation of the plots (ADEg objects)
+  for(i in 1:nlevels(facets)) {
+    thenewcall$psub.text <- levels(facets)[i]
+    if(thecall[[1]] == "s1d.interval") {
+      thenewcall$score1 <- call("[[", call("split", thecall$score1, thecall$facets), i)
+      thenewcall$score2 <- call("[[", call("split", thecall$score2, thecall$facets), i)
+      thenewcall$at <- call("[[", call("split", thecall$at, thecall$facets), i)
+      } else {
+      thenewcall$score <- call("[[", call("split", thecall$score, thecall$facets), i)
+    }
+    
+    
+    if(thecall[[1]] == "s1d.barchart" & !is.null(thecall$labels))
+      thenewcall$labels <- call("[[", call("split", thecall$labels, thecall$facets), i)
+
+     if(thecall[[1]] == "s1d.dotplot" | thecall[[1]] == "s1d.curve")
+      thenewcall$at <- call("[[", call("split", thecall$at, thecall$facets), i)
+     
+    if(thecall[[1]] == "s1d.density")
+      thenewcall$fac <- call("[[", call("split", thecall$fac, thecall$facets), i)
+    
+    if(thecall[[1]] == "s1d.gauss") {
+      thenewcall$fac <- call("[[", call("split", thecall$fac, thecall$facets), i)
+      thenewcall$wt <- call("[[", call("split", thecall$wt, thecall$facets), i)
+    }
+    
+    listGraph <- c(listGraph, do.call(as.character(thenewcall[[1]]), thenewcall[-1]))
+  }
+
+  ## creation of the multi-plot (ADEgS object)
+  names(listGraph) <- levels(facets)
+  posmatrix <- layout2position(.n2mfrow(nlevels(facets)), ng = nlevels(facets))
+  object <- new(Class = "ADEgS", ADEglist = listGraph, positions = posmatrix, add = matrix(0, ncol = nlevels(facets), nrow = nlevels(facets)), Call = as.call(thecall))
+  ## change pos et frame a posteriori ??
+  return(object)
+}
+
+##
+##
+##
+
+multi.variables.C1 <- function(thecall, arg.vary) {
+  ## function to plot ADEgS when an s1d.* function is called and an argument is multivariable (e.g., fac in s1d.density)
+  ## the name of the varying argument is in name.vary
+  
+  listGraph <- list()
+  thenewcall <- thecall
+ 
+  ## update some arguments
+  thenewcall$pos <- eval(thecall$pos) - 3
+  thenewcall$plot <- FALSE
+
+  ## evaluate some arguments in the correct frame
+  name.vary <- thenewcall[[arg.vary]]
+  dfvary <- eval(name.vary, envir = sys.frame(sys.nframe() + thenewcall$pos + 2)) 
+  
+  ## create ADEg plots
+  for(j in 1:ncol(dfvary)) {
+    thenewcall[[arg.vary]] <- call("[", name.vary, substitute(1:nrow(name.vary)), j)
+    thenewcall$psub.text <- colnames(dfvary)[j]
+    listGraph <- c(listGraph, do.call(as.character(thenewcall[[1]]), thenewcall[-1]))
+  }
+  
+  ## create the multiplot ADEgS
+  names(listGraph) <- colnames(dfvary)
+  posmatrix <- layout2position(.n2mfrow(ncol(dfvary)), ng = ncol(dfvary))
+  object <- new(Class = "ADEgS", ADEglist = listGraph, positions = posmatrix, add = matrix(0, ncol = ncol(dfvary), nrow = ncol(dfvary)), Call = as.call(thecall))
+  return(object)
+}
+
+
+
+#######################################################################
+##                       S1. Class                                   ##
+#######################################################################
+
+multi.score.S1 <- function(thecall) {
+  ## function to plot ADEgS when an s1d.* function is called and score is a data.frame with multiple columns
+  
+  listGraph <- list()
+  thenewcall <- thecall
+ 
+  ## update some arguments
+  thenewcall$pos <- eval(thenewcall$pos) - 3
+  thenewcall$plot <- FALSE
+
+  ## evaluate some arguments in the correct frame
+  if(thenewcall[[1]] != "s1d.match") {
+    score <- eval(thecall$score, envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+    name.score <- thecall$score
+  } else {
+    score <- eval(thecall$score1, envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+    name.score <- thecall$score1
+  }
+  
+  ## create ADEg plots
+  nc <- ncol(score)
+  for(i in 1:nc) {
+    ## specific arguments for the different functions
+    if(thenewcall[[1]] != "s1d.match") {
+      thenewcall$score <- call("[", thecall$score, substitute(1:nrow(name.score)), i)
+    } else {
+      thenewcall$score1 <- call("[", thecall$score1, substitute(1:nrow(name.score)), i)
+      thenewcall$score2 <- call("[", thecall$score2, substitute(1:nrow(name.score)), i)
+    }
+    
+    thenewcall$psub.text <- colnames(score)[i]
+    listGraph <- c(listGraph, do.call(as.character(thenewcall[[1]]), thenewcall[-1]))
+  }
+ 
+  ## create the multiplot ADEgS
+  names(listGraph) <- colnames(score)
+  posmatrix <- layout2position(.n2mfrow(nc), ng = nc)
+  object <- new(Class = "ADEgS", ADEglist = listGraph, positions = posmatrix, add = matrix(0, ncol = length(listGraph), nrow = length(listGraph)), Call = as.call(thecall))
+  return(object)
+}
+
+
+##
+##
+##
+
+multi.facets.S1 <- function(thecall, adepar, samelimits = TRUE) {
+  ## function to plot ADEgS when the 'facets' argument is used
+  listGraph <- list()
+  
+  oldparamadeg <- adegpar()
+  on.exit(adegpar(oldparamadeg))
+  adegtot <- adegpar(adepar)
+  
+  ## update some arguments in the newcall
+  thenewcall <- thecall
+  thenewcall$plot <- FALSE
+  thenewcall$pos <- eval(thenewcall$pos) - 3
+  thenewcall$facets <- NULL
+  
+  ## evaluate some arguments in the correct frame
+  if(thenewcall[[1]] != "s1d.match") {
+    score <- eval(thecall$score, envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+  } else {
+    score1 <- eval(thecall$score1, envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+    score2 <- eval(thecall$score2, envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+    score <- c(score1, score2)
+  }
+  facets <- factor(eval(thecall$facets, envir = sys.frame(sys.nframe() + thenewcall$pos + 2)))
+  
+  ## same limits for all graphics
+  if(isTRUE(samelimits) | is.null(samelimits)) {
+    lim.global <- setlimits1D(min(score), max(score), origin = adegtot$porigin$origin[1], includeOr = adegtot$porigin$include)
+    if(adegtot$p1d$horizontal & is.null(thecall$xlim))
+      thenewcall$xlim <- lim.global
+    if(!adegtot$p1d$horizontal & is.null(thecall$ylim))
+      thenewcall$ylim <- lim.global
+  }
+  
+  ## creation of the plots (ADEg objects)
+  for(i in 1:nlevels(facets)) {
+    thenewcall$psub.text <- levels(facets)[i]
+
+    if(thecall[[1]] == "s1d.match") {
+      thenewcall$score1 <- call("[[", call("split", thecall$score1, thecall$facets), i)
+      thenewcall$score2 <- call("[[", call("split", thecall$score2, thecall$facets), i)
+      thenewcall$labels <- call("[[", call("split", thecall$labels, thecall$facets), i)
+    } else {
+      thenewcall$score <- call("[[", call("split", thecall$score, thecall$facets), i)
+    }
+    
+    if(thecall[[1]] == "s1d.label" & !is.null(thecall$labels))
+       thenewcall$labels <- call("[[", call("split", thecall$labels, thecall$facets), i)
+
+    if(thecall[[1]] == "s1d.class") {
+      thenewcall$fac <- call("[[", call("split", thecall$fac, thecall$facets), i)
+      thenewcall$wt <- call("[[", call("split", thecall$wt, thecall$facets), i)
+    }
+
+    if(thecall[[1]] == "s1d.distri")
+      thenewcall$dfdistri <- call("[[", call("split", thecall$dfdistri, thecall$facets), i)
+
+    if(thecall[[1]] == "s1d.boxplot")
+      thenewcall$fac <- call("[[", call("split", thecall$fac, thecall$facets), i)
+         
+    listGraph <- c(listGraph, do.call(as.character(thenewcall[[1]]), thenewcall[-1]))
+  }
+
+  ## creation of the multi-plot (ADEgS object)
+  names(listGraph) <- levels(facets)
+  posmatrix <- layout2position(.n2mfrow(nlevels(facets)), ng = nlevels(facets))
+  object <- new(Class = "ADEgS", ADEglist = listGraph, positions = posmatrix, add = matrix(0, ncol = nlevels(facets), nrow = nlevels(facets)), Call = as.call(thecall))
+  ## change pos et frame a posteriori ??
+  return(object)
+}
+
+##
+##
+##
+
+multi.variables.S1 <- function(thecall, arg.vary) {
+  ## function to plot ADEgS when an s1d.* function is called and an argument is multivariable (e.g., z in fac in s1d.class)
+  ## the name of the varying argument is in name.vary
+  
+  listGraph <- list()
+  thenewcall <- thecall
+  
+  ## update some arguments
+  thenewcall$pos <- eval(thecall$pos) - 3
+  thenewcall$plot <- FALSE
+
+  ## evaluate some arguments in the correct frame
+  name.vary <- thenewcall[[arg.vary]]
+  dfvary <- eval(name.vary, envir = sys.frame(sys.nframe() + thenewcall$pos + 2)) 
+  
+  ## create ADEg plots
+  for(j in 1:ncol(dfvary)) {
+    thenewcall[[arg.vary]] <- call("[", name.vary, substitute(1:nrow(name.vary)), j)
+    thenewcall$psub.text <- colnames(dfvary)[j]
+    
+    if(thenewcall[[1]] == "s1d.class")
+      thenewcall$labels <- call("levels", call("as.factor", thenewcall[[arg.vary]]))
+    
+    if(thenewcall[[1]] == "s1d.boxplot" || thenewcall[[1]] == "s1d.distri")
+      thenewcall$at <- call("seq", 1, call("nlevels", call("as.factor", thenewcall[[arg.vary]])))
+    listGraph <- c(listGraph, do.call(as.character(thenewcall[[1]]), thenewcall[-1]))
+  }
+  
+  ## create the multiplot ADEgS
+  names(listGraph) <- colnames(dfvary)
+  posmatrix <- layout2position(.n2mfrow(ncol(dfvary)), ng = ncol(dfvary), square = FALSE)
+  object <- new(Class = "ADEgS", ADEglist = listGraph, positions = posmatrix, add = matrix(0, ncol = ncol(dfvary), nrow = ncol(dfvary)), Call = as.call(thecall))
+  return(object)
+}
+
+
+#######################################################################
+##                       Tr. Class                                   ##
+#######################################################################
+
+
+multi.facets.Tr <- function(thecall, samelimits = TRUE) {
+  ## function to plot ADEgS when the 'facets' argument is used
+  listGraph <- list()
+  
+  ## update some arguments in the newcall
+  thenewcall <- thecall
+  thenewcall$plot <- FALSE
+  thenewcall$pos <- eval(thenewcall$pos) - 3
+  thenewcall$facets <- NULL
+  
+  ## evaluate some arguments in the correct frame
+	if(thecall[[1]] != "triangle.match")
+  	dfxyz <- eval(thecall$dfxyz, envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+	else
+  	dfxyz <- do.call("rbind", list(thecall$dfxyz1, thecall$dfxyz2), envir = sys.frame(sys.nframe() + thenewcall$pos + 2))
+	
+  facets <- factor(eval(thecall$facets, envir = sys.frame(sys.nframe() + thenewcall$pos + 2)))
+ 
+	## same limits for all graphics
+  if(isTRUE(samelimits) | is.null(samelimits)) {
+    #lim.global <- .trranges(df = dfxyz, scale = thecall$scale, min3 = NULL, max3 = NULL)
+    lim.global <- .trranges(df = dfxyz, adjust = TRUE, min3 = NULL, max3 = NULL) 
+    if(is.null(thecall$min3d))
+      thenewcall$min3d <- lim.global$mini
+    if(is.null(thecall$max3d))
+      thenewcall$max3d <- lim.global$maxi
+  }
+  
+  ## creation of the plots (ADEg objects)
+  for(i in 1:nlevels(facets)) {
+    thenewcall$psub.text <- levels(facets)[i]
+
+    ## specific arguments for the different functions
+    if(thecall[[1]] == "triangle.match") {
+      thenewcall$dfxyz1 <- call("[[", call("split", call("as.data.frame", thecall$dfxyz1), thecall$facets), i)
+      thenewcall$dfxyz2 <- call("[[", call("split", call("as.data.frame", thecall$dfxyz2), thecall$facets), i)
+      thenewcall$labels <- call("[[", call("split", thecall$labels, thecall$facets), i)
+    } else {
+      thenewcall$dfxyz <- call("[[", call("split", call("as.data.frame", thecall$dfxyz), thecall$facets), i)
+    }
+    
+    if(thecall[[1]] == "triangle.class") {
+      thenewcall$fac <- call("[[", call("split", thecall$fac, thecall$facets), i)
+      thenewcall$wt <- call("[[", call("split", thecall$wt, thecall$facets), i)
+    }
+    
+    if(thecall[[1]] == "triangle.label")
+      thenewcall$labels <- call("[[", call("split", thecall$labels, thecall$facets), i)
+ 
+    listGraph <- c(listGraph, do.call(as.character(thenewcall[[1]]), thenewcall[-1]))
+  }
+
+  ## creation of the multi-plot (ADEgS object)
+  names(listGraph) <- levels(facets)
+  posmatrix <- layout2position(.n2mfrow(nlevels(facets)), ng = nlevels(facets))
+  object <- new(Class = "ADEgS", ADEglist = listGraph, positions = posmatrix, add = matrix(0, ncol = nlevels(facets), nrow = nlevels(facets)), Call = as.call(thecall))
+  ## change pos et frame a posteriori ??
+  return(object)
+}
+
+##
+##
+##
+
+multi.variables.Tr <- function(thecall, arg.vary) {
+  ## function to plot ADEgS when an triangle.* function is called and an argument is multivariable (e.g., fac in triangle.class, etc)
+  ## the name of the varying argument is in name.vary
+  
+  listGraph <- list()
+  thenewcall <- thecall
+  ## update some arguments
+  thenewcall$pos <- eval(thecall$pos) - 3
+  thenewcall$plot <- FALSE
+
+  ## evaluate some arguments in the correct frame
+  name.vary <- thenewcall[[arg.vary]]
+  dfvary <- eval(name.vary, envir = sys.frame(sys.nframe() + thenewcall$pos + 2)) 
+  
+  ## create ADEg plots
+  for(j in 1:ncol(dfvary)) {
+    thenewcall[[arg.vary]] <- call("[", name.vary, substitute(1:nrow(name.vary)), j)
+    thenewcall$psub.text <- colnames(dfvary)[j]
+    if(thenewcall[[1]] == "triangle.class") {
+      thenewcall$labels <- call("levels", call("as.factor", thenewcall[[arg.vary]]))
+    }
+    listGraph <- c(listGraph, do.call(as.character(thenewcall[[1]]), thenewcall[-1]))
+  }
+  
+  ## create the multiplot ADEgS
+  names(listGraph) <- colnames(dfvary)
+  posmatrix <- layout2position(.n2mfrow(ncol(dfvary)), ng = ncol(dfvary))
+  object <- new(Class = "ADEgS", ADEglist = listGraph, positions = posmatrix, add = matrix(0, ncol = ncol(dfvary), nrow = ncol(dfvary)), Call = as.call(thecall))
+  return(object)
+}
diff --git a/R/panelfunctions.R b/R/panelfunctions.R
new file mode 100644
index 0000000..1d9f0aa
--- /dev/null
+++ b/R/panelfunctions.R
@@ -0,0 +1,256 @@
+## Labels drawing
+## TODO: labels' rotations.
+## first, in no boxes, it is easy
+## if boxes, at least do  90 degrees rotations
+## finally, more than one rotation possible.
+adeg.panel.label <- function(x, y, labels, plabels, pos = NULL) {
+  if(any(plabels$cex > 0)) {
+    n <- length(x)
+    plboxes <- plabels$boxes  
+    draw <- plabels$cex > 0
+		## using .textsize funtion in utils.R
+    textS <- .textsize(labels, plabels)
+    srt <- textS$srt
+    if(plboxes$draw && (srt != 0) & srt != 90) 
+      warning("Boxes only implemented for 0 or 90 degrees rotation", call. = FALSE)
+    ldraw <- rep(draw, length.out = n)  ## draw long enough
+    ldraw[which(is.na(labels[1:n]) | labels[1:n] == "")] <- FALSE ## if no labels or null string don't bother
+    width <- rep(textS$w, length.out = n)[ldraw]
+    height <- rep(textS$h, lenght.out = n)[ldraw]
+    lab <- rep(labels, length.out = n)[ldraw] ## no NA, removed using ldraw
+    bdraw <- rep(plboxes$draw, length.out = length(ldraw))
+    
+    ## no boxes if no labels
+    bdraw <- (bdraw & ldraw)
+    ## labels a dessiner
+    optim <- plabels$optim[1] ## only one possibility
+    newpos <- list(x = x[ldraw], y = y[ldraw])
+    
+    if(optim) {                
+      ## calcul des nouvelles positions uniquement pour les labels qui seront dessines
+      ## informations sur panel
+      nativelim <- current.panel.limits(unit = "native")
+      incheslim <- current.panel.limits(unit = "inches")
+      ## calcul des nouvelles positions.
+      if(any(is.na(width)) | any(is.na(height)) | any(is.na(newpos$y)) | any(is.na(newpos$x))) 
+        stop("NA restants revoir adeg.panel.label")
+      newpos <- .pointLabel(x = newpos$x, y = newpos$y, labels = lab, width = width / diff(nativelim$xlim), height = height / diff(nativelim$ylim), limits = nativelim, xyAspect = diff(incheslim$xlim) / diff(incheslim$ylim), trace = FALSE)
+    }
+    
+    if(any(bdraw)) {
+      ## dessins de chaque boite avec son label
+      plboxes <- lapply(plboxes, FUN = function(x) {rep(x, length.out = length(ldraw))})
+      srt <- rep(srt, length.out = length(ldraw))
+      plabels <- lapply(plabels, FUN = function(x) {rep(x, length.out = n)[ldraw]})
+      for(i in 1:length(newpos$x)) {
+        if(bdraw[ldraw][i]) {
+          ## labels sizes
+          panel.rect(
+            x = unit(newpos$x[i], "native"),
+            y = unit(newpos$y[i], "native"),
+            width = width[i],
+            height = height[i],
+            col = plboxes$col[ldraw][i],
+            alpha = plboxes$alpha[ldraw][i],
+            border = plboxes$border[ldraw][i],
+            lty = plboxes$lty[ldraw][i],
+            lwd = plboxes$lwd[ldraw][i]
+          )
+        }
+        panel.text(labels = lab[i], x = unit(newpos$x[i], "native"), y = unit(newpos$y[i], "native"), col = plabels$col[i], cex = plabels$cex[i], alpha = plabels$alpha[i], srt = srt[i])
+      }
+    }
+    else { ## only text
+      if(any(!ldraw)) ## obliger de repeter pour dessiner si un label doit etre ignorer
+        panel.text(labels = lab, x = unit(newpos$x, "native"), y = unit(newpos$y, "native"),
+          				 col = rep(plabels$col, length.out = length(ldraw))[ldraw], cex = rep(plabels$cex, length.out = length(ldraw))[ldraw], 
+          				 alpha = rep(plabels$alpha, length.out = length(ldraw))[ldraw], rep(srt, length.out = length(ldraw))[ldraw], pos = pos)
+      else
+        panel.text(labels = lab, x = unit(newpos$x, "native"), y = unit(newpos$y, "native"), 
+          				 col = plabels$col, cex = plabels$cex, alpha = plabels$alpha, srt = srt, pos = pos)
+    }
+  }
+}
+
+
+adeg.panel.nb <- function(nbobject, coords, col.edge = "black", lwd = 1, lty = 1, pch = 20, cex = 1, col.node = "black", alpha = 1) {
+  
+    if(inherits(nbobject, "listw"))
+        nbobject <- nbobject$neighbours
+    if(!inherits(nbobject, "nb"))
+    stop("nb object is not class nb") ## prevoir dans les fonctions user une selection de l element neighbourght si object de type listw
+  if(length(nbobject) != nrow(coords))
+    stop("error for nb object, not the same numbers of nodes and coordinates", call. = FALSE)
+  edges <- cbind(rep(1:length(nbobject), lapply(nbobject, length)), unlist(nbobject))
+  edges <- edges[edges[,2] != 0, ]
+  
+  ## ici faire rep des parametres pour pouvoir ensuite modifier couleur
+  adeg.panel.edges(edges, coords, col.edge, lwd, lty, pch, cex, col.node, alpha)
+}
+
+
+## adeg.panel.edges....
+## col, lwd, lty etc peuvent varier selon poids des connexions
+adeg.panel.edges <- function(edges, coords, col.edge = "black", lwd = 1, lty = 1, pch = 20, cex = 1, col.node = "black", alpha = 1) {
+  panel.points(x = coords[, 1], y = coords[, 2], col = col.node, pch = pch, alpha = alpha, cex = cex)
+  panel.segments(x0 = coords[edges[, 1], 1], y0 = coords[edges[, 1], 2], x1 = coords[edges[, 2], 1], y1 = coords[edges[, 2], 2], col = col.edge, lwd = lwd, lty = lty)
+}
+
+
+################## Panel.spatial #############################
+## spObject can be :
+## SpatialGridDataFrame","SpatialLinesDataFrame","SpatialPixelsDataFrame","SpatialPointsDataFrame","SpatialPolygonsDataFrame"
+## n : nombre intervales si data 
+## TODO: spObject pourrait etre une liste
+adeg.panel.Spatial <- function(SpObject, sp.layout = NULL, col = 1, border = 1, lwd = 1, lty = 1, alpha = 0.8, cex = 1, pch = 20, n = length(col), spIndex = 1, ...) {
+
+  if(length(grep("DataFrame", class(SpObject))) > 0) { ## there is data in 'SpObject' (it is a SpatialPolygonsDataFrame).
+    mapSp <- try(SpObject[names(SpObject)[spIndex]], silent = TRUE) ## only the first map (spIndex = 1)
+    values <- try(mapSp at data[, 1], silent = TRUE)
+    
+    if(is.factor(values)) { ## qualitative values
+      if(length(col) != nlevels(values)) {
+        if(length(col) == 1)  ## all values have the same color
+          col <- rep(col, length.out = nlevels(values))
+        else 
+        	col <- adegpar()$ppalette$quali(nlevels(values))
+      	colvalue <- col[values]
+      } else
+        colvalue <- col
+    
+    } else {  ## quantitative values
+      breaks <- pretty(values, length(col))
+      if((length(breaks) - 1) != length(col)) {
+        if(length(col) == 1)  ## 'col' is not modified by the user
+        	col <- adegpar()$ppalette$quanti(length(breaks) - 1)
+        else  ## 'col' is modified but there is not enough color values
+          col <- colorRampPalette(col)(length(breaks) - 1)
+      }
+      colvalue <- col[cut(values, breaks, include.lowest = TRUE)]
+    }
+  } else {  ## there is no data in 'SpObject'
+    mapSp <- SpObject
+    colvalue <- col
+  }
+
+   if(!is.null(sp.layout))
+     sppanel(sp.layout)
+  
+  if(inherits(SpObject, what = "SpatialPoints")) {
+    ## insert ppoints.parameters for pch and cex
+    sp.points(mapSp, col = colvalue, pch = pch, cex = cex, alpha = alpha)
+  }
+  
+  if(inherits(SpObject, what = "SpatialPolygons"))
+    sp.polygons(mapSp, col = border, fill = colvalue, alpha = alpha, lty = lty, lwd = lwd)
+  
+  ## For spatialLine problems ; no various colors
+  if(inherits(SpObject, what = "SpatialLines"))
+    sp.lines(mapSp, col = colvalue, alpha = alpha, lty = lty, lwd = lwd)
+  if(inherits(SpObject, what = "SpatialGrid"))
+    sp.grid(mapSp, at = breaks, col = col)
+}
+
+
+adeg.panel.values <- function(x, y, z, method, symbol, ppoints, breaks, centerpar = NULL, center = 0) {
+  if((length(x) != length(y)) | (length(y) != length(z)))
+    stop("error in panel.values, not equal length for x, y, and z")
+  
+  maxsize <- max(abs(breaks))  ## biggest value
+  z <- z - center
+
+  if(!missing(center) & !is.null(centerpar)) {
+      xnull <- x[abs(z) < sqrt(.Machine$double.eps)]
+      ynull <- y[abs(z) < sqrt(.Machine$double.eps)]
+  }
+  
+  if(method == "size"){
+      size <- .proportional_map(z, maxsize) * ppoints$cex[1]
+      colfill <- ifelse(z < 0, ppoints$col[1], ppoints$col[2])
+      colborder <- ifelse(z < 0, ppoints$col[2], ppoints$col[1])
+      
+  } else if(method == "color"){
+      size <- ppoints$cex[1]
+      breaks <- sort(breaks)
+      colfill <- ppoints$col[as.numeric(cut(z, breaks, include.lowest = TRUE))]
+      if(any(is.null(colfill)) | any(is.na(colfill)))
+             stop("error in the definition of color symbol", call. = FALSE)
+      colborder <- "black"
+  }
+  
+  cstnormal <- 5 ## same value in createkey
+  panel.points(x = x, y = y, cex = size * cstnormal, pch = .symbol2pch(symbol), fill = colfill, col = colborder, alpha = ppoints$alpha)
+  if(!missing(center) && !is.null(centerpar))
+    panel.points(x = xnull, y = ynull, pch = centerpar$pch, col = centerpar$col, cex = centerpar$cex)
+  return(cstnormal) 
+}
+
+
+adeg.panel.hist <- function(histValues, horizontal = TRUE, densi, drawLines, params = list(), identifier = "histogramADEg") {
+  ## from panel.histogram of the lattice package
+  plot.polygon <- modifyList(list(plot.polygon = trellis.par.get("plot.polygon")), params, keep.null = TRUE)[[1L]] ## hist params
+  add.line <- modifyList(list(add.line = trellis.par.get("add.line")), params, keep.null = TRUE)[[1L]] ## backgroundlines
+  plot.line <- modifyList(list(plot.line = trellis.par.get("plot.line")), params, keep.null = TRUE)[[1L]] ## density line
+  
+  h <- histValues
+  breaks <- h$breaks
+  heiBar <- h$counts
+  nb <- length(breaks)
+  ## counts lines
+  if(horizontal)
+    do.call("panel.abline", c(list(h = drawLines), add.line))
+  else
+    do.call("panel.abline", c(list(v = drawLines), add.line))
+  ## warning : density lines re-scale to check
+  contdensi <- (h$counts[h$density != 0 & h$counts != 0] / h$density[h$density != 0 & h$counts != 0])[1]
+  if(horizontal) {
+    if(nb > 1) {
+      panel.rect(x = h$mids, y = 0, height = heiBar, width = diff(breaks), 
+                 col = plot.polygon$col, alpha = plot.polygon$alpha, border = plot.polygon$border, lty = plot.polygon$lty, 
+                 lwd = plot.polygon$lwd, just = c("center", "bottom"), identifier = identifier)
+    }
+    do.call("panel.lines", c(list(x = densi$x, y = densi$y * contdensi), plot.line))
+  } else {
+    if(nb > 1)
+      panel.rect(y = h$mids, x = 0, height = diff(breaks), width = heiBar,
+                 col = plot.polygon$col, alpha = plot.polygon$alpha, border = plot.polygon$border, lty = plot.polygon$lty, 
+                 lwd = plot.polygon$lwd, just = c("left", "center"), identifier = identifier)
+    do.call("panel.lines", c(list(y = densi$x,  x = densi$y * contdensi), plot.line))
+  }
+}
+
+
+adeg.panel.join <- function(drawLines, params = list()) {
+  ## circle from c(0,0)p, radius = drawLines
+  plot.line <- modifyList(list(add.line = trellis.par.get("add.line")), params, keep.null = TRUE)[[1L]] ## density line
+  ## number of seg = 200
+  plabels <- modifyList(adegpar("plabels"), params, keep.null = TRUE)[[1L]]
+  scaleX <- c(current.panel.limits()$xlim, current.panel.limits()$ylim)
+  xlines <- seq(from = min(scaleX) - 0.1 * min(scaleX), to = max(scaleX) * 1.1, length.out = 200)
+  ylines <- lapply(drawLines, FUN = function(radius, x) {
+    indx <- (x <= radius) ## x can be greated than radius
+    return(c(sqrt(radius * radius - x[indx] * x[indx]), (- sqrt(abs(radius * radius - x[!indx] * x[!indx])))))
+  }, x = xlines)
+  
+  trash <- lapply(ylines, FUN = function(y, x) {do.call("panel.lines", c(list(x = x[1:length(y)], y = y[1:length(y)]), plot.line))}, x = xlines)
+  adeg.panel.label(x = sqrt(0.5) * drawLines, y = sqrt(0.5) * drawLines, as.character(drawLines), plabels)
+}
+
+
+## from http://rwiki.sciviews.org/doku.php?id=tips:graphics-grid:displaybitmap
+## used in s.logo (rasterGrob) to handle pixmap objects
+
+as.raster.pixmapRGB <- function(x, ...) {
+  nr <- nrow(x at red)
+  r <- rgb((x at red), (x at green), (x at blue))
+  dim(r) <- x at size
+  r
+}
+
+
+as.raster.pixmapGrey <- function(x, ...) {
+  nr <- nrow(x at grey)
+  r <- x at grey
+  dim(r) <- x at size
+  r
+}
diff --git a/R/parameter.R b/R/parameter.R
new file mode 100644
index 0000000..7a502f4
--- /dev/null
+++ b/R/parameter.R
@@ -0,0 +1,273 @@
+changelatticetheme <- function(...) {
+  ## lattice.options(default.theme = adegspecial)
+  ## change lattice theme
+  ## if a device is open, it would apply only to new devices
+  if(try(is.list(...), silent = TRUE) == TRUE)
+    changes <- as.list(...)
+  else 
+    changes <- list(...)
+  
+  newtheme <- get("lattice.theme", envir = getFromNamespace(".LatticeEnv", ns = "lattice")) 
+  adegspecial <- get("adegtheme", envir = .ADEgEnv)
+  
+  if(length(changes))
+    newtheme <- modifyList(newtheme, changes, keep.null = TRUE)
+  else
+    ## come back at the starting point
+    newtheme <- modifyList(newtheme, adegspecial, keep.null = TRUE)   
+  
+  ## for all new devices
+  lattice.options(default.theme = switch(EXPR = .Device, newtheme))
+  if(dev.cur() != 1)  ## if a device is open
+    trellis.par.set(newtheme)
+  
+  invisible(newtheme)
+}
+
+
+.mergingList <- function(tomerge) {
+  ## merge elements of the list by name recurcively
+  lnames <- names(tomerge)
+  counter <- 0 ## safety counter
+  while(length(lnames) != length(unique(lnames))) {
+    ## be sure that there are duplicated values
+    indix <- match(lnames, lnames)
+    remove <- c()
+    for(i in 1:length(indix)) {
+      if(i != indix[i]) {
+        tomerge[[indix[i]]] <- c(tomerge[[indix[i]]], tomerge[[i]])
+        remove <- c(remove, i)
+      }
+    }
+    if(length(remove))
+      tomerge[remove] <- NULL
+    tomerge <- lapply(tomerge, FUN = function(x) {if(is.list(x) & (length(x) > 1)) .mergingList(x) else x})
+    counter <- counter + 1
+    if(counter == 50) 
+      stop("error in .mergingList", call. = FALSE)
+    lnames <- names(tomerge)
+  }
+  return(tomerge)
+}
+
+
+.replaceList <- function(x, val) {
+  ## replaceList: inspired by modifyList but 
+  ## replace only previous existing elements and with partial names matching
+  ## x: list to modify, val: modications to pass
+  ## x structure can not be changed
+  ## To be more specific if an element is a list, it cannot be change with a single value
+  rest <- list()  
+  returned <- list()
+  xnames <- names(x)
+  
+  for (v in names(val)) {
+    indix <- pmatch(v, xnames, nomatch = 0)
+    if(indix > 0) {
+      ## if there is a match
+      if(is.list(x[[indix]]) && (!is.list(val[[v]])))
+        stop(paste("cannot replace a list: ", xnames[indix], " by a single value element", sep = ""), call. = FALSE)
+      else {
+        if(is.list(x[[indix]])) {
+          ## recursivity
+          replace <- .replaceList(x[[indix]], val[[v]])
+          returned <- c(returned, list(replace$select))
+          rest <- c(rest, replace$rest)
+        }
+        else 
+          returned[[(length(returned) + 1)]] <- val[[v]] ## else replace values
+        
+        names(returned)[length(returned)] <- xnames[indix]
+      }
+    }
+    else rest <- c(rest, val[v])
+  }
+  return(list(select = returned, rest = rest))
+}
+
+
+.getlist <- function(keys, values) {
+  ## assembles keys and values as list of list
+  ## keys: list of characters vectors, the keys splitted, values: the original list
+  result <- list()
+  for(i in 1:length(keys)) {
+    l <- list(values[[i]])
+    names(l) <- keys[[i]][length(keys[[i]])] 
+    if(length(keys[[i]]) > 1)
+      for(j in (length(keys[[i]]) - 1):1) {
+        l <- list(l)
+        names(l)[1] <- keys[[i]][j]
+      }
+    result[[i]] <- l
+  }
+  return(result)
+}
+
+
+separation <- function(... , pattern = 0, split = TRUE) {
+  ## separate between the list passed to the function and the one already known
+  ## if pattern is 1, compare to trellis parameters
+  ## if pattern is 0, compare to 'padegraphic' parameters
+  
+  ## gets dots
+  if(try(is.list(...), silent = TRUE) == TRUE)
+    tmp_list <- as.list(...)
+  else
+    tmp_list <- list(...)
+  if(is.null(names(tmp_list)))
+    names(tmp_list) <- tmp_list
+  if(!length(tmp_list))
+    return(list(select = list(), rest = list()))
+  
+  ## get pattern 
+  if(is.list(pattern))
+    listpat <- pattern
+  else {
+    if(pattern > 1)
+      stop("pattern must be 0 or 1 in 'separation' function", call. = FALSE)
+    else {
+      if(pattern == 1)
+      	listpat <- trellis.par.get()
+      else{
+          listpat <- get("padegraphic", envir = .ADEgEnv)
+      }
+    }
+  }
+  ## splitting list keys
+  if(!is.list(pattern)) {
+    if(pattern != 1 && split) {
+      ## adegpar, collates keys
+      sep <- strsplit(names(tmp_list), split = ".", fixed = TRUE)
+      values <- tmp_list
+      val <- .getlist(keys = sep, values = values) ## assemblies keys with values, as list of list...
+      val <- sapply(val, FUN = function(x) return(x))
+      val <- .mergingList(val)
+    } else
+    	val <- tmp_list
+  } else
+    val <- tmp_list
+  res <- .replaceList(x = listpat, val)
+  res[[1]] <- .mergingList(res[[1]])
+  return(res)
+}
+
+
+adegpar <- function(...) {
+  ## case 0: nothing in parenthesis
+  ## case 0 bis: only one key (no indication sublist, "paxes")
+  ## case 1: ...= "axes.draw", "sub", "sub.size" # one level, only names
+  ## case 2: ...= "axes" = list("draw") # two levels, only names
+  ## case 3: ...= "axes.draw" = FALSE, "sub.size" = 12 # one level, key names and matching values
+  ## case 4: ...= axes=list(draw=TRUE), sub=list(size=55) # two levels, key names and matching values
+  ## case 5 : ... is a complete list
+  ## if ... is a list
+  
+  ## does not assign, only find corresponding element in list patti
+  recursfinder <- function(x, patti) {
+    result <- list()
+    
+    okfu <- function(x, patti) {
+      ## okfu: retrieve good values and keys (patti)
+      if(length(x) > 1) 
+        stop("x has length > 1") ## to remove
+      idx <- pmatch(names(x), names(patti))
+      if(!is.na(idx))
+        return( patti[idx])
+      else    
+        return(NA)
+    }
+    if(!is.list(x[[1]]))
+      result <- c(result, okfu(x, patti))
+    else {
+      idx <- pmatch(names(x), names(patti))
+      if(!is.na(idx)) {
+        result <- c(result, list(recursfinder(x[[1]], patti[[idx]])))
+        names(result) <- names(patti[idx])
+      }
+      else
+        print("no matching found in adegpar")
+    }
+    return(result)
+  } ## end recurs finder
+  
+  nonames <- function(userlist, pattili) {
+    ## return the right values list
+    sep <- sapply(userlist, strsplit, split = ".", fixed = TRUE) ## a list
+    values <- userlist
+    val <- .getlist(keys = sep, values = values)
+    return(sapply(val, FUN = recursfinder, patti = pattili)) ## get result
+  }
+  
+  value <- list()
+  assignement <- FALSE
+  if(try(is.list(...), silent = TRUE) == TRUE)
+    argu <- as.list(...) ## ... is still a list
+  else
+    argu <- list(...) ## tranforms in list
+  ## choose option
+  padegr <- get("padegraphic", envir = .ADEgEnv)
+  
+  ## switching case: recursive
+  switchingcase <- function(userlist, patternlist) {
+    if(!length(userlist)) ## empty case 0
+      return(list(result = patternlist, assigni = list()))
+    else {
+      lnames <- names(userlist)
+      if(is.null(lnames)) { ## no values, case 0 bis or 1
+        res <- nonames(userlist, patternlist)
+        return(list(result = res, assigni = list()))
+      } else {
+        result <- list()
+        assigni <- list() ## initialization
+        for(i in 1:length(lnames)) {
+          if(identical(lnames[i], "")) {
+            ## no names, meaning value is the key cas 2/1
+            result <- c(result,nonames(userlist[i], patternlist))
+          } else {
+            ## we have names so value to assign, or sublist
+            sep <- sapply(lnames[i], strsplit, split = ".", fixed = TRUE) ## a list
+            ## get a list of list with right keys (splitting *.* keys)
+            val <- .getlist(keys = sep, values = userlist[i])[[1L]]
+            
+            idx <- pmatch(names(val), names(patternlist))
+            if(!is.na(idx)) {
+              ## match with patternlist
+              if(is.list(val[[1]])) {
+                ## sublist val from user list
+                ok <- switchingcase(val[[1]], patternlist = patternlist[[idx]])
+                if(length(ok$result)) {
+                  result <- c(result, list(ok$result))
+                  ## level behind
+                  names(result)[length(result)] <- names(patternlist[idx])
+                }
+                if(length(ok$assigni)) {
+                  assigni <- c(assigni, list(ok$assigni))
+                  names(assigni)[length(assigni)] <- names(patternlist[idx])
+                }
+              } else {
+                ## if not a list, then a value to assign
+                if(is.list(patternlist[[idx]]))
+                  stop(paste("be careful, intent to replace in adegraphics parameters: ", names(patternlist[idx]), " by a single value element", sep = ""), call. = FALSE)
+                assigni <- c(assigni, list(userlist[[i]]))
+                names(assigni)[length(assigni)] <- names(patternlist[idx])
+              }
+            }
+          }
+        }
+      }
+    }
+    return(list(result = result, assigni = assigni))
+  } ## end switching case
+  if(!length(argu)) ## ... empty
+    return(padegr) ## case 0
+  else {
+    ## adegpar called with arguments
+    switchi <- switchingcase(argu, padegr)
+  }
+  if(length(switchi$assign)) {
+    padegr <- modifyList(padegr, switchi$assign, keep.null = TRUE)
+    assign("padegraphic", padegr, envir = .ADEgEnv)
+    return(invisible(padegr)) ## must be improve : avoid two calls to padegraphic
+  }
+  return(switchi$result)  
+}
diff --git a/R/s.Spatial.R b/R/s.Spatial.R
new file mode 100644
index 0000000..7bf9de1
--- /dev/null
+++ b/R/s.Spatial.R
@@ -0,0 +1,109 @@
+s.Spatial <- function(spObj, col = TRUE, nclass = 5, scale = TRUE, plot = TRUE, storeData = TRUE, pos = -1, ...) {
+    oldparamadeg <- adegpar()
+    on.exit(adegpar(oldparamadeg))
+    sortparameters <- sortparamADEg(...)
+    adegtot <- adegpar(sortparameters$adepar)
+    
+    xy.spObj <- coordinates(spObj)[, , drop = FALSE]  ## to access 'coordinates' in the 'imports' environment of 'adegraphics'
+    
+    ## different cases (data or not, points or polygons)
+    ## s.value is used for points with numeric data
+    ## s.class is used for points with factor data
+    ## s.label in other cases
+    
+    nvar <- 0
+    if(length(grep("DataFrame", class(spObj))) > 0)
+        nvar <- ncol(spObj)
+    
+    points.or.poly <- ifelse(length(grep("Poly", class(spObj))) > 0, "poly", "points")
+    
+    ## default values for parameters
+    defaultpar <- list(pgrid = list(draw = FALSE), porigin = list(include = FALSE), 
+        plegend = list(drawKey = ifelse(nvar == 1, TRUE, FALSE)), psub = list(position = "topleft"))
+    
+    sortparameters$adepar <- modifyList(defaultpar, sortparameters$adepar, keep.null = TRUE)
+    
+    ## limits management 
+    limsSp <- bbox(spObj)
+    lim.global <- setlimits2D(minX = limsSp[1, 1], maxX = limsSp[1, 2], minY = limsSp[2, 1], maxY = limsSp[2, 2], includeOr = FALSE) 
+    if(is.null(sortparameters$g.args$xlim))
+        sortparameters$g.args$xlim <- lim.global$xlim
+    if(is.null(sortparameters$g.args$ylim))
+        sortparameters$g.args$ylim <- lim.global$ylim
+    
+    if(nvar == 0){
+        if(is.logical(col)){
+            if(col)
+                colnew <- adegtot$pSp$col
+            else
+                colnew <- "transparent"	## col == FALSE
+        } else {
+            colnew <- col
+        }
+        
+        sortparameters$adepar$pSp$col <- colnew
+        sortparameters$adepar$ppoint$cex <- 0
+        ## create map
+        if(points.or.poly == "points")
+            object <- do.call("s.label", c(list(dfxy = xy.spObj, plot = FALSE, storeData = storeData, pos = pos - 2), 
+                sortparameters$adepar, sortparameters$trellis, sortparameters$g.args))
+        else
+            object <- do.call("s.label", c(list(dfxy = xy.spObj, Sp = substitute(spObj), plot = FALSE, storeData = storeData, pos = pos - 2), 
+                sortparameters$adepar, sortparameters$trellis, sortparameters$g.args))
+        
+    } else if(nvar > 0) {
+        listGraph <- list()
+        for(i in 1:nvar) {
+            defaultpar <- list(psub = list(text = names(spObj)[i]), plabels = list(cex = 0))
+            adepar.i <- modifyList(defaultpar, sortparameters$adepar, keep.null = TRUE)
+            
+            if(points.or.poly == "points" & is.numeric(spObj at data[, i])){
+                ## points and numeric -> s.value
+                if(is.logical(col))
+                    colnew <- NULL ## default in s.value
+                else colnew <- col
+                listGraph <- c(listGraph, do.call("s.value", c(list(dfxy = xy.spObj, z = if(scale) scale (spObj at data[, i]) else spObj at data[, i], plot = FALSE, 
+                    col = colnew, storeData = storeData, pos = pos - 2), adepar.i, sortparameters$trellis, sortparameters$g.args)))
+            } else if(points.or.poly == "points" & is.factor(spObj at data[, i])) {
+                if(is.logical(col))
+                    colnew <- adegtot$ppalette$quali(nlevels(as.factor(spObj at data[, i])))
+                adepar.i <- modifyList(list(ppoints = list(cex = 2)), adepar.i , keep.null = TRUE)
+                listGraph <- c(listGraph, do.call("s.class", c(list(dfxy = xy.spObj, starSize = 0, ellipseSize = 0, fac = spObj at data[, i], plot = FALSE, 
+                    col = colnew, storeData = storeData, pos = pos - 2), adepar.i, sortparameters$trellis, sortparameters$g.args)))
+            } else {
+                if(is.logical(col)) {
+                    if(col) {
+                        if(is.numeric(spObj at data[, i])) {
+                            nclasspretty <- length(pretty(spObj at data[, i], nclass)) - 1
+                            nclasspretty <- length(pretty(spObj at data[, i], nclasspretty)) - 1 ## repeated in order to have always the same number of class
+                            colnew <- adegtot$ppalette$quanti(nclasspretty)
+                        } else
+                            colnew <- adegtot$ppalette$quali(nlevels(as.factor(spObj at data[, i])))[as.factor(spObj at data[, i])]
+                    }
+                } else {
+                    colnew <- col
+                }
+                adepar.i$pSp$col <- colnew
+                adepar.i$ppoint$cex <- 0
+                
+                ## create map
+                listGraph <- c(listGraph, do.call("s.label", c(list(dfxy = xy.spObj, Sp = substitute(spObj[,i]), plot = FALSE, storeData = storeData, pos = pos - 2), adepar.i, sortparameters$trellis, sortparameters$g.args)))
+                
+            } 
+        }
+        
+        if(nvar == 1)
+            object <- listGraph[[1]]
+        else {
+            names(listGraph) <- names(spObj)
+            posmatrix <- layout2position(.n2mfrow(nvar), ng = nvar)
+            object <- new(Class = "ADEgS", ADEglist = listGraph, positions = posmatrix, add = matrix(0, ncol = nvar, nrow = nvar), Call = match.call())
+        }
+    }
+    
+    
+    if(plot)
+        print(object)
+    invisible(object) 
+}
+
diff --git a/R/utils.R b/R/utils.R
new file mode 100644
index 0000000..fd6adfc
--- /dev/null
+++ b/R/utils.R
@@ -0,0 +1,486 @@
+repList <- function(x, times) {
+  if(times == 1)
+    l <- x
+  else {
+    l <- list()
+    l <- lapply(1:times, function(i) x)
+    names(l) <- paste("l", sapply(1:times, function(i) i), sep = "")
+  }
+  return(l)
+}
+
+
+.proportional_map <- function(z, maxz) {
+  ## Proportional Symbol Mapping in R
+  ## Susumu Tanimura, Chusi Kuroiwa, Tsutomu Mizota
+  ## Journal of Sratistical Software January 2006
+  sizes <- (abs(z) / maxz) ^ 0.57
+  return(sizes) 
+}
+
+
+.symbol2pch <- function(symbol){
+    ## give the pch associated to some symbol names (used in *.value)
+    res <- 22 ## square by default
+    if(symbol == "circle"){
+        res <- 21
+    }  else if(symbol == "diamond"){
+        res <- 23
+    } else if(symbol == "uptriangle"){
+        res <- 24
+    } else if(symbol == "downtriangle"){
+        res <- 25
+    }
+    return(res)
+}
+
+
+.textpos <- function(xx, yy, origin = c(0, 0), n = length(xx)) {
+  ## justification for labels and positions used in s.arrow and s.corcircle
+   
+  if(is.vector(origin) & length(origin) == 2) {
+    xx <- xx - origin[1]
+    yy <- yy - origin[2]
+  } else
+    stop("Invalid argument 'origin'")
+  
+  justif <- matrix(0, nrow = 2, ncol = n)
+  for(i in 1:n)
+    ## text justification
+    ## move labels (w/2 for left/right or h/2 for bottom/top)
+    if(yy[i] > 0) {
+      if(abs(xx[i]) < yy[i])
+        justif[, i] <- c(0, 1)
+      else if(xx[i] < 0)
+        justif[, i] <- c(-1, 0)
+      else
+        justif[, i] <- c(1, 0)
+    } else { ## y<=0     
+      if(abs(xx[i]) < abs(yy[i]))
+        justif[, i] <- c(0, -1)
+      else if(xx[i] < 0)
+        justif[, i] <- c(-1, 0)
+      else
+        justif[, i] <- c(1, 0)
+    }
+  return(justif)
+}
+
+
+.setposition <- function(position) {
+  ## specify where to draw grid text
+  if(is.character(position)) {
+    if(position == "bottomleft") {
+      posi <- c(unit(0.05, "npc"), unit(0.02, "npc"))
+      just <- c("left", "bottom")
+    } else if(position == "bottomright") {
+      posi <- c(unit(0.95, "npc"), unit(0.02, "npc"))
+      just <- c("right", "bottom")
+    } else if(position == "topleft") {
+      posi <- c(unit(0.05, "npc"), unit(0.98, "npc"))
+      just <- c("left", "top")
+    } else if(position == "topright") {
+      posi <- c(unit(0.95, "npc"), unit(0.98, "npc"))
+      just <- c("right", "top")
+    } else
+      stop("Wrong position")
+  } else {
+    posi <- position
+    just <- c("left", "bottom")
+  }
+  return(list(posi = posi, just = just))
+}
+
+
+.getgrid <- function(xlim, ylim, nbgrid = 5, origin, asp) {
+  ## specify where to draw grid lines
+  if(missing(origin)) {
+    ## i.e. porigin.include = FALSE
+    origin <- c(pretty(xlim, n = nbgrid)[1], pretty(ylim, n = nbgrid)[1])
+  } 
+  minX <- xlim[1]
+  minY <- ylim[1]
+  maxX <- xlim[2]
+  maxY <- ylim[2]
+  
+  origin <- rep(origin, le = 2)
+  cgrid.y <- diff(pretty(ylim, n = nbgrid))[1]
+  cgrid.x <- diff(pretty(xlim, n = nbgrid))[1]
+  
+  if(asp == "iso") {
+    if(diff(xlim) > diff(ylim))
+      cgrid.x <- cgrid.y
+    else
+      cgrid.y <- cgrid.x
+  }
+  
+  if(is.na(cgrid.x) || is.na(cgrid.y))
+    stop("error while calculating grid")
+  
+  v0 <- origin[1]
+  if((origin[1] + cgrid.x) <= maxX)
+    v0 <- c(v0, seq(origin[1] + cgrid.x, maxX, by = cgrid.x))
+  if((origin[1] - cgrid.x >= minX))
+    v0 <- c(v0, seq(origin[1] - cgrid.x, minX, by = -cgrid.x))
+  v0 <- sort(v0[v0 >= minX & v0 <= maxX])
+  
+  h0 <- origin[2]
+  if((origin[2] + cgrid.y) <= maxY)
+    h0 <- c(h0, seq(origin[2] + cgrid.y, maxY, by = cgrid.y))
+  if((origin[2] - cgrid.y >= minY))
+    h0 <- c(h0, seq(origin[2] - cgrid.y, minY, by = -cgrid.y))
+  h0 <- sort(h0[h0 >= minY & h0 <= maxY])
+
+  ## clean near-zero values
+  delta <- diff(range(v0))/nbgrid
+  if (any(small <- abs(v0) < 1e-14 * delta)) 
+      v0[small] <- 0
+  delta <- diff(range(h0))/nbgrid
+  if (any(small <- abs(h0) < 1e-14 * delta)) 
+      h0[small] <- 0
+  
+  res <- list(x0 = c(v0, rep(NA, length.out = length(h0))), x1 = c(v0, rep(NA, length.out = length(h0)))
+    , y0 = c(rep(NA, length.out = length(v0)), h0), y1 = c(rep(NA, length.out = length(v0)), h0), d = signif(cgrid.x, 3))
+  return(res)
+}
+
+
+setlimits1D <- function(mini, maxi, origin, includeOr) {
+  ## computes limits for 1D plots
+  if(includeOr) {
+    newvalu <- .includeorigin(origin, mini, maxi)
+    mini <- newvalu[1L]
+    maxi <- newvalu[2L]
+  }
+  ## add 10% in both directions
+  if(abs(diff(c(mini, maxi))) > .Machine$double.eps ^ 2)
+    res <- c(mini, maxi) + c(-1, 1) * diff(c(mini, maxi)) / 10
+  else { ## if there is only one value
+    if(mini < .Machine$double.eps ^ 2)
+  	  res <- mini + 0.02 * c(-1, 1)
+    else
+      res <- mini + c(-1, 1) * abs(mini) / 10 
+  }
+  return(res)
+}
+
+
+## if aspect.ratio == "iso", we must have identical limits range in x and y
+setlimits2D <- function(minX, maxX, minY, maxY, origin = c(0, 0), aspect.ratio = "iso", includeOr) {
+  origin <- rep(origin, length.out = 2)
+  if(includeOr) { ## to include origin
+    newvalu <- list(.includeorigin(origin[1], minX, maxX), .includeorigin(origin[2], minY, maxY))
+    minX <- newvalu[[1L]][1L]
+    minY <- newvalu[[2L]][1L]
+    maxX <- newvalu[[1L]][2L]
+    maxY <- newvalu[[2L]][2L]
+  }
+  
+  ## interval sizes
+  interX <- diff(c(minX, maxX))
+  interY <- diff(c(minY, maxY))
+  if(aspect.ratio == "iso") { ## same limits (to have iso square)
+    biggest <- max(c(max(interX, interY)))
+    if(which(c(interX, interY) == biggest)[1] == 1) { ## biggest is in X
+      minY <- minY - (interX - interY) / 2
+      maxY <- maxY + (interX - interY) / 2
+    } else { ## biggest is in Y
+      minX <- minX - (interY - interX) / 2
+      maxX <- maxX + (interY - interX) / 2
+    }
+  }
+  
+  if(interX > .Machine$double.eps ^ 2 || interY > .Machine$double.eps ^ 2) {
+  	xvalu <- c(minX, maxX) + c(-1, 1) * diff(c(minX, maxX)) / 10
+  	yvalu <- c(minY, maxY) + c(-1, 1) * diff(c(minY, maxY)) / 10
+  } else {
+    xvalu <- c(minX, maxX) + c(-1, 1) * abs(max(minX, minY)) / 10
+  	yvalu <- c(minY, maxY) + c(-1, 1) * abs(max(minX, minY)) / 10
+  }
+  
+  return(list(xlim = xvalu, ylim = yvalu))
+}
+
+
+.includeorigin <- function(origin, value1, value2) {
+  ## compute limits including origin
+  return(range(c(origin, value1, value2)))
+}
+
+
+## separates a list of parameters to obtain 4 lists
+## the first corresponds to 'padegraphic'
+## the second to lattice parameters
+## the third to graphics arguments
+## the last to unused parameters
+sortparamADEg <- function(...) {
+
+  if(try(is.list(...), silent = TRUE) == TRUE) 
+    dots <- as.list(...)
+  else
+    dots <- list(...)
+  
+  classtest <- try(list(...), silent = TRUE)
+  if(class(classtest) == "try-error")
+    stop("wrong parameters list, error in sortparamADEg")
+  
+  trellis <- list()
+  adegpar <- list()
+  g.args <- list()
+  stats <- list()
+  s.misc <- list()
+  rest <- list()
+
+  if(length(dots)) {
+    
+    ## compare to trellis parameters
+    select <- separation(... , pattern = 1)
+    trellis <- select[[1L]]
+    rest <- select[[2L]]
+    
+    ## removing sp.layout items
+    if(length(rest)) {
+      indix2 <- pmatch(names(rest), "sp.layout")
+      if(any(!is.na(indix2))) {
+        whereis <- which(!is.na(indix2))
+        g.args <- list("sp.layout" = rest[[whereis]])
+        rest <- rest[-whereis]
+      }
+    }
+
+    ## compare to adegpar parameters (pattern = 0 by default)
+    if(length(rest)) {
+      select <- separation(rest) 
+      adegpar <- select[[1L]]
+      rest <- select[[2L]]
+    }
+  
+    ## removing g.args items
+    if(length(rest)) {
+      pattern.g.args <- c("xlim", "ylim", "main", "sub", "xlab", "ylab", "Sp", "nbobject", "samelimits", "scales", "key", "colorkey")
+      pmatch.g.args <- pmatch(names(rest), pattern.g.args)
+      indix <- which(!is.na(pmatch.g.args))
+      pmatch.g.args <- pmatch.g.args[!is.na(pmatch.g.args)]
+      if(length(indix)) {
+        g.args <- c(g.args, rest[indix])
+        names(g.args)[(1 + length(g.args) - length(pmatch.g.args)):length(g.args)] <- c(pattern.g.args[pmatch.g.args])
+        rest <- rest[-indix]
+      }
+    }
+  }
+  return(list(adepar = adegpar, trellis = trellis, g.args = g.args, rest = rest))
+}
+
+
+########################################################################
+###                         FROM MAPTOOLS                        #######
+########################################################################
+
+.pointLabel <- function(x, y = NULL, labels, width, height, limits, xyAspect, allowSmallOverlap = FALSE, trace = FALSE) {
+  ## xyAspect: width_in/height_inch of the current panel
+  ## limits would have been setted before (in ADEg.S2 prepare)
+  ## width and height de rectangle en 'npc' (fig in original code__maptools package)
+  ## labels <- graphicsAnnot(labels)
+  ## to do before
+  ## TODO redo
+  boundary <- c(limits$xlim, limits$ylim)
+  
+  toUnityCoords <- function(xy) {
+    return(list(x = (xy$x - boundary[1]) / (boundary[2] - boundary[1]) * xyAspect, y = (xy$y - boundary[3]) / (boundary[4] - boundary[3]) / xyAspect))
+  }
+  
+  toUserCoords <- function(xy) {
+    return(list(x = boundary[1] + xy$x / xyAspect * (boundary[2] - boundary[1]), y = boundary[3] + xy$y * xyAspect * (boundary[4] - boundary[3])))
+  }
+  
+  z <- xy.coords(x, y, recycle = TRUE)
+  z <- toUnityCoords(z)
+  x <- z$x
+  y <- z$y
+  if(allowSmallOverlap) 
+    nudgeFactor <- 0.02
+  n_labels <- length(x)
+  gen_offset <- function(code) {
+    c(-1, -1, -1, 0, 0, 1, 1, 1)[code] * (width / 2) + (0 + 1i) * c(-1, 0, 1, -1, 1, -1, 0, 1)[code] * height / 2
+  }
+  
+  rect_intersect <- function(xy1, offset1, xy2, offset2) {  ##intersections calculations
+    w <- pmin(Re(xy1 + offset1 / 2), Re(xy2 + offset2 / 2)) - pmax(Re(xy1 - offset1 / 2), Re(xy2 - offset2 / 2))
+    h <- pmin(Im(xy1 + offset1 / 2), Im(xy2 + offset2 / 2)) - pmax(Im(xy1 - offset1 / 2), Im(xy2 - offset2 / 2))
+    w[w <= 0] <- 0
+    h[h <= 0] <- 0
+    w * h
+  }
+  
+  nudge <- function(offset) {
+    doesIntersect <- rect_intersect(xy[rectidx1] + offset[rectidx1], rectv[rectidx1], xy[rectidx2] + offset[rectidx2], rectv[rectidx2]) > 0
+    pyth <- abs(xy[rectidx1] + offset[rectidx1] - xy[rectidx2] - offset[rectidx2]) / nudgeFactor
+    eps <- 1e-10
+    for (i in which(doesIntersect & pyth > eps)) {
+      idx1 <- rectidx1[i]
+      idx2 <- rectidx2[i]
+      vect <- (xy[idx1] + offset[idx1] - xy[idx2] - offset[idx2]) / pyth[idx1]
+      offset[idx1] <- offset[idx1] + vect
+      offset[idx2] <- offset[idx2] - vect
+    }
+    offset
+  }
+  
+  objective <- function(gene) { ## score calculations
+    offset <- gen_offset(gene)
+    if(allowSmallOverlap) 
+      offset <- nudge(offset)
+    if(!is.null(rectidx1)) 
+      area <- sum(rect_intersect(xy[rectidx1] + offset[rectidx1], rectv[rectidx1], xy[rectidx2] + offset[rectidx2], rectv[rectidx2]))
+    else 
+      area <- 0
+    n_outside <- sum(Re(xy + offset - rectv / 2) < 0 | Re(xy + offset + rectv / 2) > xyAspect | Im(xy + offset - rectv / 2) < 0 | Im(xy + offset + rectv / 2) > 1 / xyAspect)
+    if(is.na(n_outside))
+      n_outside <- 0 ## TODO: to correct, n_outside sometimes NA
+    res <- 1000 * area + n_outside
+    res
+  }
+  
+  xy <- x + (0 + 1i) * y
+  rectv <- width + (0 + 1i) * height
+  rectidx1 <- rectidx2 <- array(0, (length(x)^2 - length(x)) / 2)
+  k <- 0
+  for(i in 1:length(x)) {
+    for(j in seq(len = (i - 1))) {
+      k <- k + 1
+      rectidx1[k] <- i
+      rectidx2[k] <- j
+    }
+  }
+  
+  canIntersect <- rect_intersect(xy[rectidx1], 2 * rectv[rectidx1], xy[rectidx2], 2 * rectv[rectidx2]) > 0
+  rectidx1 <- rectidx1[canIntersect]  ## which intersect with those in rectidx2
+  rectidx2 <- rectidx2[canIntersect]
+  if(trace)
+    cat("possible intersects = ", length(rectidx1), "\n")
+  if(trace) 
+    cat("portion covered = ", sum(rect_intersect(xy, rectv, xy, rectv)), "\n")
+  ## simulated annealing
+  SANN <- function() {
+    ## initialisation
+    gene <- rep(8, n_labels) ## 'rep' is best to begin at center
+    score <- objective(gene) ## initial score 
+    bestgene <- gene
+    bestscore <- score
+    T <- 2.5 ## pseudo initial temperature
+    for (i in 1:50) {
+      k <- 1
+      for (j in 1:50) {
+        newgene <- gene
+        newgene[sample(1:n_labels, 1)] <- sample(1:8, 1)
+        newscore <- objective(newgene)  ## score
+        
+        if(newscore <= score || runif(1) < exp((score - newscore) / T)) {
+          ## empirical law to accept differences: if 'newscore' is better or with a proba exp(Dscorce/T)
+          k <- k + 1
+          score <- newscore
+          gene <- newgene
+        }
+        if(score <= bestscore) {
+          bestscore <- score
+          bestgene <- gene
+        }
+        if(bestscore == 0 || k == 10) 
+          break
+      }
+      if(bestscore == 0) ## no variation
+        break
+      if(trace)
+        cat("overlap area =", bestscore, "\n")
+      T <- 0.9 * T ## the temperature regularly decreases to become stable
+    }
+    
+    if(trace) 
+      cat("overlap area =", bestscore, "\n")
+    nx <- Re(xy + gen_offset(bestgene))
+    ny <- Im(xy + gen_offset(bestgene))
+    return(list(x = nx, y = ny))
+  }
+  xy <- SANN()
+  xy <- toUserCoords(xy)
+  return(xy)
+}
+
+
+
+## check if z is included in breaks
+## no default value
+breakstest <- function(breaki, zi, n) {
+  breaki <- sort(breaki, decreasing = TRUE)
+  if(max(breaki) < max(zi) | min(breaki) > min(zi)) {
+    zbis <- pretty(zi, n)
+    if(max(breaki) < max(zi)) {
+      warning(paste("breaks given does not include z limits,  break added ", max(zbis), sep = " "), call. = FALSE)
+      breaki <- c((max(zbis)), breaki)
+    }
+    if(min(breaki) > min(zi)) {
+      warning(paste("breaks given does not include z limits, break added ", min(zbis), sep = " "), call. = FALSE)
+      breaki <- c(breaki, min(zbis))
+    }
+  }
+  return(breaki)
+}
+
+
+################ for axis.....
+## extract from
+## Lattice Graphs { Control of Panel of Panel & Strip Borders
+## J H Maindonald
+## http://www.maths.anu.edu.au/~johnm
+axis.L <- function(side, ..., line.col) {
+  col <- trellis.par.get("axis.text")$col
+  axis.default(side, ..., line.col = col)
+}
+
+
+.textsize <- function(labels, plabels) {
+  ## can be improved see s1d.barchart for non-trivial rotation
+  srt <- 0
+  if(is.numeric(plabels$srt)) 
+    srt <- plabels$srt[1]
+  else {
+    if(plabels$srt[1] == "horizontal") 
+      srt <- 0
+    else if(plabels$srt[1] == "vertical") 
+      srt <- 90
+  }
+  
+  if(srt == 90) { 
+    h <- (convertHeight(stringWidth(labels), unitTo = "native", valueOnly = TRUE) + convertHeight(stringWidth("h"), unitTo = "native", valueOnly = TRUE) / 2) * rep(plabels$cex, length.out = length(labels))
+    w <- (convertWidth(stringHeight(labels), unitTo = "native", valueOnly = TRUE) + convertWidth(stringHeight("m"), unitTo = "native", valueOnly = TRUE) / 2) * rep(plabels$cex, length.out = length(labels))
+  } else { ## if 0 or an other angle
+    w <- (convertWidth(stringWidth(labels), unitTo = "native", valueOnly = TRUE) + convertWidth(stringWidth("m"), unitTo = "native", valueOnly = TRUE) / 2) * rep(plabels$cex, length.out=length(labels))
+    h <- (convertHeight(stringHeight(labels), unitTo = "native", valueOnly = TRUE) + convertHeight(stringHeight("h"), unitTo = "native", valueOnly = TRUE) / 2) * rep(plabels$cex, length.out=length(labels))
+  }
+  return(list(w = w, h = h, srt = srt))
+}
+
+
+.expand.call <- function(thecall, eval.formals = TRUE) {
+  ## takes a call as argument and return a "cleaned" call where argument names are filled, and unset non empty formals are added and eventually evaluated using the call as environment
+  ## supplied args:
+  ans <- as.list(thecall)
+  
+  ## possible args:
+  frmls <- formals(as.character(ans[[1]]))
+  ## remove formal args with no presets:
+  frmls <- frmls[!sapply(frmls, is.symbol)]
+  add <- which(!(names(frmls) %in% names(ans)))
+  frmls <- frmls[add]
+  
+  if(eval.formals) {
+    ## evaluate the call locally and recursively
+    frmls.new <- lapply(frmls, function(x) do.call("substitute", list(x, c(ans[-1], frmls))))
+    while(!isTRUE(all.equal(frmls, frmls.new))) {
+      frmls <- frmls.new
+      frmls.new <- lapply(frmls, function(x) do.call("substitute", list(x, c(ans[-1], frmls))))
+    }
+  }
+  return(c(ans, frmls))
+}
+
diff --git a/R/utilsADEgS.R b/R/utilsADEgS.R
new file mode 100644
index 0000000..2e92593
--- /dev/null
+++ b/R/utilsADEgS.R
@@ -0,0 +1,238 @@
+plotEig <- function(eigvalue, nf, xax = 1, yax = 2, col.plot = "black", col.kept = "grey", col = "white", facets = NULL, plot = TRUE, storeData = FALSE, pos = -1, ...) {
+  ## prepare
+  col <- rep(col, length(eigvalue))
+  col[nf] <- col.kept
+  col[c(xax, yax)] <- col.plot
+ 
+  ## parameters management
+  sortparameters <- sortparamADEg(...)
+  params <- list()
+  params$adepar <- list(ppolygons = list(col = col), p1d = list(horizontal = FALSE), psub = list(position = "topright"), pgrid = list(draw = FALSE), pbackground = list(box = FALSE))
+  sortparameters$adepar <- modifyList(params$adepar, sortparameters$adepar, keep.null = TRUE)
+  
+  if(is.null(facets) || isTRUE(sortparameters$g.args$samelimits)) {
+    lim <- c(0, ifelse(is.null(facets), length(eigvalue), max(table(facets)))) + 0.5
+    if(isTRUE(sortparameters$adepar$p1d$horizontal))
+    	params$g.args <- list(ylim = lim)
+    else
+      params$g.args <- list(xlim = lim)
+    
+  	lim.val <- range(eigvalue)
+  	if(lim.val[1] >= 0) {
+	    lim.val <- c(0, lim.val[2] + diff(c(lim.val[1], lim.val[2])) / 10)
+    	if(isTRUE(sortparameters$adepar$p1d$horizontal))
+	  	  params$g.args <- list(xlim = lim.val, ylim = params$g.args$ylim)
+    	else
+	      params$g.args <- list(xlim = params$g.args$xlim, ylim = lim.val)
+	  }
+  } else {
+    params$g.args <- list(xlim = NULL, ylim = NULL)
+  }
+  
+  sortparameters$g.args <- modifyList(params$g.args, sortparameters$g.args, keep.null = TRUE)
+  do.call("s1d.barchart", c(list(score = substitute(eigvalue), pos = pos - 2, plot = plot, facets = facets, storeData = storeData), sortparameters$adepar, sortparameters$trellis, sortparameters$g.args, sortparameters$stats, sortparameters$s.misc, sortparameters$rest))
+}
+
+
+## si ADEgS contenu dans un plus petit espace;
+## oldposition: matrice de position: nrow:number of graphs, col: x0, y0, x1, y1
+## newposition: vector, length 4: x0, y0, x1, y1
+## Calcul: toute les oldpositions: dans newposition.
+## renvoie d'une matrice, 4col, nrow(oldposition) rows.
+## cette indique les nouvelles positions des graphiques dans le reférentiel de refposition
+## test:
+## oldpos <- t(rbind(rep(c(0, 1 / 3, 2 / 3), 2), c(rep(0.5, 3), rep(0, 3)), rep(c(1 / 3, 2 / 3, 1), 2), c(rep(1, 3), rep(0.5, 3))))
+## newpos <- c(0.5, 0.5, 1, 1)
+## .updateadegsposition(oldpos, refpositions)
+.updateADEgSposition <- function(oldposition, refposition) {
+  ## test arguments
+  if(NCOL(oldposition) > 4)
+    stop("wrong position, only 4columns expected")
+  if(any(oldposition[, 1] >= oldposition[, 3]))
+    stop("wrong position given, x0>=x1 cannot work")
+  if(any(oldposition[, 2] >= oldposition[, 4]))
+    stop("wrong position given, y0>=y1 cannot work")
+  if(NCOL(refposition) != 1)
+    stop("error in .updateADEgSposition, several containing graphs given, only one possible")  ## ne devrait jamais jamais arriver!
+  
+  ## formula:
+  ## xnewi <- xoldi * wnew + x0new
+  ## ynewi <- yoldi * hnew + y0new
+  x0o <- oldposition[, 1]
+  x1o <- oldposition[, 3]
+  y0o <- oldposition[, 2]
+  y1o <- oldposition[, 4]
+  wnew <- refposition[3] - refposition[1]
+  hnew <- refposition[4] - refposition[2]
+  ## peut mieux faire (optimisation)
+  calcNew <- function(old, new, wh) {return(old * wh + new)}
+  return(cbind(calcNew(x0o, refposition[1], wnew),
+               calcNew(y0o, refposition[2], hnew),
+               calcNew(x1o, refposition[1], wnew),
+               calcNew(y1o, refposition[2], hnew)))
+}
+
+
+## .getposition: mainly for placing eigen plot.
+## gives coordinates according to string position and width, height wanted
+.getposition <- function(position, w = 0.25, h = 0.25) {
+  if(is.numeric(position) && length(position) == 4)	
+    posnum <- position
+  else if(is.numeric(position) && length(position) == 2)
+    posnum <- c(position[1], position[2], position[1] +  w, position[2] + h)
+  else if(is.character(position)) {
+    position <- match.arg(position[1], choices = c("bottomleft", "bottomright", "topleft", "topright", "none"), several.ok = FALSE)
+    if(position == "bottomleft")
+      posnum <- c(0.0, 0.0, w, h)
+    else if(position == "bottomright")
+      posnum <- c(1 - w, 0.0, 1, h)
+    else if(position == "topleft")
+      posnum <- c(0.0, 1 - h, w, 1)
+    else if(position == "topright")
+      posnum <- c(1 - w, 1 - h, 1, 1)
+    else if(position == "none")
+      posnum <- NULL
+    else
+      stop("Wrong indication of position")
+  }
+  else 
+    stop("Wrong indication of position")
+  return(posnum)
+}
+
+
+## pour adeGs, on doit etre capable de separer facilement les parametres pour pouvoir avoir un adressage specifique pour chaque graphique (ie pas la meme chose poru le sarrow et le slabel dans un scatterdudi)
+## selon les graphiques adeGs nous aurons des pattern differents:
+## ex pour scatter.dudi, nous pouvons imager 'col', 'row', 'eigen' pour distinguer les paramètres spécifiques au graph
+.partoadeg <- function(..., pattern = NULL) {
+  if(is.null(pattern))
+    stop("error in .partoadeg, pattern should be filled")
+  if(try(is.list(...), silent = TRUE) == TRUE)
+    dots <- as.list(...)
+  else dots <- list(...)
+  result <- vector("list", length = length(pattern))
+  result <- lapply(result, as.list)
+  names(result) <- pattern
+	## si deja indique en list
+  if(length(dots)) {
+    whichG <- c()
+    then <- c()
+    ## pour ceux indiquer avec des .
+    splitgrp <- sapply(names(dots), FUN = function(x) {strsplit(x, ".", fixed=TRUE)})
+    for(i in 1:length(splitgrp)) {
+      ## premier niveaux quel graph
+      whichG <- c(whichG, splitgrp[[i]][1])
+      ## deuxieme niveau si il y a le nom suivant (qui etait colle avec un .)
+      if(length(splitgrp[[i]]) > 1) { ## un second element
+        then <- c(then, paste(splitgrp[[i]][2:length(splitgrp[[i]])], collapse = "."))
+      }
+      else
+        then <- c(then, NA)
+    }
+    indix <- pmatch(whichG, pattern, duplicates.ok = TRUE)
+    notna <- which(!is.na(indix)) ## ne garder que les non na 
+    arena <- which(is.na(indix))  ## position dans indix des NA ie: ceux qui n'ont pas de match
+    for(i in 1:length(result)) {
+      sublist <- result[[i]]    ## sous list deja trouve... a priori list
+      if(any(indix[notna] == i)) {  ## si un indix vaut i=> a mettre dans result
+                                    ## soit dire une liste soiton a dans then
+        toselect <- which(indix == i)
+        for(have2 in 1:length(toselect))
+          if(!is.na(then[toselect[have2]])) { ## a ete renseigne avec un point ensuite
+            newlist <- c(list(), dots[toselect[have2]])
+            names(newlist) <- then[toselect[have2]]
+            sublist <- c(sublist, newlist)
+          }
+          else  ## c un na na donc ensuite on avait une liste
+            sublist <- c(sublist, dots[[toselect[have2]]])
+      }
+      if(length(arena)) ## on a en plus des na, donc des parameteres pour tous
+        selectNa <- indix[arena]
+      sublist <- c(sublist, dots[arena])
+      if(!is.null(sublist))
+        result[[i]] <- sublist
+    }}
+  return(result)
+}
+
+.n2mfrow <- function(nr.plots) {
+  ## inspired by n2mfrow but we change the default when the number of graphs is <6
+  if (nr.plots <= 3) 
+    c(1, nr.plots)
+  else if (nr.plots <= 6) 
+    c(2, (nr.plots + 1) %/% 2)
+  else if (nr.plots <= 9)
+    c((nr.plots + 2) %/% 3, 3)
+  else if (nr.plots <= 12)
+    c((nr.plots + 3) %/% 4, 4)
+  else c(nrow <- ceiling(sqrt(nr.plots)), ceiling(nr.plots / nrow))
+}
+
+## Get positions matrix for ADEgs according  a given layout
+## strongly inspired by the layout function
+## ng: number of positions to get
+layout2position <- function(mat, widths = rep(1, NCOL(mat)), heights = rep(1, NROW(mat)), ng, square = FALSE) {
+  if(is.vector(mat)) {
+    if(missing(ng)) ng <- mat[1] * mat[2]
+    mat <- matrix(c(1:ng, rep(0, length.out = ((mat[1] * mat[2]) - ng))), nrow = mat[1], byrow = TRUE)
+    if(missing(widths))
+      widths <- rep(1, ncol(mat))
+    if(missing(heights))
+      heights <- rep(1, nrow(mat))
+  }
+  if(NROW(mat) != length(heights)) stop("wrong number of heigths given", call. = FALSE)
+  if(NCOL(mat) != length(widths)) stop("wrong number of widths given", call. = FALSE) 
+  nbgraph <- max(mat)
+  ## get xi position and yi position
+  xi <- c(0)
+  yi <- c(0)
+  ## here, width given such as proportional colums.
+  ## so the sum(width)/length(widths) == 1
+  ## more units to take in account"
+  if(square == TRUE) {
+    wi <- widths / max(length(widths), length(heights))
+  	hi <- heights / max(length(widths), length(heights))
+  } else {    
+  	wi <- widths / sum(widths)
+  	hi <- heights / sum(heights)
+  }
+  
+  ## layout from left to right, up to bottom 
+  for(i in 1:length(wi))
+    xi <- c(xi, xi[i] + wi[i])
+  for(i in 1:length(hi))
+    yi <- c(yi, yi[i] + hi[i])
+  
+  yi <- rev(yi)
+  pos <- c()
+  for(i in 1:nbgraph) { ## for each graph, get the positions as x0, y0, x1, y1
+    indx <- which(mat == i, arr.ind = TRUE)
+    if(length(indx) == 0) { ## just in case
+      warning(paste("in layout2position, a graph position is missing, no graph", i, "defined", sep = " "), call. = FALSE)
+      pos <- rbind(pos, rep(0, 4))
+    }
+    else
+      pos <- rbind(pos, c(xi[min(indx[, 2])], yi[(max(indx[, 1]) + 1)], xi[(max(indx[, 2]) + 1)], yi[min(indx[, 1])]))
+  }
+  return(pos)
+}
+
+
+## For analysis plot (ADEgS creation)
+sortparamADEgS <- function(..., graphsnames, nbsubgraphs = rep(1, length(graphsnames))) {
+  seppara <- .partoadeg(..., pattern = graphsnames)
+  sortparameters <- lapply(seppara, FUN = sortparamADEg)
+  alist <- function(x) {
+    aa <- list()
+    for(i in 1:length(x))
+      aa <- c(aa, x[[i]])
+    aa
+  }
+  tomerge <- lapply(sortparameters, alist)
+  oki <- lapply(tomerge, .mergingList)
+  if(!all(nbsubgraphs == rep(1, length(graphsnames))))
+    for (i in 1:length(nbsubgraphs))
+      oki[[i]] <- repList(oki[[i]], nbsubgraphs[i])
+  return(oki)
+}
+
diff --git a/R/utilsclass.R b/R/utilsclass.R
new file mode 100644
index 0000000..80d1f01
--- /dev/null
+++ b/R/utilsclass.R
@@ -0,0 +1,105 @@
+
+#### revoir cette fonction ####
+.util.ellipse <- function(mx, my, vx, vy, cxy, coeff) {
+  if(!is.finite(mx) | !is.finite(my)) ## levels with no individuals
+    return(NULL)
+  lig <- 100
+  epsi <- 1e-10
+  x <- 0
+  y <- 0
+  if(vx < 0) 
+    vx <- 0
+  if(vy < 0) 
+    vy <- 0
+  if(vx == 0 && vy == 0) 
+    return(NULL)
+  delta <- (vx - vy) * (vx - vy) + 4 * cxy * cxy
+  delta <- sqrt(delta)
+  l1 <- (vx + vy + delta) / 2
+  l2 <- vx + vy - l1
+  if(l1 < 0) 
+    l1 <- 0
+  if(l2 < 0) 
+    l2 <- 0
+  l1 <- sqrt(l1)
+  l2 <- sqrt(l2)
+  test <- 0
+  if(vx == 0) {
+    a0 <- 0
+    b0 <- 1
+    test <- 1
+  }
+  if((vy == 0) && (test == 0)) {
+    a0 <- 1
+    b0 <- 0
+    test <- 1
+  }
+  if(((abs(cxy)) < epsi) && (test == 0)) {
+      if(vx > vy){
+          a0 <- 1
+          b0 <- 0
+      } else {
+          a0 <- 0
+          b0 <- 1
+      }
+    test <- 1
+  }
+  if(test == 0) {
+    a0 <- 1
+    b0 <- (l1 * l1 - vx) / cxy
+    norm <- sqrt(a0 * a0 + b0 * b0)
+    a0 <- a0 / norm
+    b0 <- b0 / norm
+  }
+  a1 <- 2 * pi / lig
+  c11 <- coeff * a0 * l1
+  c12 <- (-coeff) * b0 * l2
+  c21 <- coeff * b0 * l1
+  c22 <- coeff * a0 * l2
+  angle <- 0
+  for (i in 1:lig) {
+    cosinus <- cos(angle)
+    sinus <- sin(angle)
+    x[i] <- mx + c11 * cosinus + c12 * sinus
+    y[i] <- my + c21 * cosinus + c22 * sinus
+    if(is.null(mx + c11 * cosinus + c12 * sinus) || is.null(y[i] <- my + c21 * cosinus + c22 * sinus))
+      print("in util.ellipse x or y null")
+    angle <- angle + a1
+  }
+  return(list(x = x, y = y, seg1 = c(mx + c11, my + c21, mx - c11, my - c21), seg2 = c(mx + c12, my + c22, mx - c12, my - c22)))
+}
+
+## Nouvelle version:
+## principe:
+## 1) calcul de distance entre les points appartenant a un groupe et le centroides du groupe
+## 2) extraction du quantile correspondant a optchull (les % d les plus eloignes forment le polugfone
+## x, y: points, mx, my: coordonnees des centroides, optchull: paramètre voulu pour lenvellope converxe, fac: facteur separeant les poitns
+.util.chull <- function(x, y, mx, my, fac, chullSize) {
+  ## pour chaque groupe calcul des distances
+  chulls <- list()
+  for(i in 1:nlevels(fac)) { ## attention fac est passe en facteur!
+    index <- which(fac == levels(fac)[i])
+    if(length(index) > 0) {
+      x1 <- x[index]
+      y1 <- y[index]
+      dd <- sqrt((x1 - mx[i])^2 + (y1 - my[i])^2) ## distances chaque points a la moyenne
+      tmp_quant <- list()
+      for(quant in chullSize) { ## pour chaque envelope demandee
+        selected <- which(dd <= quantile(dd, quant)) ## points en dessous du quant
+        xin <- x1[selected]
+        yin <- y1[selected]
+        chullchoice <- chull(xin, yin) ## points formant la convex hull
+        x2 <- xin[chullchoice]
+        y2 <- yin[chullchoice]
+        tmp_quant <- c(tmp_quant, list(cbind(x2, y2))) ## coord des points formant le polygone
+      }
+      names(tmp_quant) <- as.character(chullSize)
+    } else
+      tmp_quant <- NULL
+       
+    chulls <- c(chulls, list(tmp_quant))
+  }
+  names(chulls) <- as.character(levels(fac))
+  return(chulls)
+}
+
diff --git a/R/utilskey.R b/R/utilskey.R
new file mode 100644
index 0000000..39bf198
--- /dev/null
+++ b/R/utilskey.R
@@ -0,0 +1,217 @@
+setMethod(
+    f = "addkey",
+    signature = "ADEg",
+    definition = function(object) {
+        object at adeg.par$plegend$drawKey <- TRUE
+        object at g.args$key <- createkey(object)
+        return(object)
+    })
+
+setMethod(
+    f = "createkey",
+    signature = "ADEg",
+    definition = function(object) {
+        if(object at adeg.par$plegend$drawKey){
+            res <- object at g.args$key
+        }
+        else
+            res <- NULL
+        return(res)
+    })
+
+setMethod(
+    f = "createkey",
+    signature = "S2.value",
+    definition = function(object) {
+         return(.createkeyvalue(object, type = "S2"))
+    })
+
+setMethod(
+    f = "createkey",
+    signature = "T.value",
+    definition = function(object) {
+        return(.createkeyvalue(object, type = "T"))
+    })
+
+setMethod(
+    f = "createkey",
+    signature = "S2.class",
+    definition = function(object) {
+         return(.createkeyclass(object, type = "S2"))
+    })
+
+setMethod(
+    f = "createkey",
+    signature = "S1.class",
+    definition = function(object) {
+         return(.createkeyclass(object, type = "S1"))
+    })
+
+setMethod(
+    f = "createkey",
+    signature = "Tr.class",
+    definition = function(object) {
+         return(.createkeyclass(object, type = "Tr"))
+    })
+
+setMethod(
+    f = "createcolorkey",
+    signature = "ADEg",
+    definition = function(object) {
+        if(object at adeg.par$plegend$drawColorKey){
+            res <- object at g.args$legend
+        }
+        else
+            res <- NULL
+        return(res)
+    })
+
+setMethod(
+    f = "createcolorkey",
+    signature = "T.image",
+    definition = function(object) {
+        ## add a small space before the colorkey
+        trellis.par.set(layout.widths = list(axis.key.padding = 1))
+        return(.createcolorkeyimage(object, type = "T"))
+    })
+
+setMethod(
+    f = "createcolorkey",
+    signature = "S2.image",
+    definition = function(object) {
+        ## add a small space before the colorkey
+        trellis.par.set(layout.widths = list(axis.key.padding = 1))
+        return(.createcolorkeyimage(object, type = "S2"))
+    })
+
+
+.createkeyvalue <- function(object, type = c("T", "S2")) {
+    type <- match.arg(type)
+    res <- NULL
+    if(object at adeg.par$plegend$drawKey){
+        res <- list()
+        res$points$pch <- .symbol2pch(object at g.args$symbol)
+        cstnormal <- 5 ## same value in adeg.panel.value
+        if(object at g.args$method == "size"){
+            center <- object at g.args$center
+            breaks <- unique(c(object at s.misc$breaks.update, signif(center, 5)))
+            maxsize <- max(abs(breaks))
+            breaks <- breaks[order(breaks, decreasing = FALSE)]
+            l0 <- length(breaks)
+            breaks <- (breaks[1:(l0 - 1)] + breaks[2:l0]) / 2
+            res$text$lab <- as.character(breaks)
+            size <- breaks - center
+            res$points$cex <- .proportional_map(size, maxsize) * object at adeg.par$ppoints$cex[1] * cstnormal
+            res$points$fill <- object at adeg.par$ppoints$col[ifelse(breaks < center, 1, 2)]
+            res$points$col <- object at adeg.par$ppoints$col[ifelse(breaks < center, 2, 1)]
+            
+        } else if(object at g.args$method == "color"){
+            breaks <- object at s.misc$breaks.update
+            l0 <- length(breaks)
+            res$points$cex <- object at adeg.par$ppoints$cex[1] * cstnormal / 2 * object at adeg.par$plegend$size
+            res$text$lab <- paste("[", breaks[l0], ";", breaks[l0 - 1], "]", sep = "")
+            for(i in (l0 - 1):2)
+                res$text$lab <- c(res$text$lab, paste("]", breaks[i], ";", breaks[i - 1], "]", sep = ""))
+            res$points$fill <- object at adeg.par$ppoints$col[1:length(res$text$lab)]
+            res$points$col <- "black"
+        }
+        res$columns <- length(res$text$lab)
+        res$border <- TRUE
+        res$between <- 0.1 * object at adeg.par$plegend$size
+        res$between.columns <- 0 * object at adeg.par$plegend$size
+        res$padding.text <- 1.2 * max(res$points$cex)
+        res$text$cex <- object at adeg.par$plegend$size
+        if(is.null(object at g.args$key$space)){
+            if(type == "T"){
+                res$x <- 0
+                res$y <- 0
+            } else {
+                res$corner <- c(0,0)
+                res$x <- 0.01
+                res$y <- 0.01
+            }
+        }
+        res$background <- object at adeg.par$pbackground$col
+        res <- modifyList(res, as.list(object at g.args$key), keep.null = TRUE)
+    }
+    return(res)
+}
+
+
+.createkeyclass <- function(object, type = c("S1", "S2", "Tr")) {
+    type <- match.arg(type)
+    res <- NULL
+  
+    if(object at adeg.par$plegend$drawKey){
+        res <- list()
+        if(object at data$storeData) 
+            fac <- as.factor(object at data$fac)
+        else 
+            fac <- as.factor(eval(object at data$fac, envir = sys.frame(object at data$frame)))
+
+        res$text$lab <- levels(fac)
+        res$text$col <- object at adeg.par$plabels$col
+
+        if(object at adeg.par$ppoints$cex > 0){
+            res$points$pch <- object at adeg.par$ppoints$pch
+            res$points$col <- object at adeg.par$ppoints$col
+            res$points$fill <- object at adeg.par$ppoints$fill
+            
+        } else if(!is.null(object at g.args$chullSize)){
+            if(object at g.args$chullSize > 0){
+                res$rectangles$border <- object at adeg.par$ppolygons$border
+                res$rectangles$col <- object at adeg.par$ppolygons$col
+                res$rectangles$alpha <- object at adeg.par$ppolygons$alpha
+            }
+            
+        } else if(object at g.args$ellipseSize > 0){
+            res$rectangles$border <- object at adeg.par$pellipses$border
+            res$rectangles$col <- object at adeg.par$pellipses$col
+            res$rectangles$alpha <- object at adeg.par$pellipses$alpha
+            
+        } else if(object at g.args$starSize > 0){
+            res$lines$col <- object at adeg.par$plines$col
+            res$lines$lty <- object at adeg.par$plines$lty
+            res$lines$lwd <- object at adeg.par$plines$lwd
+        }
+        
+        res$between <- 0.1 * object at adeg.par$plegend$size
+        res$between.columns <- 0 * object at adeg.par$plegend$size
+        res$text$cex <- object at adeg.par$plegend$size
+        
+        if(is.null(object at g.args$key$space)){
+            if(type == "S2"){
+                res$corner <- c(0,0)
+                res$x <- 0.01
+                res$y <- 0.01
+            }
+            
+            if(type == "S1"){
+                res$corner <- c(0,1)
+                res$x <- 0.01
+                res$y <- 0.99
+            }
+            
+            if(type == "Tr"){
+                res$corner <- c(1,1)
+                res$x <- 0.99
+                res$y <- 0.99
+            }
+        }
+        
+        res$background <- object at adeg.par$pbackground$col
+    
+        res <- modifyList(res, as.list(object at g.args$key), keep.null = TRUE)
+    }   
+    return(res)
+}
+
+
+.createcolorkeyimage <- function(object, type = c("T", "S2")) {
+    type <- match.arg(type)
+    res <- NULL
+    if(object at adeg.par$plegend$drawColorKey){
+        res <- list(right = list(fun = draw.colorkey, args = list(key = list(col = object at adeg.par$ppoints$col, at = object at s.misc$breaks.update))))
+    }
+    return(res)
+}
diff --git a/R/utilstriangle.R b/R/utilstriangle.R
new file mode 100644
index 0000000..8a43dc1
--- /dev/null
+++ b/R/utilstriangle.R
@@ -0,0 +1,172 @@
+## projection dans triangle
+## de la base e1=c(1,0,0), e2=c(0,1,0), e3=c(0,0,1)
+## a c(1/sqrt(3), 1/sqrt(3), 1/sqrt(3)), c(-1/sqrt(2),1/sqrt(2),0), c(-1/sqrt(6),-1/sqrt(6),2/sqrt(6))
+.coordtotriangleUnity <- function(mdata3) {
+  x <- mdata3[, 1]
+  y <- mdata3[, 2]
+  z <- mdata3[, 3]
+  return(cbind(0, (y - x) / sqrt(2), (2 * z - x - y) / sqrt(6)))
+}
+
+
+## projection depend also on scale defined by min and max
+## need to rescale coordinates to maintain distances
+## in the new space
+.coordtotriangleM <- function(ta, mini3, maxi3) {
+  data3d <- t(apply(ta, 1, FUN = function(x) {
+    x <- (x - mini3) / (maxi3 - mini3)
+    return(x / sum(x))}))
+  return(.coordtotriangleUnity(data3d))
+}
+
+
+## TODO: redo this, from ade4
+.trranges <- function(df, adjust = TRUE, min3 = NULL, max3 = NULL) {
+  ta <- sweep(df, 1, rowSums(df), "/")
+
+  if(ncol(ta) != 3)
+    stop("Non convenient data")
+  if(min(ta) < 0) 
+    stop("Non convenient data")
+  if((!is.null(min3)) & (!is.null(max3))) 
+    adjust <- TRUE
+  cal <- matrix(0, 9, 3)
+  tb <- t(apply(ta, 1, FUN = function(x) {x / sum(x)}))
+  mini <- apply(tb, 2, min)
+  maxi <- apply(tb, 2, max)
+  mini <- (floor(mini / 0.1)) / 10
+  maxi <- (floor(maxi / 0.1) + 1) / 10
+  mini[mini < 0] <- 0
+  maxi[maxi > 1] <- 1
+  if(!is.null(min3))
+    mini <- min3
+  if(!is.null(max3))
+    maxi <- min3
+  ampli <- maxi - mini
+  amplim <- max(ampli)
+  if(!all(ampli == amplim)) {
+    for (j in 1:3) {
+      k <- amplim - ampli[j]
+      while (k > 0) {
+        if((k > 0) & (maxi[j] < 1)) {
+          maxi[j] <- maxi[j] + 0.1
+          k <- k - 1
+        }
+        if((k > 0) & (mini[j] > 0)) {
+          mini[j] <- mini[j] - 0.1
+          k <- k - 1
+        }
+      }
+    }
+  }
+  cal[1, 1] <- mini[1]
+  cal[1, 2] <- mini[2]
+  cal[1, 3] <- 1 - cal[1, 1] - cal[1, 2]
+  cal[2, 1] <- mini[1]
+  cal[2, 2] <- maxi[2]
+  cal[2, 3] <- 1 - cal[2, 1] - cal[2, 2]
+  cal[3, 1] <- maxi[1]
+  cal[3, 2] <- mini[2]
+  cal[3, 3] <- 1 - cal[3, 1] - cal[3, 2]
+  cal[4, 1] <- mini[1]
+  cal[4, 3] <- mini[3]
+  cal[4, 2] <- 1 - cal[4, 1] - cal[4, 3]
+  cal[5, 1] <- mini[1]
+  cal[5, 3] <- maxi[3]
+  cal[5, 2] <- 1 - cal[5, 1] - cal[5, 3]
+  cal[6, 1] <- maxi[1]
+  cal[6, 3] <- mini[3]
+  cal[6, 2] <- 1 - cal[6, 1] - cal[6, 3]
+  cal[7, 2] <- mini[2]
+  cal[7, 3] <- mini[3]
+  cal[7, 1] <- 1 - cal[7, 2] - cal[7, 3]
+  cal[8, 2] <- mini[2]
+  cal[8, 3] <- maxi[3]
+  cal[8, 1] <- 1 - cal[8, 2] - cal[8, 3]
+  cal[9, 2] <- maxi[2]
+  cal[9, 3] <- mini[3]
+  cal[9, 1] <- 1 - cal[9, 2] - cal[9, 3]
+  mini <- apply(cal, 2, min)
+  mini <- round(mini, digits = 4)
+  maxi <- apply(cal, 2, max)
+  maxi <- round(maxi, digits = 4)
+  ampli <- maxi - mini
+  if(!adjust) {
+    mini <- c(0, 0, 0)
+    maxi <- c(1, 1, 1)
+  }
+  return(list(mini = mini, maxi = maxi))
+}
+
+
+## ## calcul maximum et minimum pour triangle
+## ## data as list
+## .trranges <- function(data, mini, maxi, adjust){
+##   if(is.null(mini))mini <-c(0,0,0)
+##   if(is.null(maxi))maxi <-c(1,1,1)
+##   if(adjust){
+##     if(!is.null(data$frame))
+##       ta <- t(apply(eval(data$ta, envir = sys.frame(data$frame)), 1, function(x) x/sum(x)))
+##     else
+##      ta <- t(apply(data$ta, 1, function(x)x/sum(x)))
+##     tb <- t(apply(ta, 1, function(x) x/sum(x)))
+##     mini <- apply(tb, 2, min)
+##     maxi <- apply(tb, 2, max)
+##     mini <- (floor(mini/0.1))/10
+##     maxi <- (floor(maxi/0.1) + 1)/10
+##     mini[mini < 0] <- 0
+##     maxi[maxi > 1] <- 1
+##   }
+##   ampli <- maxi-mini
+##   amplim <- max(ampli)
+##   if(! all(ampli == amplim)){#on doit avoir la meme chose.
+##     for(i in 1:3){
+##       diffv <- amplim -ampli[i]/2
+##       mini[i] <- mini[i]-diffv
+##       maxi[i] <- maxi[i]+diffv
+##       if(mini[i]<0){
+##         maxi[i] <- maxi[i]-mini[i]
+##         mini[i] <- 0
+##        }
+##       if(maxi[i]>1){
+##         mini[i] <- mini[i]-(maxi[i]-1)
+##         maxi[i] <- 1
+##       }
+##     }
+##   }
+##   if(any(mini<0) | any(maxi>1))
+##     stop("wrong calculus for limits", call.  = FALSE)
+##   ##"ici partie cal non reprise. a voir ensuite
+##   return(list(mini=mini, maxi=maxi))
+## }
+
+
+.showpos <- function(object) {
+  ## from ade4
+  mini <- object at g.args$min3d
+  maxi <- object at g.args$max3d
+  w <- matrix(0, 3, 3)
+  w[1, 1] <- mini[1]
+  w[1, 2] <- mini[2]
+  w[1, 3] <- maxi[3]
+  w[2, 1] <- maxi[1]
+  w[2, 2] <- mini[2]
+  w[2, 3] <- mini[3]
+  w[3, 1] <- mini[1]
+  w[3, 2] <- maxi[2]
+  w[3, 3] <- mini[3]
+  smallT <- .coordtotriangleM(matrix(c(0, 0, 1, 1, 0, 0, 0, 1, 0), byrow = TRUE, ncol = 3), mini3 = rep(0, 3), maxi3 = rep(1, 3))[, -1]
+  A <- smallT[1, ]
+  B <- smallT[2, ]
+  C <- smallT[3, ]
+  shadowS <- .coordtotriangleM(w, c(0, 0, 0), c(1, 1, 1))[, -1]
+  a <- shadowS[1, ]
+  b <- shadowS[2, ]
+  c <- shadowS[3, ]
+  aa <- xyplot(0 ~ 0, xlim = c(-0.7, 0.7), ylim = c(-0.55, 0.9), aspect = "iso", scale = list(draw = FALSE), xlab = NULL, ylab = NULL, par.settings = list(axis.line = list(col = "transparent")),
+               panel = function(...) {
+                 panel.polygon(c(A[1], B[1], C[1]), c(A[2], B[2], C[2]))
+                 panel.polygon(c(a[1], b[1], c[1]), c(a[2], b[2], c[2]), col = grey(0.75))
+               })
+  invisible(aa)
+}
diff --git a/build/vignette.rds b/build/vignette.rds
new file mode 100644
index 0000000..ed40d0a
Binary files /dev/null and b/build/vignette.rds differ
diff --git a/debian/README.test b/debian/README.test
deleted file mode 100644
index e5b78be..0000000
--- a/debian/README.test
+++ /dev/null
@@ -1,8 +0,0 @@
-Notes on how this package can be tested.
-────────────────────────────────────────
-
-This package can be tested by running the script in this directory:
-
-    sh run-unit-test
-
-in order to confirm its integrity.
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 31a8025..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,23 +0,0 @@
-r-cran-adegraphics (1.0-6-1) unstable; urgency=medium
-
-  * New upstream version
-  * cme fix dpkg-control
-  * Convert to dh-r
-  * Canonical homepage for CRAN
-  * d/watch: version=4
-  * debhelper 10
-  * New Build-Depends: r-cran-latticeextra
-
- -- Andreas Tille <tille at debian.org>  Thu, 22 Dec 2016 22:40:10 +0100
-
-r-cran-adegraphics (1.0-5-2) unstable; urgency=medium
-
-  * Fix test dependencies (thanks to Gordon Ball)
-
- -- Andreas Tille <tille at debian.org>  Sun, 03 Jul 2016 21:17:27 +0200
-
-r-cran-adegraphics (1.0-5-1) unstable; urgency=low
-
-  * Initial release (Closes: #819068)
-
- -- Andreas Tille <tille at debian.org>  Wed, 23 Mar 2016 14:31:45 +0100
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index f599e28..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-10
diff --git a/debian/control b/debian/control
deleted file mode 100644
index 1888809..0000000
--- a/debian/control
+++ /dev/null
@@ -1,29 +0,0 @@
-Source: r-cran-adegraphics
-Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: Andreas Tille <tille at debian.org>
-Section: gnu-r
-Priority: optional
-Build-Depends: debhelper (>= 10),
-               dh-r,
-               r-base-dev,
-               r-cran-ade4,
-               r-cran-kernsmooth,
-               r-cran-lattice,
-               r-cran-rcolorbrewer,
-               r-cran-sp,
-               r-cran-latticeextra
-Standards-Version: 3.9.8
-Vcs-Browser: https://anonscm.debian.org/viewvc/debian-med/trunk/packages/R/r-cran-adegraphics/trunk/
-Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/R/r-cran-adegraphics/trunk/
-Homepage: https://cran.r-project.org/package=adegraphics
-
-Package: r-cran-adegraphics
-Architecture: all
-Depends: ${misc:Depends},
-         ${R:Depends}
-Recommends: ${R:Recommends}
-Suggests: ${R:Suggests}
-Description: GNU R lattice-based package for the representation of multivariate data
- This GNU R package provides graphical functionalities for the
- representation of multivariate data. It is a complete re-implementation
- of the functions available in the 'ade4' package.
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 3a86c48..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,32 +0,0 @@
-Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: adegraphics
-Upstream-Contact: Aurélie Siberchicot <aurelie.siberchicot at univ-lyon1.fr>
-Source: https://cran.r-project.org/package=adegraphics
-
-Files: *
-Copyright: 2013-2016 Aurélie Siberchicot <aurelie.siberchicot at univ-lyon1.fr>
-                     Stéphane Dray, with contributions from Jean Thioulouse.
-                     Based on earlier work by Alice Julien-Laferrière.
-License: GPL-2+
-
-Files: debian/*
-Copyright: 2016 Andreas Tille <tille at debian.org>
-License: GPL-2+
-
-License: GPL-2+
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
- .
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
- .
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- .
- On Debian systems, the complete text of the GNU General Public
- License can be found in `/usr/share/common-licenses/GPL-2'.
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index 960011c..0000000
--- a/debian/docs
+++ /dev/null
@@ -1,3 +0,0 @@
-tests
-debian/README.test
-debian/tests/run-unit-test
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 68d9a36..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/make -f
-
-%:
-	dh $@ --buildsystem R
diff --git a/debian/source/format b/debian/source/format
deleted file mode 100644
index 163aaf8..0000000
--- a/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
deleted file mode 100644
index 26bc112..0000000
--- a/debian/tests/control
+++ /dev/null
@@ -1,3 +0,0 @@
-Tests: run-unit-test
-Depends: @, r-cran-testthat, r-cran-spdep, r-cran-maptools
-Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
deleted file mode 100644
index 4a4773d..0000000
--- a/debian/tests/run-unit-test
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh -e
-
-oname=adegraphics
-pkg=r-cran-`echo $oname | tr [A-Z] [a-z]`
-
-if [ "$ADTTMP" = "" ] ; then
-  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
-fi
-cd $ADTTMP
-cp -a /usr/share/doc/${pkg}/tests/* $ADTTMP
-for rscript in *.R ; do
-   LC_ALL=C R --no-save < $rscript
-done
-rm -fr $ADTTMP/*
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index 7a7ec5a..0000000
--- a/debian/watch
+++ /dev/null
@@ -1,3 +0,0 @@
-version=4
-http://cran.r-project.org/src/contrib/adegraphics_([-0-9\.]*).tar.gz
-
diff --git a/inst/doc/adegraphics.R b/inst/doc/adegraphics.R
new file mode 100644
index 0000000..d549488
--- /dev/null
+++ b/inst/doc/adegraphics.R
@@ -0,0 +1,335 @@
+## ----label=chunk1--------------------------------------------------------
+library(ade4)
+library(adegraphics)
+args(s.label)
+
+## ----label=fig-gargsVSclass, include=TRUE, echo=FALSE, fig.width=7, fig.height=8----
+source("gargsVSclass.R")
+
+## ----label=chunk2--------------------------------------------------------
+data(olympic)
+pca1 <- dudi.pca(olympic$tab, scannf = FALSE)
+
+## ----label=plot1, fig.height=4, fig.width=4------------------------------
+g1 <- s1d.barchart(pca1$eig, p1d.horizontal = F, ppolygons.col = "white")
+
+## ----label=chunk3--------------------------------------------------------
+class(g1)
+showClass("C1.barchart")
+
+## ----label=chunk4--------------------------------------------------------
+slotNames(g1)
+
+## ----label=chunk5--------------------------------------------------------
+g1 at data
+
+## ----label=plot2, fig.width=4, fig.height=4------------------------------
+g2 <- s.corcircle(pca1$co)
+
+## ----label=chunk6--------------------------------------------------------
+class(g2)
+g2 at g.args
+
+## ----label=plot3, fig.width=4, fig.height=4------------------------------
+update(g2, fullcircle = FALSE)
+g2 at g.args
+
+## ----label=chunk7--------------------------------------------------------
+getcall(g1) ## equivalent to g1 at Call
+
+## ----label=plot4, fig.width=4, fig.height=4------------------------------
+g3 <- s.label(pca1$li)
+g4 <- s.arrow(5 * pca1$c1, add = TRUE)
+class(g4)
+
+## ----label=plot5, fig.width=4, fig.height=4------------------------------
+zoom(g3, zoom = 2, center = c(2, -2))
+
+## ----label=chunk8--------------------------------------------------------
+fac.score <- factor(olympic$score < 8000, labels = c("MT8000", "LT8000"))
+
+## ----label=plot6, fig.width=4, fig.height=4------------------------------
+g5 <- s.class(pca1$li, fac.score, col = c("red", "blue"), chullSize = 1, ellipseSize = 0, 
+              plabels.cex = 2, pbackground.col = "grey85", paxes.draw = TRUE)
+
+## ----label=plot7, fig.width=4, fig.height=4------------------------------
+g6 <- superpose(g5, g3, plot = TRUE) ## equivalent to g5 + g3
+class(g6)
+
+## ----label=chunk9, eval=FALSE--------------------------------------------
+#  g5
+#  s.label(pca1$li, add = TRUE)
+
+## ----label=plot8, fig.width=6, fig.height=6------------------------------
+rbindADEg(cbindADEg(g2, g3), cbindADEg(g5, g6), plot = TRUE)
+
+## ----label=plot9, fig.width=4, fig.height=4------------------------------
+g7 <- insert(g2, g6, posi = c(0.65, 0.65, 0.95, 0.95))
+class(g7)
+
+## ----label=chunk10-------------------------------------------------------
+length(g7)
+names(g7)
+names(g7) <- c("chulls", "labels", "cor")
+class(g7[1])
+class(g7[[1]])
+class(g7$chulls)
+
+## ----label=plot10, fig.width=4, fig.height=4-----------------------------
+pos.mat <- getpositions(g7)
+pos.mat
+pos.mat[3,] <- c(0.1, 0.7, 0.3, 0.9)
+update(g7, positions = pos.mat)
+
+## ----label=plot11, fig.width=4, fig.height=4-----------------------------
+g7[[3]] <- g1
+g7
+
+## ----label=plot12, fig.width=4, fig.height=4-----------------------------
+addhist(g3)
+
+## ----label=plot13, fig.width=6, fig.height=3-----------------------------
+ADEgS(adeglist = list(g2, g3), layout = c(1, 2))
+
+## ----label=plot14, fig.width=5, fig.height=5-----------------------------
+mlay <- matrix(c(1, 1, 0, 1, 1, 0, 0, 0, 2), byrow = T, nrow = 3)
+mlay
+ADEgS(adeglist = list(g6, g2), layout = mlay)
+
+## ----label=plot15, fig.width=5, fig.height=5-----------------------------
+mpos <- rbind(c(0, 0.3, 0.7, 1), c(0.5, 0, 1, 0.5))
+ADEgS(adeglist = list(g3, g5), positions = mpos)
+
+## ----label=plot16, fig.width=4, fig.height=4-----------------------------
+ADEgS(list(g5, g3), add = matrix(c(0, 1, 0, 0), byrow = TRUE, ncol = 2))
+
+## ----label=plot17, fig.width=4, fig.height=4-----------------------------
+data(jv73)
+pca2 <- dudi.pca(jv73$morpho, scannf = FALSE)
+s.label(pca2$li)
+
+## ----label=plot18, fig.width=7, fig.height=5.2---------------------------
+g8 <- s.label(pca2$li, facets = jv73$fac.riv)
+length(g8)
+names(g8)
+
+## ----label=plot19, fig.width=7, fig.height=5.2---------------------------
+s.class(pca2$li, fac = jv73$fac.riv, col = rainbow(12), facets = jv73$fac.riv)
+
+## ----label=plot20, fig.width=6, fig.height=6-----------------------------
+pca1 <- dudi.pca(olympic$tab, scannf = FALSE, nf = 4)
+g9 <- s.corcircle(pca1$co, xax = 1:2, yax = 3:4)
+length(g9)
+names(g9)
+g9 at positions
+
+## ----label=plot21, fig.width=6, fig.height=6-----------------------------
+dim(pca1$li)
+s1d.boxplot(pca1$li, fac.score, col = c("red", "blue"), 
+  psub = list(position = "topleft", cex = 2))
+
+## ----label=plot22, fig.width=6, fig.height=4-----------------------------
+s.value(pca2$li, pca2$tab, symbol = "circle")
+
+## ----label=plot23, fig.width=6, fig.height=6-----------------------------
+data(meaudret)
+pca3 <- dudi.pca(meaudret$env, scannf = FALSE)
+pca4 <- dudi.pca(meaudret$spe, scale = FALSE, scannf = FALSE)
+coi1 <- coinertia(pca3, pca4, scannf = FALSE, nf = 3)
+g10 <- plot(coi1)
+class(g10)
+names(g10)
+g10 at Call
+
+## ----label=chunk11-------------------------------------------------------
+library(lattice)
+sort(names(trellis.par.get()))
+
+## ----label=plot24, fig.width=7, fig.height=3.5---------------------------
+d <- scale(olympic$tab)
+g11 <- table.image(d, plot = FALSE)
+g12 <- table.image(d, axis.line = list(col = "blue"), axis.text = list(col = "red"), 
+  plot = FALSE)
+ADEgS(c(g11, g12), layout = c(1, 2))
+
+## ----label=chunk12-------------------------------------------------------
+names(adegpar())
+
+## ----label=chunk13-------------------------------------------------------
+adegpar("ppoints")
+adegpar()$ppoints
+
+## ----label=fig-paramVSparam, echo=FALSE, fig.width=7, fig.height=7-------
+source("paramVSparam.R")
+
+## ----label=fig-paramVSfunction, echo=FALSE, fig.width=7, fig.height=10----
+source("paramVSfunction.R")
+
+## ----label=plot25, fig.width=6, fig.height=3-----------------------------
+oldadegpar <- adegpar()
+adegpar("plabels")
+g13 <- s.label(dfxy = pca1$li, plot = FALSE)
+adegpar(plabels = list(col = "blue", cex = 1.5), paxes.draw = TRUE)
+adegpar("plabels")
+g14 <- s.label(dfxy = pca1$li, plot = FALSE)
+ADEgS(c(g13, g14), layout = c(1, 2))
+
+## ----label=chunk14-------------------------------------------------------
+adegpar(oldadegpar)
+
+## ----label=plot26, fig.width=4, fig.height=4-----------------------------
+adegpar("ppoints")
+s.label(dfxy = pca1$li, plabels.cex = 0, ppoints = list(col = c(2, 4, 5), cex = 1.5, pch = 15))
+adegpar("ppoints")
+
+## ----label=plot27, fig.width=7, fig.height=5.2---------------------------
+s.label(pca2$li, facets = jv73$fac.riv, samelimits = FALSE)
+
+## ----label=plot28, fig.width=6, fig.height=6-----------------------------
+g15 <- plot(coi1, pbackground.col = "steelblue")
+
+## ----label=plot29, fig.width=6, fig.height=6-----------------------------
+names(g15)
+plot(coi1, XYmatch.pbackground.col = "steelblue",  XYmatch.pgrid.col = "red", 
+     eig.ppolygons.col = "orange")
+
+## ----label=chunk15-------------------------------------------------------
+tra1 <- list()
+tra1$time <- runif(300)
+tra1$distance <- tra1$time * 5 + rnorm(300)
+class(tra1) <- "track"
+
+## ----label=plot30, fig.width=7, fig.height=2.3---------------------------
+g1 <- s1d.hist(tra1$distance, psub.text = "distance", ppolygons.col = "blue", 
+               pgrid.draw = FALSE, plot = FALSE)
+g2 <- s1d.hist(tra1$distance / tra1$time, psub.text = "speed", ppolygons.col = "red", 
+               plot = FALSE)
+g31 <- s.label(cbind(tra1$time, tra1$distance), paxes = list(aspectratio = "fill", 
+               draw = TRUE), plot = FALSE)
+g32 <- xyplot(tra1$distance ~ tra1$time, aspect = g31 at adeg.par$paxes$aspectratio, 
+              panel = function(x, y) {panel.lmline(x, y)})
+g3 <- superpose(g31, g32)
+G <- ADEgS(list(g1, g2, g3))
+
+## ----label=chunk16-------------------------------------------------------
+plot.track <- function(x, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+ 
+ ## step 1 : sort parameters for each graph
+ graphsnames <- c("histDist", "histSpeed", "regression")
+ sortparameters <- sortparamADEgS(..., graphsnames = graphsnames, 
+                                  nbsubgraphs = c(1, 1, 2))
+ 
+ ## step 2 : define default values for graphical parameters
+ params <- list()
+ params[[1]] <- list(psub = list(text = "distance"), ppolygons = list(col = "blue"), 
+                     pgrid = list(draw = FALSE))
+ params[[2]] <- list(psub = list(text = "speed"), ppolygons = list(col = "red"), 
+                     pgrid = list(draw = FALSE))
+ params[[3]] <- list()
+ params[[3]]$l1 <- list(paxes = list(aspectratio = "fill", draw = TRUE))
+ params[[3]]$l2 <- list()
+ names(params) <- graphsnames
+ sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+ 
+ ## step 3 : create each individual plot (ADEg)
+ g1 <- do.call("s1d.hist", c(list(score = substitute(x$distance), plot = FALSE, 
+               storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+ g2 <- do.call("s1d.hist", c(list(score = substitute(x$distance / x$time), 
+               plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+ g31 <- do.call("s.label", c(list(dfxy = substitute(cbind(x$time, x$distance)), plot = 
+               FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]][[1]]))
+ g32 <- xyplot(x$distance ~ x$time, aspect = g31 at adeg.par$paxes$aspectratio,
+               panel = function(x, y) {panel.lmline(x, y)})
+ g3 <- do.call("superpose", list(g31, g32))
+ g3 at Call <- call("superpose", g31 at Call, g32$call)
+ 
+ 
+ ## step 4 : create the multiple plot (ADEgS)
+ lay <- matrix(1:3, 1, 3)
+ object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3), positions = 
+               layout2position(lay), add = matrix(0, ncol = 3, nrow = 3), 
+               Call = match.call())
+ names(object) <- graphsnames
+ if(plot)
+   print(object)
+ invisible(object)
+}
+
+## ----label=plot31, fig.width=7, fig.height=2.3---------------------------
+plot(tra1)
+
+## ----label=plot32, fig.width=7, fig.height=2.3---------------------------
+plot(tra1, histDist.ppoly.col = "green", pbackground.col = "grey")
+
+## ----label=plot33, fig.width=6, fig.height=3-----------------------------
+data(meaudret)
+g16 <- s.label(pca3$li, plot = FALSE)
+g17 <- s.label(pca3$li, ppoints.col= "red", plabels = list(box = list(draw = FALSE), 
+  optim = TRUE), plot = FALSE)
+ADEgS(c(g16, g17), layout = c(1, 2))
+
+## ----label=plot34, fig.width=6, fig.height=6-----------------------------
+g18 <- s.class(pca3$li, fac = meaudret$design$season, plot = FALSE)
+g19 <- s.class(pca3$li, fac = meaudret$design$season, ellipseSize = 0, 
+  chullSize = 1, starSize = 0.5, col = TRUE, plot = FALSE)
+g20 <- s.class(pca3$li, fac = meaudret$design$season, pellipses.lwd = 2, 
+  pellipses.border = 2:5, pellipses.col = 2:5, plot = FALSE)
+g21 <- s.class(pca3$li, fac = meaudret$design$season, ellipseSize = 0, 
+  chullSize = 0, ppolygons.lwd = 2, plines.col = 2:5, starSize = 1.2, plot = FALSE)
+ADEgS(c(g18, g19, g20, g21), layout = c(2, 2))
+
+## ----label=plot35, fig.width=6, fig.height=6-----------------------------
+data(rpjdl)
+coa2 <- dudi.coa(rpjdl$fau, scannf = FALSE, nf = 3)
+g22 <- s.value(coa2$li, coa2$li[,3], plot = FALSE)
+g23 <- s.value(coa2$li, coa2$li[,3], method = "color", ppoints.cex = 0.8, 
+  plegend.size= 0.8, plot = FALSE)
+g24 <- s.value(coa2$li, coa2$li[,3], plegend.size = 0.8, ppoints.cex = 0.8, 
+  symbol = "square", method = "color", key = list(columns = 1), 
+  col = colorRampPalette(c("yellow", "blue"))(6), plot = FALSE)
+g25 <- s.value(coa2$li, coa2$li[, 3], center = 0, method = "size", ppoints.cex = 0.6, 
+  symbol = "circle", col = c("yellow", "red"), plot = FALSE)
+ADEgS(c(g22, g23, g24, g25), layout = c(2, 2))
+
+## ----label=plot36, fig.width=6, fig.height=6-----------------------------
+score1 <- c(rnorm(1000, mean = -0.5, sd = 0.5), rnorm(1000, mean = 1))
+fac1 <- rep(c("A", "B"), each = 1000)
+g26 <- s1d.density(score1, fac1, pback.col = "grey75", plot = FALSE)
+g27 <- s1d.density(score1, fac1, col = c(2, 4), plot = FALSE)
+g28 <- s1d.density(score1, fac1, col = c(2, 4), p1d.reverse = TRUE, p1d.horizontal = FALSE, 
+  p1d.rug.draw = FALSE, plot = FALSE)
+g29 <- s1d.density(score1, fac1, col = c(2, 4), ppolygons.alpha = 0.2, 
+  p1d = list(rug = list(tck = 1, line = FALSE)), plot = FALSE)
+ADEgS(c(g26, g27, g28, g29), layout = c(2, 2))
+
+## ----label=plot37, fig.width=6, fig.height=3-----------------------------
+library(Guerry)
+library(sp)
+data(gfrance85)
+region.names <- data.frame(gfrance85)[, 5]
+col.region <- colors()[c(149, 254, 468, 552, 26)]
+g30 <- s.class(coordinates(gfrance85), region.names, porigin.include = FALSE, plot = FALSE)
+g31 <- s.class(coordinates(gfrance85), region.names, ellipseSize = 0, starSize = 0, 
+  Sp = gfrance85, pgrid.draw = FALSE, pSp.col = col.region[region.names], pSp.alpha = 0.4, 
+  plot = FALSE)
+ADEgS(c(g30, g31), layout = c(1, 2))
+
+## ----label=plot38, fig.width=6, fig.height=4-----------------------------
+s.Spatial(gfrance85[,7:12])
+
+## ----label=plot39, fig.width=6, fig.height=3-----------------------------
+data(mafragh, package = "ade4")
+g32 <- s.label(mafragh$xy, nb = mafragh$nb, plot = FALSE)
+g33 <- s.label(mafragh$xy, nb = mafragh$nb, pnb.ed.col = "red", plab.cex = 0, 
+  pnb.node = list(cex = 3, col = "blue"), ppoints.col = "green", plot = FALSE)
+ADEgS(c(g32, g33), layout = c(1, 2))
+
+## ----label=plot40, fig.width=6, fig.height=3-----------------------------
+data(euro123, package = "ade4")
+df <- rbind.data.frame(euro123$in78, euro123$in86, euro123$in97)
+row.names(df) <- paste(row.names(euro123$in78), rep(c(1, 2, 3), rep(12, 3)), sep = "")
+g34 <- triangle.label(df, label = row.names(df), showposition = TRUE, plot = FALSE)
+g35 <- triangle.label(euro123$in78, plabels.cex = 0, ppoints.cex = 2, addmean = TRUE, 
+  show = FALSE, plot = FALSE)
+ADEgS(c(g34, g35), layout = c(1, 2))
+
diff --git a/inst/doc/adegraphics.Rmd b/inst/doc/adegraphics.Rmd
new file mode 100644
index 0000000..442bac6
--- /dev/null
+++ b/inst/doc/adegraphics.Rmd
@@ -0,0 +1,1252 @@
+---
+title: "The `adegraphics` package"
+author: "Alice Julien-Laferrière, Aurélie Siberchicot and Stéphane Dray"
+date: '`r Sys.Date()`'
+output:
+  html_vignette:
+    number_sections: yes
+    toc: yes
+bibliography: adegraphics.bib
+vignette: |
+  %\VignetteIndexEntry{The `adegraphics` package} 
+  %\VignetteEngine{knitr::rmarkdown} 
+  %\VignetteEncoding{UTF-8}
+---
+
+<br>
+<hr>
+<br>
+
+The `adegraphics` package is a complete reimplementation of the
+graphical functionalities of the `ade4` package [@Dray2007]. The package
+has been initially designed to improve the representation of the outputs
+of multivariate analyses performed with `ade4` but as its graphical
+functionalities are very general, they can be used for other purposes.
+
+The `adegraphics` package provides a flexible environment to produce,
+edit and manipulate graphs. We adopted an *object oriented* approach (a
+graph is an object) using `S4` classes and methods and used the
+visualization system provided by the `lattice` [@Sarkar2008] and `grid`
+[@Murrell2005] packages. In `adegraphics`, graphs are R objects that can
+be edited, stored, combined, saved, removed, etc.
+
+Note that we tried to facilitate the handling of `adegraphics` by `ade4`
+users. Hence, the name of functions and parameters has been preserved in
+many cases. The main changes are listed in the appendix of this vignette
+so that it should be quite easy to use `adegraphics`. However, several
+new functionalities (graphical parameters, creation and manipulation of
+graphical objects, etc.) are now available and detailed in this
+vignette.
+
+The *adelist* mailing list can be used to send questions and/or comments
+on `adegraphics` (see <http://listes.univ-lyon1.fr/wws/info/adelist>)
+<br>
+
+An overview of object classes
+=============================
+
+In `adegraphics`, a user-level function produces a plot that is stored
+(and returned) as an object. The class architecture of the objects
+created by `adegraphics` functions is described in [Figure 1](#classes).
+
+<br>
+<div style="text-align:center">
+<a name="classes"></a>
+<span style="color:blue">Figure 1: Classes structure and user-level functions</span>
+<img src="classes.png" style="width:700px"/>
+</div>
+<br>
+
+This class management highlights a hierarchy with two parent classes:
+
+-   `ADEg` for simple graphs. It contains the display of a single data
+    set using only one kind of representation (e.g., arrows, points,
+    lines, etc.)
+
+-   `ADEgS` for multiple graphs. It contains a collection of at least
+    two simple graphs (`ADEg`, `trellis` or `ADEgS`)
+
+The `ADEg` class has five child classes which are also subdivided in
+several child classes. Each of these five child classes is dedicated for
+a particular graphical data representation:
+
+-   `ADEg.S1`: unidimensional graph of a numeric score
+
+-   `ADEg.S2`: bidimensional graph of xy coordinates (`matrix` or
+    `data.frame` object)
+
+-   `ADEg.C1`: bidimensional graph of a numeric score (bar chart or
+    curve)
+
+-   `ADEg.T`: heat map-like representation of a data table (`matrix`,
+    `data.frame`, `dist` or `table` object)
+
+-   `ADEg.Tr`: ternary plot of xyz coordinates (`matrix` or `data.frame`
+    object)
+
+The `ADEg` class and its five child classes are virtual: it is not
+allowed to create object belonging to these classes. Users can only
+create objects belonging to child classes by calls to user functions (see the [User functions](#user-functions) section).
+
+
+Simple graph (`ADEg` object)
+============================
+
+In the `adegraphics` package, a graph is created by a call to a user
+function and stored as an R object. These functions allow to display the
+raw data but also the outputs of a multivariate analysis. The following
+sections describe the different graphical functions available in the
+package.
+
+<a name="user-functions"></a>
+
+User functions
+--------------
+
+Several user functions are available to create a simple graph (stored as
+an `ADEg` object in R). Each function creates an object of a given class
+(see [Figure 1](#classes)). [Table 1](#functionsADEg) lists the different
+functions, their corresponding classes and a short description. The
+`ade4` users would not be lost: many functions have kept their names in
+`adegraphics`. The main changes are listed in [Table 2](#functionsADEgchanged).
+
+<br>
+<a name="functionsADEg"></a>
+<span style="color:blue">Table 1: Graphical functions available in `adegraphics`</span>
+
+Function            Class of the returned object    Description
+---------           ------------------------------  --------------
+`s1d.barchart`      `C1.barchart`                   1-D plot of a numeric score by bars
+`s1d.curve`         `C1.curve`                      1-D plot of a numeric score linked by curves
+`s1d.curves`        `C1.curves`                     1-D plot of multiple scores linked by curves
+`s1d.density`       `C1.density`                    1-D plot of a numeric score by density curves
+`s1d.dotplot`       `C1.dotplot`                    1-D plot of a numeric score by dots
+`s1d.gauss`         `C1.gauss`                      1-D plot of a numeric score by Gaussian curves
+`s1d.hist`          `C1.hist`                       1-D plot of a numeric score by bars
+`s1d.interval`      `C1.interval`                   1-D plot of the interval between two numeric scores
+`s1d.boxplot`       `S1.boxplot`                    1-D box plot of a numeric score partitioned in classes
+`s1d.class`         `S1.class`                      1-D plot of a numeric score partitioned in classes
+`s1d.distri`        `S1.distri`                     1-D plot of a numeric score by means/tandard deviations computed using an external table of weights
+`s1d.label`         `S1.label`                      1-D plot of a numeric score with labels
+`s1d.match`         `S1.match`                      1-D plot of the matching between two numeric scores
+`s.arrow`           `S2.arrow`                      2-D scatter plot with arrows
+`s.class`           `S2.class`                      2-D scatter plot with a partition in classes
+`s.corcircle`       `S2.corcircle`                  Correlation circle
+`s.density`         `S2.density`                    2-D scatter plot with kernel density estimation
+`s.distri`          `S2.distri`                     2-D scatter plot with means/standard deviations computed using an external table of weights
+`s.image`           `S2.image`                      2-D scatter plot with loess estimation of an additional numeric score
+`s.label`           `S2.label`                      2-D scatter plot with labels
+`s.logo`            `S2.logo`                       2-D scatter plot with logos (pixmap objects)
+`s.match`           `S2.match`                      2-D scatter plot of the matching between two sets of coordinates
+`s.Spatial`         `S2.label`                      Mapping of a `Spatial*` object
+`s.traject`         `S2.traject`                    2-D scatter plot with trajectories
+`s.value`           `S2.value`                      2-D scatter plot with proportional symbols
+`table.image`       `T.image`                       Heat map-like representation with colored cells
+`table.value`       `T.value` or `T.cont`           Heat map-like representation with proportional symbols
+`triangle.class`    `Tr.class`                      Ternary plot with a partition in classes
+`triangle.label`    `Tr.label`                      Ternary plot with labels
+`triangle.match`    `Tr.match`                      Ternary plot of the matching between two sets of coordinates
+`triangle.traject`  `Tr.match`                      Ternary plot with trajectories
+
+
+<br>
+<a name="functionsADEgchanged"></a>
+<span style="color:blue">Table 2: Changes in functions names between `ade4` and `adegraphics`</span>
+
+
+Function in `ade4`                            Equivalence in `adegraphics`
+-------------------------------------------   ------------------------------  
+`table.cont`, `table.dist`, `table.value`     `table.value` [^1]
+`table.paint`                                 `table.image`
+`sco.boxplot`                                 `s1d.boxplot`
+`sco.class`                                   `s1d.class`
+`sco.distri`                                  `s1d.distri`
+`sco.gauss`                                   `s1d.gauss`
+`sco.label`                                   `s1d.label`
+`sco.match`                                   `s1d.match`
+`sco.quant`                                   no equivalence
+`s.chull`                                     `s.class`[^2]
+`s.kde2d`                                     `s.density`
+`s.match.class`                               superposition of `s.match` and `s.class`
+`triangle.biplot`                             `triangle.match`
+`triangle.plot`                               `triangle.label`
+`s.multinom`                                  `triangle.multinom`
+
+
+[^1]: The `table.value` function is now generic and can handle `dist` or `table` objects as arguments.
+[^2]: Convex hulls are now drawn by the `s.class` function (argument `chullSize`.)
+
+
+Arguments
+---------
+
+The list of arguments of a function are given by the `args` function.
+```{r label=chunk1}
+library(ade4)
+library(adegraphics)
+args(s.label)
+```
+
+Some arguments are very general and present in all user functions:
+
+-   `plot`: a logical value indicating if the graph should be displayed
+
+-   `storeData`: a logical value indicating if the data should be stored
+    in the returned object. If `FALSE`, only the names of the data are
+    stored. This allows to reduce the size of the returned object but it
+    implies that the data should not be modified in the environment to
+    plot again the graph.
+
+-   `add`: a logical value indicating if the graph should be superposed
+    on the graph already displayed in the current device (it replaces
+    the argument `add.plot` in `ade4`).
+
+-   `pos`: an integer indicating the position of the environment where
+    the data are stored, relative to the environment where the function
+    is called. Useful only if `storeData` is `FALSE`.
+
+-   `…`: additional graphical parameters (see below)
+
+Some other arguments influence the graphical outputs and they are thus
+specific to the type of produced graph. [Figure 2](#gargsVSclass) summarizes some
+of these graphical parameters available for the different functions. We
+only reported the parameters stored in the `g.args` slot of the returned
+object (see the [Parameters in `g.args`](#gargs) section).
+
+
+<br>
+<div style="text-align:center">
+<a name="gargsVSclass"></a>
+<span style="color:blue">Figure 2: Specific arguments in each object class</span>
+```{r label=fig-gargsVSclass, include=TRUE, echo=FALSE, fig.width=7, fig.height=8}
+source("gargsVSclass.R")
+```
+</div>
+<br>
+
+
+<br>
+The `ade4` users would note that the names of some arguments have been
+modified in `adegraphics`. The [Appendix](#appendix) gives a full list of
+these modifications.
+
+<a name="slots"></a>
+
+Slots and Methods
+-----------------
+
+A call to a graphical function (see the [User functions](#user-functions) section) returns an `ADEg`
+object. Each object is defined by a number of slots and several methods
+are associated to this class. Let us consider the `olympic` data set
+available in the `ade4` package. A principal component analysis (PCA) is
+applied on the `olympic$tab` table that contains the results for 33
+participating athletes at the 1988 summer olympic games:
+
+```{r label=chunk2}
+data(olympic)
+pca1 <- dudi.pca(olympic$tab, scannf = FALSE)
+```
+
+The barplot of eigenvalues is then drawn and stored in `g1`:
+
+```{r label=plot1, fig.height=4, fig.width=4}
+g1 <- s1d.barchart(pca1$eig, p1d.horizontal = F, ppolygons.col = "white")
+```
+
+<br>
+The class of the `g1` object is `C1.barchart` which extends the `ADEg`
+class:
+```{r label=chunk3}
+class(g1)
+showClass("C1.barchart")
+```
+
+<br>
+This object contains different slots:
+```{r label=chunk4}
+slotNames(g1)
+```
+
+<br>
+These slots are defined for each `ADEg` object and contain different
+types of information. The package `adegraphics` uses the capabilities of
+the `lattice` package to display a graph (by generating a `trellis`
+object). Hence, several slots contain information that will be passed in
+the call to the `lattice` functions:
+
+-   `data`: a list containing information about the data.
+
+-   `trellis.par`: a list of graphical parameters that are directly
+    passed to the `lattice` functions using the `par.settings` argument
+    (see the [Parameters in `trellis.par`](#trellispar) section).
+
+-   `adeg.par`: a list of graphical parameters defined in `adegraphics`.
+    The list of parameters can be obtained using the `adegpar` function
+    (see the [Parameters in `adeg.par`](#adegpar) section).
+
+-   `lattice.call`: a list of two elements containing the information
+    required to create the `trellis` object: `graphictype` (the name of
+    the `lattice` functions that should be used) and `arguments` (the
+    list of parameter values required to obtain the `trellis` object).
+
+-   `g.args`: a list containing at least the different values of the
+    graphical arguments described in [Figure 2](#gargsVSclass) (see the [Parameters in `g.args`](#gargs) section).
+
+-   `stats`: a list of internal preliminary computations performed to
+    display the graph.
+
+-   `s.misc`: a list of other internal parameters.
+
+-   `Call`: an object of class `call` containing the matched call.
+
+<br>
+These different slots can be extracted using the `@` operator:
+```{r label=chunk5}
+g1 at data
+```
+
+<br>
+All these slots are automatically filled during the object creation. The
+`trellis.par`, `adeg.par` and `g.args` can also be modified *a
+posteriori* using the `update` method (see the [Customizing a graph](#update) section). This allows to
+customize graphs after their creation.
+
+We consider the correlation circle that depicts the correlation between
+PCA axes and the results for each event:
+```{r label=plot2, fig.width=4, fig.height=4}
+g2 <- s.corcircle(pca1$co)
+```
+
+```{r label=chunk6}
+class(g2)
+g2 at g.args
+```
+
+<br>
+The argument `fullcircle` can be updated *a posteriori* so that the
+original object is modified:
+```{r label=plot3, fig.width=4, fig.height=4}
+update(g2, fullcircle = FALSE)
+g2 at g.args
+```
+
+
+Several other methods have been defined for the `ADEg` class allowing to
+extract information, modify or combine objects:
+
+-   `getcall`, `getlatticecall` and `getstats`: these accessor methods
+    return respectively the `Call`, the `lattice.call` and the `stats`
+    slots.
+
+-   `getparameters`: this method returns the `trellis.par` and/or the
+    `adeg.par` slots.
+
+-   `show`, `print` and `plot`: these methods display the `ADEg` object
+    in the current device or in a new one.
+
+-   `gettrellis`: this method returns the `ADEg` object as a `trellis`
+    object. It can then be exploited using the `lattice` and
+    `latticeExtra` packages.
+
+-   `superpose`, `+` and `add.ADEg`: these methods superpose two `ADEg`
+    graphs. It returns a multiple graph object of class `ADEgS` 
+    (see the [The basic methods for superposition, juxtaposition and insertion](#superpose) section).
+
+-   `insert`: this method inserts an `ADEg` graph in an existing one or
+    in the current device. It returns an `ADEgS` object 
+    (see the [The basic methods for superposition, juxtaposition and insertion](#superpose) section).
+
+-   `cbindADEg`, `rbindADEg`: these methods combine several `ADEg`
+    graphs. It returns an `ADEgS` object 
+    (see the [The basic methods for superposition, juxtaposition and insertion](#superpose) section).
+
+-   `update`: this method modifies the graphical parameters after the
+    `ADEg` creation. It updates the current display and returns the
+    modified `ADEg` (see the [Customizing a graph](#update) section).
+
+For instance:
+```{r label=chunk7}
+getcall(g1) ## equivalent to g1 at Call
+```
+
+A biplot-like graph can be obtained using the `superpose` method. The
+result is a multiple graph:
+```{r label=plot4, fig.width=4, fig.height=4}
+g3 <- s.label(pca1$li)
+g4 <- s.arrow(5 * pca1$c1, add = TRUE)
+class(g4)
+```
+
+In addition, some object classes have specific methods. For instance, a
+`zoom` method is available for `ADEg.S1` and `ADEg.S2` classes. For the
+`ADEg.S2` class, the method `addhist` (see the [The basic methods for superposition, juxtaposition and insertion](#superpose) section) decorates a 2-D
+graph by adding marginal distributions as histograms and density lines
+(this method replaces and extends the `s.hist` function of `ade4`).
+```{r label=plot5, fig.width=4, fig.height=4}
+zoom(g3, zoom = 2, center = c(2, -2))
+```
+
+
+
+Multiple graph (`ADEgS` object)
+===============================
+
+The `adegraphics` package provides class `ADEgS` to manage easily the
+combination of several graphs. This class allows to deal with the
+superposition, insertion or juxtaposition of several graphs in a single
+object. An object of this class is a list containing several graphical
+objects and information about their positioning. Different ways to
+generate `ADEgS` objects are described below.
+
+Slots and Methods
+-----------------
+
+The class `ADEgS` is used to store multiple graphs. Different slots are
+associated to this class (use the symbol `@` to extract information):
+
+-   `ADEglist`: a list of graphs stored as `trellis`, `ADEg` and/or
+    `ADEgS` objects.
+
+-   `positions`: a matrix containing the positions of the graphs. It has
+    four columns and as many rows as the number of graphical objects in
+    the `ADEglist` slot. For each graph (i.e. row), it contains the
+    coordinates of the bottom-left and top-right corners in `npc` units
+    (i.e. normalized parent coordinates varying between 0 and 1).
+
+-   `add`: a square binary matrix with as many rows and columns as the
+    number of graphical objects in the `ADEglist` slot. It allows to
+    manage the superposition of graphs: the value at the i-th row and
+    j-th column is equal to 1 if the j-th graphical object is superposed
+    on the i-th. Otherwise, this value is equal to 0.
+
+-   `Call`: an object of class `call` containing the matched call.
+
+Several methods have been implemented to obtain information, edit or
+modify `ADEgS` objects. Several methods are inspired from the management
+of `list` in R:
+
+-   `[`, `[[` and `$`: these methods extract one or more elements from
+    the `ADEgS` object.
+
+-   `getpositions`, `getgraphics` and `getcall`: these methods return
+    the `positions`, the `ADEglist` and the `Call` slots, respectively.
+
+-   `names` and `length`: these methods return the names and number of
+    graphs contained in the object.
+
+-   `[[<-` and `names<-`: these methods replace a graph or its name in
+    an `ADEgS` object (acts on the `ADEglist` slot).
+
+-   `show`, `plot` and `print`: these methods display the `ADEgS` object
+    in the current device or in a new one.
+
+-   `superpose` and `+`: these methods superpose two graphs. It returns
+    a multiple graph object of class `ADEgS` 
+    (see the [The basic methods for superposition, juxtaposition and insertion](#superpose) section).
+
+-   `insert`: this method inserts a graph in an existing one or in the
+    current device. It returns a multiple graph object of class `ADEgS`
+    (see the [The basic methods for superposition, juxtaposition and insertion](#superpose) section).
+
+-   `cbindADEg`, `rbindADEg`: these methods combine several graphs. It
+    returns an `ADEgS` object 
+    (see the [The basic methods for superposition, juxtaposition and insertion](#superpose) section).
+
+-   `update`: this method modifies the names and/or the `positions` of
+    the graphs contained in an `ADEgS` object. It updates the current
+    display and returns the modified `ADEgS`.
+
+We will show in the next sections how these methods can be used to deal
+with `ADEgS` objects.
+
+Creating an `ADEgS` object by hand
+----------------------------------
+
+The `ADEgS` objects can be created by easy manipulation of several
+simple graphs. Some methods (e.g., `insert`, `superpose`) can be used to
+create a compilation of graphs by hand.
+
+<a name="superpose"></a>
+
+### The basic methods for superposition, juxtaposition and insertion
+
+The functions `superpose`, `+` and `add.ADEg` allow the superposition of
+an `ADEg`/`ADEgS` object on an `ADEg`/`ADEgS` object.
+
+The vector `olympic$score` contains the total number of points computed
+for each participant. This vector is used to generate a `factor`
+partitioning the participants in two groups according to their final
+result (more or less than 8000 points):
+```{r label=chunk8}
+fac.score <- factor(olympic$score < 8000, labels = c("MT8000", "LT8000"))
+```
+
+These two groups can be represented on the PCA factorial map using the
+`s.class` function:
+```{r label=plot6, fig.width=4, fig.height=4}
+g5 <- s.class(pca1$li, fac.score, col = c("red", "blue"), chullSize = 1, ellipseSize = 0, 
+              plabels.cex = 2, pbackground.col = "grey85", paxes.draw = TRUE)
+```
+
+The graph with the labels (object `g3`) can then be superposed on this
+one:
+```{r label=plot7, fig.width=4, fig.height=4}
+g6 <- superpose(g5, g3, plot = TRUE) ## equivalent to g5 + g3
+class(g6)
+```
+
+In the case of a superposition, the graphical parameters (e.g.,
+background and limits) of the first graph (the one below) are used as a
+reference and applied to the second one (the one above). Note that it is
+also possible to use the `add = TRUE` argument in the call of a simple
+user function (functions described in [Table 1](#functionsADEg)) to perform
+a superposition. The graph `g6` can also be obtained by:
+```{r label=chunk9, eval=FALSE}
+g5
+s.label(pca1$li, add = TRUE)
+```
+
+The functions `cbindADEg` and `rbindADEg` allows to combine several
+graphical objects (`ADEg`, `ADEgS` or `trellis`) by rows or by columns.
+The new created `ADEgS` contains the list of the reduced graphs:
+```{r label=plot8, fig.width=6, fig.height=6}
+rbindADEg(cbindADEg(g2, g3), cbindADEg(g5, g6), plot = TRUE)
+```
+
+The function `insert` allows the insertion of a graphical object on
+another one (`ADEg` or `ADEgS`). It takes the position of the inserted
+graph as an argument:
+```{r label=plot9, fig.width=4, fig.height=4}
+g7 <- insert(g2, g6, posi = c(0.65, 0.65, 0.95, 0.95))
+class(g7)
+```
+
+The different methods associated to the `ADEgS` class allow to obtain
+information and to modify the multiple graph:
+```{r label=chunk10}
+length(g7)
+names(g7)
+names(g7) <- c("chulls", "labels", "cor")
+class(g7[1])
+class(g7[[1]])
+class(g7$chulls)
+```
+
+The multiple graph contains three simple graphs. It can be easily
+updated. For instance, the size of the inserted graph can be modified:
+```{r label=plot10, fig.width=4, fig.height=4}
+pos.mat <- getpositions(g7)
+pos.mat
+pos.mat[3,] <- c(0.1, 0.7, 0.3, 0.9)
+update(g7, positions = pos.mat)
+```
+
+The graphs themselves can be modified, without affecting the global
+structure of the `ADEgS` object. Here, we replace the correlation circle
+by the barplot of eigenvalues:
+```{r label=plot11, fig.width=4, fig.height=4}
+g7[[3]] <- g1
+g7
+```
+
+The `addhist` method adds univariate marginal distributions around an
+`ADEg.S2` and returns an `ADEgS` object:
+```{r label=plot12, fig.width=4, fig.height=4}
+addhist(g3)
+```
+
+More examples are available in the help page by typing
+`example(superpose)`, `example(insert)`, `example(add.ADEg)` and
+`example(addhist)` in the R session.
+
+### The `ADEgS` function
+
+The `ADEgS` function provides the most elementary and flexible way to
+create an `ADEgS` object. The different arguments of the function are:
+
+-   `adeglist`: a list of several `trellis`, `ADEg` and/or `ADEgS`
+    objects.
+
+-   `positions`: a matrix with four columns and as many rows as the
+    number of graphical objects in the `ADEglist` slot. For each
+    subgraph, i.e. in each row, the coordinates of the top-right and the
+    bottom-left hand corners are given in `npc` units (i.e., normalized
+    parent coordinates varying from 0 to 1).
+
+-   `layout`: an alternative way to specify the positions of graphs. It
+    could be a vector of length 2 indicating the number of rows and
+    columns used to split the device (similar to `mfrow` parameter in
+    basic graphs). It could also be a matrix specifying the location of
+    the graphs: each value in this matrix should be 0 or a positive
+    integer (similar to `layout` function for basic graphs).
+
+-   `add`: a square matrix with as many rows and columns as the number
+    of graphical objects in the `ADEglist` slot. The value at the i-th
+    row and j-th column is equal to 1 if the j-th graphical object is
+    superposed to i-th one. Otherwise, this value is equal to 0.
+
+-   `plot`: a logical value indicating if the graphs should be
+    displayed.
+
+When users fill only one argument among `positions`, `layout` and `add`,
+the other values are automatically computed to define the `ADEgS`
+object.
+
+We illustrate the different possibilities to create objects with the
+`ADEgS` function. Simple juxtaposition using a vector as layout:
+```{r label=plot13, fig.width=6, fig.height=3}
+ADEgS(adeglist = list(g2, g3), layout = c(1, 2))
+```
+
+Layout specified as a matrix:
+```{r label=plot14, fig.width=5, fig.height=5}
+mlay <- matrix(c(1, 1, 0, 1, 1, 0, 0, 0, 2), byrow = T, nrow = 3)
+mlay
+ADEgS(adeglist = list(g6, g2), layout = mlay)
+```
+
+Using the matrix of positions offers a very flexible way to arrange the
+different graphs:
+```{r label=plot15, fig.width=5, fig.height=5}
+mpos <- rbind(c(0, 0.3, 0.7, 1), c(0.5, 0, 1, 0.5))
+ADEgS(adeglist = list(g3, g5), positions = mpos)
+```
+
+Lastly, superposition can also be specified using the `add` argument:
+```{r label=plot16, fig.width=4, fig.height=4}
+ADEgS(list(g5, g3), add = matrix(c(0, 1, 0, 0), byrow = TRUE, ncol = 2))
+```
+
+More examples are available in the help page by typing `example(ADEgS)`
+in the R session.
+
+Automatic collections
+---------------------
+
+The package `adegraphics` contains functionalities to create collections
+of graphs. These collections are based on a simple graph repeated for
+different groups of individuals, variables or axes. The building process
+of these collections is quite simple (definition of arguments in the
+call of a user function) and leads to the creation of an `ADEgS` object.
+
+<a name="facets"></a>
+
+### Partitioning the data (`facets`)
+
+The `adegraphics` package allows to split up the data by one variable
+(`factor`) and to plot the subsets of data together. This possibility of
+conditional plot is available for all user functions (except the
+`table.*` functions) by setting the `facets` argument. This is directly
+inspired by the functionalities offered in the `lattice` and `ggplot2`
+packages.
+
+Let us consider the `jv73` data set. The table `jv73$morpho` contains
+the measures of 6 variables describing the geomorphology of 92 sites. A
+PCA can be performed on this data set:
+```{r label=plot17, fig.width=4, fig.height=4}
+data(jv73)
+pca2 <- dudi.pca(jv73$morpho, scannf = FALSE)
+s.label(pca2$li)
+```
+
+The sites are located on 12 rivers (`jv73$fac.riv`) and it is possible
+to represent the PCA scores for each river using the `facets` argument:
+```{r label=plot18, fig.width=7, fig.height=5.2}
+g8 <- s.label(pca2$li, facets = jv73$fac.riv)
+length(g8)
+names(g8)
+```
+
+The `ADEgS` returned object contains the 12 plots. It is then possible
+to focus on a given river (e.g., the Doubs river) by considering only a
+subplot (e.g., type `g8$Doubs`). The `facets` functionality is very
+general and available for the majority of `adegraphics` functions. For
+instance, with the `s.class` function:
+```{r label=plot19, fig.width=7, fig.height=5.2}
+s.class(pca2$li, fac = jv73$fac.riv, col = rainbow(12), facets = jv73$fac.riv)
+```
+
+### Multiple axes
+
+All 2-D functions (i.e. `s.*`) returning an object inheriting from the
+`ADEg.S2` class have the `xax` et `yax` arguments. These arguments allow
+to choose which column of the main argument (i.e. `df`) should be
+plotted as x and y axes. As in `ade4`, these two arguments can be simple
+integers. In `adegraphics`, the user can also specify vectors as `xax`
+and/or `yax` arguments to obtain multiple graphs. Here, we represent the
+different correlation circles associated to the first four PCA axes of
+the olympic data set:
+```{r label=plot20, fig.width=6, fig.height=6}
+pca1 <- dudi.pca(olympic$tab, scannf = FALSE, nf = 4)
+g9 <- s.corcircle(pca1$co, xax = 1:2, yax = 3:4)
+length(g9)
+names(g9)
+g9 at positions
+```
+
+### Multiple score
+
+All 1-D functions (i.e. `s1d.*`) returning an object inheriting from the
+`ADEg.C1` or `ADEg.S1` classes have the `score` argument. Usually, this
+argument should be a numeric vector but it is also possible to consider
+an object with several columns (`data.frame` or `matrix`). In this case,
+an `ADEgS` object is returned in which one graph by column is created.
+For instance for the `olympic` data set, we can represent the link
+between the global performance (`fac.score`) and the PCA scores on the
+first four axes (`pca1$li`):
+```{r label=plot21, fig.width=6, fig.height=6}
+dim(pca1$li)
+s1d.boxplot(pca1$li, fac.score, col = c("red", "blue"), 
+  psub = list(position = "topleft", cex = 2))
+```
+
+
+### Multiple variable
+
+Some user functions (`s1d.density`, `s1d.gauss`, `s1d.boxplot`,
+`s1d.class`, `s.class`, `s.image`, `s.traject`, `s.value`,
+`triangle.class`) have an argument named `fac` or `z`. This argument can
+have several columns (`data.frame` or `matrix`) so that each column is
+used to create a separate graph. For instance, we can represent the
+distribution of the 6 environmental variables on the PCA factorial map
+of the `jv73$tab` data set:
+```{r label=plot22, fig.width=6, fig.height=4}
+s.value(pca2$li, pca2$tab, symbol = "circle")
+```
+
+### Outputs of the `ade4` package
+
+Lastly, we reimplemented all the graphical functions of the `ade4`
+package designed to represent the outputs of a multivariate analysis.
+The functions `ade4::plot.*`, `ade4::kplot.*`, `ade4::scatter.*` and
+`ade4::score.*` return `ADEgS` objects. It is now very easy to represent
+or modify these graphical outputs:
+```{r label=plot23, fig.width=6, fig.height=6}
+data(meaudret)
+pca3 <- dudi.pca(meaudret$env, scannf = FALSE)
+pca4 <- dudi.pca(meaudret$spe, scale = FALSE, scannf = FALSE)
+coi1 <- coinertia(pca3, pca4, scannf = FALSE, nf = 3)
+g10 <- plot(coi1)
+class(g10)
+names(g10)
+g10 at Call
+```
+
+<a name="update"></a>
+
+Customizing a graph
+===================
+
+Compared to the `ade4` package, the main advantage of `adegraphics`
+concerns the numerous possibilities to customize a graph using several
+graphical parameters. These parameters are stored in slots
+`trellis.par`, `adeg.par` and `g.args` (see the [Slots and Methods](#slots) section) of an `ADEg`
+object. These parameters can be defined during the creation of a graph
+or updated *a posteriori* (using the `update` method).
+
+<a name="trellispar"></a>
+
+Parameters in `trellis.par`
+---------------------------
+
+The `trellis.par` slot is a list of parameters that are directly
+included in the call of functions of the `lattice` package. The name of
+parameters and their default value are given by the `trellis.par.get`
+function of `lattice`.
+```{r label=chunk11}
+library(lattice)
+sort(names(trellis.par.get()))
+```
+
+
+Hence, modifications of some of these parameters will modify the
+graphical display of an `ADEg` object. For instance, margins are defined
+using `layout.widths` and `layout.heights` parameters, `clip` parameter
+allows to overpass panel boundaries and `axis.line` and `axis.text`
+allow to customize lines and text of axes.
+```{r label=plot24, fig.width=7, fig.height=3.5}
+d <- scale(olympic$tab)
+g11 <- table.image(d, plot = FALSE)
+g12 <- table.image(d, axis.line = list(col = "blue"), axis.text = list(col = "red"), 
+  plot = FALSE)
+ADEgS(c(g11, g12), layout = c(1, 2))
+```
+
+<a name="adegpar"></a>
+
+Parameters in `adeg.par`
+------------------------
+
+The `adeg.par` slot is a list of graphical parameters specific to the
+`adegraphics` package. The name of parameters and their default value
+are available using the `adegpar` function which is inspired by the
+`par` function of the `graphics` package.
+```{r label=chunk12}
+names(adegpar())
+```
+
+A description of these parameters is available in the help page of the
+function (`?adegpar`). Note that each `adeg.par` parameter starts by the
+letter ’p’ and its name relates to the type of graphical element
+considered (`ptable` is for tables display, `ppoints` for points,
+`parrows` for arrows, etc). Each element of this list can contain one or
+more sublists. Details on a sublist are obtained using its name either
+as a parameter of the `adegpar` function or after the `$` symbol. For
+example, if we want to know the different parameters to manage the
+display of points:
+```{r label=chunk13}
+adegpar("ppoints")
+adegpar()$ppoints
+```
+
+The full list of available parameters is summarized in [Figure 3](#paramVSparam).
+
+<br>
+<div style="text-align:center">
+<a name="paramVSparam"></a>
+<span style="color:blue">Figure 3: Parameters that can be set with the `adegpar` function.</span>
+```{r label=fig-paramVSparam, echo=FALSE, fig.width=7, fig.height=7}
+source("paramVSparam.R")
+```
+</div>
+<br>
+
+
+
+The ordinate represents the different sublists and the abscissa gives
+the name of the parameters available in each sublist. Note that some row
+names have two keys separated by a dot: the first key indicates the
+first level of the sublist, etc. For example `plabels.boxes` is the
+sublist `boxes` of the sublist `plabels`. The parameters `border`,`col`,
+`alpha`, `lwd`, `lty` and `draw` in `plabels.boxes` allow to control the
+aspect of the boxes around labels.
+
+According to the function called, only some of the full list of
+`adeg.par` parameters are useful to modify the graphical display. [Figure 4](#paramVSfunction)
+indicates which parameters can affect the display of an object
+created by a given user function. For example, the background
+(`pbackground` parameter) can be modified for all functions whereas the
+display of ellipses (`pellipses` parameter) affects only three
+functions.
+
+
+
+<br>
+<div style="text-align:center">
+<a name="paramVSfunction"></a>
+<span style="color:blue">Figure 4: Effect of `adeg.par` parameters in `adegraphics` functions.</span>
+```{r label=fig-paramVSfunction, echo=FALSE, fig.width=7, fig.height=10}
+source("paramVSfunction.R")
+```
+</div>
+<br>
+
+### Global assignment
+
+The `adegpar` function allows to modify globally the values of graphical
+parameters so that changes will affect all subsequent displays. For
+example, we update the size/color of labels and add axes to a plot:
+```{r label=plot25, fig.width=6, fig.height=3}
+oldadegpar <- adegpar()
+adegpar("plabels")
+g13 <- s.label(dfxy = pca1$li, plot = FALSE)
+adegpar(plabels = list(col = "blue", cex = 1.5), paxes.draw = TRUE)
+adegpar("plabels")
+g14 <- s.label(dfxy = pca1$li, plot = FALSE)
+ADEgS(c(g13, g14), layout = c(1, 2))
+```
+
+As the `adegpar` function can accept numerous graphical parameters, it
+can be used to define some graphical themes. The next releases of
+`adegraphics` will offer functionalities to easily create, edit and
+store graphical themes. Here, we reassign the original default
+parameters:
+```{r label=chunk14}
+adegpar(oldadegpar)
+```
+
+### Local assignment
+
+A second option is to update the graphical parameters locally so that
+the changes will only modify the object created. This is done using the
+dots (`...`) argument in the call to a user function. In this case, the
+default values of parameters in the global environment are not modified:
+```{r label=plot26, fig.width=4, fig.height=4}
+adegpar("ppoints")
+s.label(dfxy = pca1$li, plabels.cex = 0, ppoints = list(col = c(2, 4, 5), cex = 1.5, pch = 15))
+adegpar("ppoints")
+```
+
+In the previous example, we can see that parameters can be either
+specified using a ’`.`’ separator or a list. For instance, using
+`plabels.cex = 0` or `plabels = list(cex = 0)` is strictly equivalent.
+Moreover, partial names can be used if there is no ambiguity (such as
+`plab.ce = 0` in our example).
+
+<a name="gargs"></a>
+
+Parameters in `g.args`
+----------------------
+
+The `g.args` slot is a list of parameters specific to the function used
+(and thus to the class of the returned object). Several parameters are
+very general and used in all `adegraphics` functions:
+
+-   `xlim`, `ylim`: limits of the graph on the x and y axes
+
+-   `main`, `sub`: main title and subtitle
+
+-   `xlab`, `ylab`: labels of the x and y axes
+
+-   `scales`: a list determining how the x and y axes (tick marks dans
+    labels) are drawn; this is the `scales` parameter of the `xyplot`
+    function of `lattice`
+
+The `ADEg.S2` objects can also contain spatial information (map stored
+as a `Spatial` object or neighborhood stored as a `nb` object):
+
+-   `Sp`, `sp.layout`: objects from the `sp` package to display spatial
+    objects, `Sp` for maps and `sp.layout` for spatial widgets as a
+    North arrow, scale, etc.
+
+-   `nbobject`: object of class `nb` or `listw` to display neighbor graphs.
+
+When the `facets` (see the [Partitioning the data (`facets`)](#facets) section) argument is used, users can modify the
+parameter `samelimits`: if it is `TRUE`, all graphs have the same limits
+whereas limits are computed for each subgraph independently when it is
+`FALSE`. For example, considering the `jv73` data set, each subgraph is
+computed with its own limits and labels are then more scattered:
+```{r label=plot27, fig.width=7, fig.height=5.2}
+s.label(pca2$li, facets = jv73$fac.riv, samelimits = FALSE)
+```
+
+Several other `g.args` parameters can be updated according to the class
+of the created object (see [Figure 2](#gargsVSclass)).
+
+Parameters applied on a `ADEgS`
+-------------------------------
+
+Users can either apply the changes to all graphs or to update only one
+graph. Of an `ADEgS`, to apply changes on all the graphs contained in an
+`ADEgS`, the syntax is similar to the one described for an `ADEg`
+object. For example, background color can be changed for all graphs in
+`g10` using the `pbackground.col` parameter.
+```{r label=plot28, fig.width=6, fig.height=6}
+g15 <- plot(coi1, pbackground.col = "steelblue")
+```
+
+To change the parameters of a given graph, the name of the parameter
+must be preceded by the name of the subgraph. This supposes that the
+names of subgraphs are known. For example, to modify only two graphs:
+```{r label=plot29, fig.width=6, fig.height=6}
+names(g15)
+plot(coi1, XYmatch.pbackground.col = "steelblue",  XYmatch.pgrid.col = "red", 
+     eig.ppolygons.col = "orange")
+```
+
+
+Using `adegraphics` functions in your package
+=============================================
+
+In this section, we illustrate how `adegraphics` functionalities can be
+used to implement graphical functions in your own package. We created an
+objet of class `track` that contains a vector of distance and time.
+```{r label=chunk15}
+tra1 <- list()
+tra1$time <- runif(300)
+tra1$distance <- tra1$time * 5 + rnorm(300)
+class(tra1) <- "track"
+```
+
+For an object of the class `track`, we wish to represent different
+components of the data:
+
+-   an histogram of distances
+
+-   an histogram of speeds (i.e., distance / time)
+
+-   a 2D plot representing the distance, the time and the line
+    corresponding to the linear model that predict distance by time
+
+The corresponding multiple plot can be done using `adegraphics`
+functions:
+```{r label=plot30, fig.width=7, fig.height=2.3}
+g1 <- s1d.hist(tra1$distance, psub.text = "distance", ppolygons.col = "blue", 
+               pgrid.draw = FALSE, plot = FALSE)
+g2 <- s1d.hist(tra1$distance / tra1$time, psub.text = "speed", ppolygons.col = "red", 
+               plot = FALSE)
+g31 <- s.label(cbind(tra1$time, tra1$distance), paxes = list(aspectratio = "fill", 
+               draw = TRUE), plot = FALSE)
+g32 <- xyplot(tra1$distance ~ tra1$time, aspect = g31 at adeg.par$paxes$aspectratio, 
+              panel = function(x, y) {panel.lmline(x, y)})
+g3 <- superpose(g31, g32)
+G <- ADEgS(list(g1, g2, g3))
+```
+
+
+To facilitate the graphical representation of an object of class
+`track`, the simplest solution is to design a function `plot` for this
+class. We illustrate how to define such function with a particular
+emphasis on the management of graphical parameters. The function is
+provided below and we detail the different steps.
+
+
+```{r label=chunk16}
+plot.track <- function(x, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+ 
+ ## step 1 : sort parameters for each graph
+ graphsnames <- c("histDist", "histSpeed", "regression")
+ sortparameters <- sortparamADEgS(..., graphsnames = graphsnames, 
+                                  nbsubgraphs = c(1, 1, 2))
+ 
+ ## step 2 : define default values for graphical parameters
+ params <- list()
+ params[[1]] <- list(psub = list(text = "distance"), ppolygons = list(col = "blue"), 
+                     pgrid = list(draw = FALSE))
+ params[[2]] <- list(psub = list(text = "speed"), ppolygons = list(col = "red"), 
+                     pgrid = list(draw = FALSE))
+ params[[3]] <- list()
+ params[[3]]$l1 <- list(paxes = list(aspectratio = "fill", draw = TRUE))
+ params[[3]]$l2 <- list()
+ names(params) <- graphsnames
+ sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+ 
+ ## step 3 : create each individual plot (ADEg)
+ g1 <- do.call("s1d.hist", c(list(score = substitute(x$distance), plot = FALSE, 
+               storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+ g2 <- do.call("s1d.hist", c(list(score = substitute(x$distance / x$time), 
+               plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+ g31 <- do.call("s.label", c(list(dfxy = substitute(cbind(x$time, x$distance)), plot = 
+               FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]][[1]]))
+ g32 <- xyplot(x$distance ~ x$time, aspect = g31 at adeg.par$paxes$aspectratio,
+               panel = function(x, y) {panel.lmline(x, y)})
+ g3 <- do.call("superpose", list(g31, g32))
+ g3 at Call <- call("superpose", g31 at Call, g32$call)
+ 
+ 
+ ## step 4 : create the multiple plot (ADEgS)
+ lay <- matrix(1:3, 1, 3)
+ object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3), positions = 
+               layout2position(lay), add = matrix(0, ncol = 3, nrow = 3), 
+               Call = match.call())
+ names(object) <- graphsnames
+ if(plot)
+   print(object)
+ invisible(object)
+}
+```
+
+
+In the first step, the arguments given by the user through the dots (…)
+argument are managed. A name is given to each subgraph and stored in the
+vector `graphnames`. Then, the function `sortparamADEgS` associates the
+graphical parameters of the dots (…) argument to each subgraph. If a
+prefix is specified and matches the name of a graph (e.g.,
+`histDist.pbackground.col = grey`), the parameter is applied only to the
+graphic specified (e.g., called `histDist`). If no prefix is specified
+(e.g., `pbackground.col = grey`), the parameter is applied to all
+subgraphs. The function `sortparamADEgS` returns a list (length equal to
+the number of subgraph) of lists of graphical parameters.\
+
+In the second step, default values for some graphical parameters are
+modified. The default parameters are stored in a list which has the same
+structure that the one produced by `sortparamADEgS` (i.e., names
+corresponding to those contained in `graphsnames`). Then, the
+`modifyList` function is applied to merge user and defaults values of
+paramaters (if a parameter is specified by the user and in the default,
+the value given by the user is used).\
+
+In the third step, each subgraph is created. Here, we create two
+`C1.hist` objects and superpose a `S2.label` object and a `trellis` one.
+The functions `do.call` and `substitute` are used to provide a pretty
+call for each subgraph (stored in the `Call` slot).\
+
+In a final step, the multiple graph is build through the creation of a
+new `ADEgS` object and possibly plotted.\
+
+The `plot.track` function can then be used by:
+```{r label=plot31, fig.width=7, fig.height=2.3}
+plot(tra1)
+```
+
+Graphical parameters can be modified by:
+```{r label=plot32, fig.width=7, fig.height=2.3}
+plot(tra1, histDist.ppoly.col = "green", pbackground.col = "grey")
+```
+
+
+Examples
+========
+
+Labels customization
+--------------------
+
+```{r label=plot33, fig.width=6, fig.height=3}
+data(meaudret)
+g16 <- s.label(pca3$li, plot = FALSE)
+g17 <- s.label(pca3$li, ppoints.col= "red", plabels = list(box = list(draw = FALSE), 
+  optim = TRUE), plot = FALSE)
+ADEgS(c(g16, g17), layout = c(1, 2))
+```
+
+
+Ellipses, stars and convex hulls
+--------------------------------
+
+```{r label=plot34, fig.width=6, fig.height=6}
+g18 <- s.class(pca3$li, fac = meaudret$design$season, plot = FALSE)
+g19 <- s.class(pca3$li, fac = meaudret$design$season, ellipseSize = 0, 
+  chullSize = 1, starSize = 0.5, col = TRUE, plot = FALSE)
+g20 <- s.class(pca3$li, fac = meaudret$design$season, pellipses.lwd = 2, 
+  pellipses.border = 2:5, pellipses.col = 2:5, plot = FALSE)
+g21 <- s.class(pca3$li, fac = meaudret$design$season, ellipseSize = 0, 
+  chullSize = 0, ppolygons.lwd = 2, plines.col = 2:5, starSize = 1.2, plot = FALSE)
+ADEgS(c(g18, g19, g20, g21), layout = c(2, 2))
+```
+
+
+Values and legend
+-----------------
+
+```{r label=plot35, fig.width=6, fig.height=6}
+data(rpjdl)
+coa2 <- dudi.coa(rpjdl$fau, scannf = FALSE, nf = 3)
+g22 <- s.value(coa2$li, coa2$li[,3], plot = FALSE)
+g23 <- s.value(coa2$li, coa2$li[,3], method = "color", ppoints.cex = 0.8, 
+  plegend.size= 0.8, plot = FALSE)
+g24 <- s.value(coa2$li, coa2$li[,3], plegend.size = 0.8, ppoints.cex = 0.8, 
+  symbol = "square", method = "color", key = list(columns = 1), 
+  col = colorRampPalette(c("yellow", "blue"))(6), plot = FALSE)
+g25 <- s.value(coa2$li, coa2$li[, 3], center = 0, method = "size", ppoints.cex = 0.6, 
+  symbol = "circle", col = c("yellow", "red"), plot = FALSE)
+ADEgS(c(g22, g23, g24, g25), layout = c(2, 2))
+```
+
+
+1-D plot
+--------
+
+```{r label=plot36, fig.width=6, fig.height=6}
+score1 <- c(rnorm(1000, mean = -0.5, sd = 0.5), rnorm(1000, mean = 1))
+fac1 <- rep(c("A", "B"), each = 1000)
+g26 <- s1d.density(score1, fac1, pback.col = "grey75", plot = FALSE)
+g27 <- s1d.density(score1, fac1, col = c(2, 4), plot = FALSE)
+g28 <- s1d.density(score1, fac1, col = c(2, 4), p1d.reverse = TRUE, p1d.horizontal = FALSE, 
+  p1d.rug.draw = FALSE, plot = FALSE)
+g29 <- s1d.density(score1, fac1, col = c(2, 4), ppolygons.alpha = 0.2, 
+  p1d = list(rug = list(tck = 1, line = FALSE)), plot = FALSE)
+ADEgS(c(g26, g27, g28, g29), layout = c(2, 2))
+```
+
+Maps and neighbor graphs
+------------------------
+
+```{r label=plot37, fig.width=6, fig.height=3}
+library(Guerry)
+library(sp)
+data(gfrance85)
+region.names <- data.frame(gfrance85)[, 5]
+col.region <- colors()[c(149, 254, 468, 552, 26)]
+g30 <- s.class(coordinates(gfrance85), region.names, porigin.include = FALSE, plot = FALSE)
+g31 <- s.class(coordinates(gfrance85), region.names, ellipseSize = 0, starSize = 0, 
+  Sp = gfrance85, pgrid.draw = FALSE, pSp.col = col.region[region.names], pSp.alpha = 0.4, 
+  plot = FALSE)
+ADEgS(c(g30, g31), layout = c(1, 2))
+```
+
+```{r label=plot38, fig.width=6, fig.height=4}
+s.Spatial(gfrance85[,7:12])
+```
+
+```{r label=plot39, fig.width=6, fig.height=3}
+data(mafragh, package = "ade4")
+g32 <- s.label(mafragh$xy, nb = mafragh$nb, plot = FALSE)
+g33 <- s.label(mafragh$xy, nb = mafragh$nb, pnb.ed.col = "red", plab.cex = 0, 
+  pnb.node = list(cex = 3, col = "blue"), ppoints.col = "green", plot = FALSE)
+ADEgS(c(g32, g33), layout = c(1, 2))
+```
+
+
+Ternary plots
+-------------
+
+```{r label=plot40, fig.width=6, fig.height=3}
+data(euro123, package = "ade4")
+df <- rbind.data.frame(euro123$in78, euro123$in86, euro123$in97)
+row.names(df) <- paste(row.names(euro123$in78), rep(c(1, 2, 3), rep(12, 3)), sep = "")
+g34 <- triangle.label(df, label = row.names(df), showposition = TRUE, plot = FALSE)
+g35 <- triangle.label(euro123$in78, plabels.cex = 0, ppoints.cex = 2, addmean = TRUE, 
+  show = FALSE, plot = FALSE)
+ADEgS(c(g34, g35), layout = c(1, 2))
+```
+
+<a name="appendix"></a>
+
+Appendix
+=============================
+
+This appendix summarizes the main changes between `ade4` and
+`adegraphics`. Each line corresponds to a graphical argument defined in
+`ade4` and its equivalent in `adegraphics` is given.
+
+| Arguments in `ade4` | Functions in `ade4`   | `g.args` in `adegraphics`   | `adeg.par` in `adegraphics`   |   |
+| ------------------- | ----------------------| ----------------------------| ------------------------------|---|
+| `abline.x`          | `table.cont`          | `ablineX`                   |                               |   |
+| `abline.y`          | `table.cont`          | `ablineY`                   |                               |   |
+| `abmean.x`          | `table.cont`          | `meanX`                     |                               |   |
+| `abmean.y`          | `table.cont`          | `meanY`                     |                               |   |
+| `addaxes`           | `s.arrow`, `s.chull`, `s.class`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `triangle.class`, `triangle.plot` | |`paxes.draw` | |
+| `area`              | `s.arrow`, `s.chull`, `s.class`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`  | `Sp`   |    |  a `Sp` object  |
+| `axesell`           | `s.class`, `s.distri`, `triangle.class`     |                    | `pellipses.axes.draw`                               |   |
+| `box`               | `s.corcircle`, `triangle.plot`          |                    | `pbackground.box`                                   |   |
+| `boxes`             | `s.arrow`, `s.label`, `sco.class`, `sco.label`, `sco.match`           |              | `plabels.boxes.draw`    |   |
+| `cellipse`          | `s.class`, `s.distri`, `triangle.class`      | `ellipseSize`                                               |                         |   |
+| `cgrid`             | `s.arrow`, `s.class`, `s.chull`, `s.corcircle`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `sco.boxplot`, `sco.class`, `sco.distri`, `sco.gauss`, `sco.label`, `sco.match` |  | `pgrid.nint` |  both play on the grid mesh, but they are not strictly equivalent |
+| `clabel`            | `s.arrow`, `s.class`, `s.chull`, `s.corcircle`, `s.distri`, `s.kde2d`, `s.label`, `s.match`, `s.traject`, `sco.boxplot`, `sco.class`, `sco.distri`, `sco.gauss`, `sco.label`, `sco.match`, `triangle.plot`   |  | `plabels.cex` |   |
+| `clabel`            | `table.dist`    |                                                                                             |  | `axis.text = list()` `lattice` parameter  |
+| `clabel.col`        | `table.cont`, `table.paint`, `table.value`    |                                                               |  | `axis.text = list()` `lattice` parameter  |
+| `clabel.row`        | `table.cont`, `table.paint`, `table.value`    |                                                               |  | `axis.text = list()` `lattice` parameter  |
+| `clegend`           | `s.value`, `table.cont`, `table.value`        |                                   | `plegend.size` `ppoints.cex` | parameters setting the legend size        |
+| `clegend`           | `table.paint`                                 |                                   | `plegend.size`                                |                          |
+| `clogo`             | `s.logo`                                      |                                   | `ppoints.cex`                                 |                          |
+| `cneig`             | `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.value`     |                                   | `pnb.edge.lwd`                                |                          |
+| `col.labels`        | `table.cont`, `table.paint`, `table.value`                                                                     | `labelsy`  |     |                          |
+| `contour`           | `s.arrow`, `s.class`, `s.chull`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value` | `Sp`  |   | a `Sp` object            |
+| `contour.plot`      | `s.image`  | `region`  |                      |             |
+| `cpoints`, `cpoint` | `s.arrow`, `s.class`, `s.chull`, `s.distri`, `s.kde2d`, `s.label`, `s.match`, `s.traject`, `s.value`, `sco.class`, `sco.label`, `sco.match`, `triangle.class`, `triangle.plot`  |   | `ppoints.cex` |    |
+| `csize`      | `s.value`, `table.cont`, `table.dist`, `table.paint`, `table.value`  | `ppoints.cex`  |                      |             |
+| `csize`      | `sco.distri`  | `sdSize`    |                      |             |
+| `cstar`      | `s.class`, `s.distri`, `triangle.class`  | `starSize`    |           |             |
+| `csub`       | `s.arrow`, `s.chull`, `s.class`, `s.corcircle`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `sco.boxplot`, `sco.class`, `sco.distri`, `sco.gauss`, `sco.label`, `sco.match`, `triangle.class`, `triangle.plot`  |  | `psub.cex`   |  |
+| `draw.line`  | `triangle.biplot`, `triangle.class`, `triangle.plot` | | `pgrid.draw`       | |
+| `edge`       | `s.arrow`, `s.match`, `s.traject`  | | `parrows.length`   | setting the length of the arrows to 0 is equivalent to `edge = FALSE` |
+| `grid`       | `s.arrow`, `s.chull`, `s.class`, `s.corcircle`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `sco.boxplot`, `sco.class`, `sco.distri`, `sco.gauss`, `sco.label`, `sco.match`, `table.cont`, `table.dist`, `table.value`  |  | `pgrid.draw` |  |
+| `horizontal` | `sco.class`, `sco.gauss`, `sco.label`, `sco.match` |              | `p1d.horizontal`  |             |
+| `image.plot` | `s.image`                             | `contour`    |                   |             |
+| `includeorigin`, `include.origin`  | `s.arrow`, `s.chull`, `s.class`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `sco.boxplot`, `sco.class`, `sco.distri`, `sco.gauss`, `sco.label`, `sco.match` |  | `porigin.include` |  |
+| `kgrid` | `s.image`                                  | `gridsize`   |                   |             |
+| `klogo` | `s.logo`                                   |              |                   | no correspondence |
+| `labeltriangle` | `triangle.class` , `triangle.plot`                  |                   |        | no correspondence   | 
+| `legen`          | `sco.gauss`                      | `labelplot`         |            |                   |
+| `neig`           | `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.value` | `nbobject`         |            | a `nb` object |
+| `optchull`       | `s.chull`                         | `chullSize`         |            |                   |
+| `origin`         | `s.arrow`, `s.chull`, `s.class`, `s.corcircle`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `sco.boxplot`, `sco.class`, `sco.distri`, `sco.gauss`, `sco.label`, `sco.match` | | `porigin.origin` | |
+| `pch`            | `s.arrow`, `s.chull`, `s.class`, `s.distri`, `s.kde2d`, `s.label`, `s.match`, `s.traject`, `s.value`, `sco.boxplot`, `sco.class`, `sco.label`, `sco.match`, `triangle.class`, `triangle.plot`, `table.cont`  | | `ppoints.pch`   |  |
+| `pixmap`         | `s.arrow`, `s.chull`, `s.class`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`         | | | no correspondence  |
+| `pos.lab`        | `sco.class`, `sco.label`, `sco.match`         | | `p1d.labpos` | |
+| `possub`         | `s.arrow`, `s.chull`, `s.class`, `s.corcircle`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `sco.class`, `sco.gauss`, `sco.label`, `sco.match`, `triangle.class`, `triangle.plot`  | | `psub.pos`   |  |
+| `rectlogo`       | `s.logo`     | `rect` | |   |
+| `reverse`        | `sco.class`, `sco.gauss`, `sco.label`, `sco.match` | | `p1d.reverse` |   |
+| `row.labels`     | `table.cont`, `table.paint`, `table.value`     | `labelsx` | | |
+| `scale`          | `triangle.class`, `triangle.plot`     | `adjust` | | |
+| `show.position`  | `triangle.class`, `triangle.plot`     | `showposition` | | |
+| `sub`            | `s.arrow`, `s.chull`, `s.class`, `s.corcircle`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `sco.boxplot`, `sco.class`, `sco.distri`, `sco.gauss`, `sco.label`, `sco.match`, `triangle.class`, `triangle.plot`  | | `psub.text`   |  |
+| `y.rank`  | `sco.distri`     | `yrank` | | |
+| `zmax`  | `s.value`     | | | set to default max(abs(z)) |
+| | | | | | 
+
+
+
+
+References
+=============================
\ No newline at end of file
diff --git a/inst/doc/adegraphics.html b/inst/doc/adegraphics.html
new file mode 100644
index 0000000..069d58c
--- /dev/null
+++ b/inst/doc/adegraphics.html
@@ -0,0 +1,1589 @@
+<!DOCTYPE html>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+
+<meta charset="utf-8">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="pandoc" />
+
+<meta name="viewport" content="width=device-width, initial-scale=1">
+
+<meta name="author" content="Alice Julien-Laferrière, Aurélie Siberchicot and Stéphane Dray" />
+
+<meta name="date" content="2016-12-13" />
+
+<title>The adegraphics package</title>
+
+
+
+<style type="text/css">code{white-space: pre;}</style>
+<style type="text/css">
+div.sourceCode { overflow-x: auto; }
+table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
+  margin: 0; padding: 0; vertical-align: baseline; border: none; }
+table.sourceCode { width: 100%; line-height: 100%; }
+td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
+td.sourceCode { padding-left: 5px; }
+code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code > span.dt { color: #902000; } /* DataType */
+code > span.dv { color: #40a070; } /* DecVal */
+code > span.bn { color: #40a070; } /* BaseN */
+code > span.fl { color: #40a070; } /* Float */
+code > span.ch { color: #4070a0; } /* Char */
+code > span.st { color: #4070a0; } /* String */
+code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code > span.ot { color: #007020; } /* Other */
+code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code > span.fu { color: #06287e; } /* Function */
+code > span.er { color: #ff0000; font-weight: bold; } /* Error */
+code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+code > span.cn { color: #880000; } /* Constant */
+code > span.sc { color: #4070a0; } /* SpecialChar */
+code > span.vs { color: #4070a0; } /* VerbatimString */
+code > span.ss { color: #bb6688; } /* SpecialString */
+code > span.im { } /* Import */
+code > span.va { color: #19177c; } /* Variable */
+code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code > span.op { color: #666666; } /* Operator */
+code > span.bu { } /* BuiltIn */
+code > span.ex { } /* Extension */
+code > span.pp { color: #bc7a00; } /* Preprocessor */
+code > span.at { color: #7d9029; } /* Attribute */
+code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+</style>
+
+
+
+<link href="data:text/css;charset=utf-8,body%20%7B%0Abackground%2Dcolor%3A%20%23fff%3B%0Amargin%3A%201em%20auto%3B%0Amax%2Dwidth%3A%20700px%3B%0Aoverflow%3A%20visible%3B%0Apadding%2Dleft%3A%202em%3B%0Apadding%2Dright%3A%202em%3B%0Afont%2Dfamily%3A%20%22Open%20Sans%22%2C%20%22Helvetica%20Neue%22%2C%20Helvetica%2C%20Arial%2C%20sans%2Dserif%3B%0Afont%2Dsize%3A%2014px%3B%0Aline%2Dheight%3A%201%2E35%3B%0A%7D%0A%23header%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0A%23TOC%20%7B%0Aclear%3A%20bot [...]
+
+</head>
+
+<body>
+
+
+
+
+<h1 class="title toc-ignore">The <code>adegraphics</code> package</h1>
+<h4 class="author"><em>Alice Julien-Laferrière, Aurélie Siberchicot and Stéphane Dray</em></h4>
+<h4 class="date"><em>2016-12-13</em></h4>
+
+
+<div id="TOC">
+<ul>
+<li><a href="#an-overview-of-object-classes"><span class="toc-section-number">1</span> An overview of object classes</a></li>
+<li><a href="#simple-graph-adeg-object"><span class="toc-section-number">2</span> Simple graph (<code>ADEg</code> object)</a><ul>
+<li><a href="#user-functions"><span class="toc-section-number">2.1</span> User functions</a></li>
+<li><a href="#arguments"><span class="toc-section-number">2.2</span> Arguments</a></li>
+<li><a href="#slots-and-methods"><span class="toc-section-number">2.3</span> Slots and Methods</a></li>
+</ul></li>
+<li><a href="#multiple-graph-adegs-object"><span class="toc-section-number">3</span> Multiple graph (<code>ADEgS</code> object)</a><ul>
+<li><a href="#slots-and-methods-1"><span class="toc-section-number">3.1</span> Slots and Methods</a></li>
+<li><a href="#creating-an-adegs-object-by-hand"><span class="toc-section-number">3.2</span> Creating an <code>ADEgS</code> object by hand</a><ul>
+<li><a href="#the-basic-methods-for-superposition-juxtaposition-and-insertion"><span class="toc-section-number">3.2.1</span> The basic methods for superposition, juxtaposition and insertion</a></li>
+<li><a href="#the-adegs-function"><span class="toc-section-number">3.2.2</span> The <code>ADEgS</code> function</a></li>
+</ul></li>
+<li><a href="#automatic-collections"><span class="toc-section-number">3.3</span> Automatic collections</a><ul>
+<li><a href="#partitioning-the-data-facets"><span class="toc-section-number">3.3.1</span> Partitioning the data (<code>facets</code>)</a></li>
+<li><a href="#multiple-axes"><span class="toc-section-number">3.3.2</span> Multiple axes</a></li>
+<li><a href="#multiple-score"><span class="toc-section-number">3.3.3</span> Multiple score</a></li>
+<li><a href="#multiple-variable"><span class="toc-section-number">3.3.4</span> Multiple variable</a></li>
+<li><a href="#outputs-of-the-ade4-package"><span class="toc-section-number">3.3.5</span> Outputs of the <code>ade4</code> package</a></li>
+</ul></li>
+</ul></li>
+<li><a href="#customizing-a-graph"><span class="toc-section-number">4</span> Customizing a graph</a><ul>
+<li><a href="#parameters-in-trellis.par"><span class="toc-section-number">4.1</span> Parameters in <code>trellis.par</code></a></li>
+<li><a href="#parameters-in-adeg.par"><span class="toc-section-number">4.2</span> Parameters in <code>adeg.par</code></a><ul>
+<li><a href="#global-assignment"><span class="toc-section-number">4.2.1</span> Global assignment</a></li>
+<li><a href="#local-assignment"><span class="toc-section-number">4.2.2</span> Local assignment</a></li>
+</ul></li>
+<li><a href="#parameters-in-g.args"><span class="toc-section-number">4.3</span> Parameters in <code>g.args</code></a></li>
+<li><a href="#parameters-applied-on-a-adegs"><span class="toc-section-number">4.4</span> Parameters applied on a <code>ADEgS</code></a></li>
+</ul></li>
+<li><a href="#using-adegraphics-functions-in-your-package"><span class="toc-section-number">5</span> Using <code>adegraphics</code> functions in your package</a></li>
+<li><a href="#examples"><span class="toc-section-number">6</span> Examples</a><ul>
+<li><a href="#labels-customization"><span class="toc-section-number">6.1</span> Labels customization</a></li>
+<li><a href="#ellipses-stars-and-convex-hulls"><span class="toc-section-number">6.2</span> Ellipses, stars and convex hulls</a></li>
+<li><a href="#values-and-legend"><span class="toc-section-number">6.3</span> Values and legend</a></li>
+<li><a href="#d-plot"><span class="toc-section-number">6.4</span> 1-D plot</a></li>
+<li><a href="#maps-and-neighbor-graphs"><span class="toc-section-number">6.5</span> Maps and neighbor graphs</a></li>
+<li><a href="#ternary-plots"><span class="toc-section-number">6.6</span> Ternary plots</a></li>
+</ul></li>
+<li><a href="#appendix"><span class="toc-section-number">7</span> Appendix</a></li>
+<li><a href="#references">References</a></li>
+</ul>
+</div>
+
+<br>
+<hr>
+<p><br></p>
+<p>The <code>adegraphics</code> package is a complete reimplementation of the graphical functionalities of the <code>ade4</code> package <span class="citation">(Dray and Dufour 2007)</span>. The package has been initially designed to improve the representation of the outputs of multivariate analyses performed with <code>ade4</code> but as its graphical functionalities are very general, they can be used for other purposes.</p>
+<p>The <code>adegraphics</code> package provides a flexible environment to produce, edit and manipulate graphs. We adopted an <em>object oriented</em> approach (a graph is an object) using <code>S4</code> classes and methods and used the visualization system provided by the <code>lattice</code> <span class="citation">(Sarkar 2008)</span> and <code>grid</code> <span class="citation">(Murrell 2005)</span> packages. In <code>adegraphics</code>, graphs are R objects that can be edited, store [...]
+<p>Note that we tried to facilitate the handling of <code>adegraphics</code> by <code>ade4</code> users. Hence, the name of functions and parameters has been preserved in many cases. The main changes are listed in the appendix of this vignette so that it should be quite easy to use <code>adegraphics</code>. However, several new functionalities (graphical parameters, creation and manipulation of graphical objects, etc.) are now available and detailed in this vignette.</p>
+<p>The <em>adelist</em> mailing list can be used to send questions and/or comments on <code>adegraphics</code> (see <a href="http://listes.univ-lyon1.fr/wws/info/adelist" class="uri">http://listes.univ-lyon1.fr/wws/info/adelist</a>) <br></p>
+<div id="an-overview-of-object-classes" class="section level1">
+<h1><span class="header-section-number">1</span> An overview of object classes</h1>
+<p>In <code>adegraphics</code>, a user-level function produces a plot that is stored (and returned) as an object. The class architecture of the objects created by <code>adegraphics</code> functions is described in <a href="#classes">Figure 1</a>.</p>
+<br>
+<div style="text-align:center">
+<p><a name="classes"></a> <span style="color:blue">Figure 1: Classes structure and user-level functions</span> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACJgAAAv6CAYAAADlOjvPAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7N13WFPn2wfwbxYjbBAQRcUBKo66965aa6vWXbtbrdpW7Z62du9lp9ZW627Vtu49cG+GAxCRLXuFEEjIfP/wZ18HOecEgqvfz3X1umq4z/M8cJJAznOf+5bFnzptAxEREREREREREREREd1abLYz1t3fPH+zl0FEREQEAPKbvQAiIiIiIiIiIiIiIiIiIiIiu [...]
+</div>
+<p><br></p>
+<p>This class management highlights a hierarchy with two parent classes:</p>
+<ul>
+<li><p><code>ADEg</code> for simple graphs. It contains the display of a single data set using only one kind of representation (e.g., arrows, points, lines, etc.)</p></li>
+<li><p><code>ADEgS</code> for multiple graphs. It contains a collection of at least two simple graphs (<code>ADEg</code>, <code>trellis</code> or <code>ADEgS</code>)</p></li>
+</ul>
+<p>The <code>ADEg</code> class has five child classes which are also subdivided in several child classes. Each of these five child classes is dedicated for a particular graphical data representation:</p>
+<ul>
+<li><p><code>ADEg.S1</code>: unidimensional graph of a numeric score</p></li>
+<li><p><code>ADEg.S2</code>: bidimensional graph of xy coordinates (<code>matrix</code> or <code>data.frame</code> object)</p></li>
+<li><p><code>ADEg.C1</code>: bidimensional graph of a numeric score (bar chart or curve)</p></li>
+<li><p><code>ADEg.T</code>: heat map-like representation of a data table (<code>matrix</code>, <code>data.frame</code>, <code>dist</code> or <code>table</code> object)</p></li>
+<li><p><code>ADEg.Tr</code>: ternary plot of xyz coordinates (<code>matrix</code> or <code>data.frame</code> object)</p></li>
+</ul>
+<p>The <code>ADEg</code> class and its five child classes are virtual: it is not allowed to create object belonging to these classes. Users can only create objects belonging to child classes by calls to user functions (see the <a href="#user-functions">User functions</a> section).</p>
+</div>
+<div id="simple-graph-adeg-object" class="section level1">
+<h1><span class="header-section-number">2</span> Simple graph (<code>ADEg</code> object)</h1>
+<p>In the <code>adegraphics</code> package, a graph is created by a call to a user function and stored as an R object. These functions allow to display the raw data but also the outputs of a multivariate analysis. The following sections describe the different graphical functions available in the package.</p>
+<p><a name="user-functions"></a></p>
+<div id="user-functions" class="section level2">
+<h2><span class="header-section-number">2.1</span> User functions</h2>
+<p>Several user functions are available to create a simple graph (stored as an <code>ADEg</code> object in R). Each function creates an object of a given class (see <a href="#classes">Figure 1</a>). <a href="#functionsADEg">Table 1</a> lists the different functions, their corresponding classes and a short description. The <code>ade4</code> users would not be lost: many functions have kept their names in <code>adegraphics</code>. The main changes are listed in <a href="#functionsADEgchang [...]
+<p><br> <a name="functionsADEg"></a> <span style="color:blue">Table 1: Graphical functions available in <code>adegraphics</code></span></p>
+<table>
+<thead>
+<tr class="header">
+<th align="left">Function</th>
+<th align="left">Class of the returned object</th>
+<th align="left">Description</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td align="left"><code>s1d.barchart</code></td>
+<td align="left"><code>C1.barchart</code></td>
+<td align="left">1-D plot of a numeric score by bars</td>
+</tr>
+<tr class="even">
+<td align="left"><code>s1d.curve</code></td>
+<td align="left"><code>C1.curve</code></td>
+<td align="left">1-D plot of a numeric score linked by curves</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>s1d.curves</code></td>
+<td align="left"><code>C1.curves</code></td>
+<td align="left">1-D plot of multiple scores linked by curves</td>
+</tr>
+<tr class="even">
+<td align="left"><code>s1d.density</code></td>
+<td align="left"><code>C1.density</code></td>
+<td align="left">1-D plot of a numeric score by density curves</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>s1d.dotplot</code></td>
+<td align="left"><code>C1.dotplot</code></td>
+<td align="left">1-D plot of a numeric score by dots</td>
+</tr>
+<tr class="even">
+<td align="left"><code>s1d.gauss</code></td>
+<td align="left"><code>C1.gauss</code></td>
+<td align="left">1-D plot of a numeric score by Gaussian curves</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>s1d.hist</code></td>
+<td align="left"><code>C1.hist</code></td>
+<td align="left">1-D plot of a numeric score by bars</td>
+</tr>
+<tr class="even">
+<td align="left"><code>s1d.interval</code></td>
+<td align="left"><code>C1.interval</code></td>
+<td align="left">1-D plot of the interval between two numeric scores</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>s1d.boxplot</code></td>
+<td align="left"><code>S1.boxplot</code></td>
+<td align="left">1-D box plot of a numeric score partitioned in classes</td>
+</tr>
+<tr class="even">
+<td align="left"><code>s1d.class</code></td>
+<td align="left"><code>S1.class</code></td>
+<td align="left">1-D plot of a numeric score partitioned in classes</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>s1d.distri</code></td>
+<td align="left"><code>S1.distri</code></td>
+<td align="left">1-D plot of a numeric score by means/tandard deviations computed using an external table of weights</td>
+</tr>
+<tr class="even">
+<td align="left"><code>s1d.label</code></td>
+<td align="left"><code>S1.label</code></td>
+<td align="left">1-D plot of a numeric score with labels</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>s1d.match</code></td>
+<td align="left"><code>S1.match</code></td>
+<td align="left">1-D plot of the matching between two numeric scores</td>
+</tr>
+<tr class="even">
+<td align="left"><code>s.arrow</code></td>
+<td align="left"><code>S2.arrow</code></td>
+<td align="left">2-D scatter plot with arrows</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>s.class</code></td>
+<td align="left"><code>S2.class</code></td>
+<td align="left">2-D scatter plot with a partition in classes</td>
+</tr>
+<tr class="even">
+<td align="left"><code>s.corcircle</code></td>
+<td align="left"><code>S2.corcircle</code></td>
+<td align="left">Correlation circle</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>s.density</code></td>
+<td align="left"><code>S2.density</code></td>
+<td align="left">2-D scatter plot with kernel density estimation</td>
+</tr>
+<tr class="even">
+<td align="left"><code>s.distri</code></td>
+<td align="left"><code>S2.distri</code></td>
+<td align="left">2-D scatter plot with means/standard deviations computed using an external table of weights</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>s.image</code></td>
+<td align="left"><code>S2.image</code></td>
+<td align="left">2-D scatter plot with loess estimation of an additional numeric score</td>
+</tr>
+<tr class="even">
+<td align="left"><code>s.label</code></td>
+<td align="left"><code>S2.label</code></td>
+<td align="left">2-D scatter plot with labels</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>s.logo</code></td>
+<td align="left"><code>S2.logo</code></td>
+<td align="left">2-D scatter plot with logos (pixmap objects)</td>
+</tr>
+<tr class="even">
+<td align="left"><code>s.match</code></td>
+<td align="left"><code>S2.match</code></td>
+<td align="left">2-D scatter plot of the matching between two sets of coordinates</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>s.Spatial</code></td>
+<td align="left"><code>S2.label</code></td>
+<td align="left">Mapping of a <code>Spatial*</code> object</td>
+</tr>
+<tr class="even">
+<td align="left"><code>s.traject</code></td>
+<td align="left"><code>S2.traject</code></td>
+<td align="left">2-D scatter plot with trajectories</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>s.value</code></td>
+<td align="left"><code>S2.value</code></td>
+<td align="left">2-D scatter plot with proportional symbols</td>
+</tr>
+<tr class="even">
+<td align="left"><code>table.image</code></td>
+<td align="left"><code>T.image</code></td>
+<td align="left">Heat map-like representation with colored cells</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>table.value</code></td>
+<td align="left"><code>T.value</code> or <code>T.cont</code></td>
+<td align="left">Heat map-like representation with proportional symbols</td>
+</tr>
+<tr class="even">
+<td align="left"><code>triangle.class</code></td>
+<td align="left"><code>Tr.class</code></td>
+<td align="left">Ternary plot with a partition in classes</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>triangle.label</code></td>
+<td align="left"><code>Tr.label</code></td>
+<td align="left">Ternary plot with labels</td>
+</tr>
+<tr class="even">
+<td align="left"><code>triangle.match</code></td>
+<td align="left"><code>Tr.match</code></td>
+<td align="left">Ternary plot of the matching between two sets of coordinates</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>triangle.traject</code></td>
+<td align="left"><code>Tr.match</code></td>
+<td align="left">Ternary plot with trajectories</td>
+</tr>
+</tbody>
+</table>
+<p><br> <a name="functionsADEgchanged"></a> <span style="color:blue">Table 2: Changes in functions names between <code>ade4</code> and <code>adegraphics</code></span></p>
+<table>
+<thead>
+<tr class="header">
+<th align="left">Function in <code>ade4</code></th>
+<th align="left">Equivalence in <code>adegraphics</code></th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td align="left"><code>table.cont</code>, <code>table.dist</code>, <code>table.value</code></td>
+<td align="left"><code>table.value</code><a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a></td>
+</tr>
+<tr class="even">
+<td align="left"><code>table.paint</code></td>
+<td align="left"><code>table.image</code></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>sco.boxplot</code></td>
+<td align="left"><code>s1d.boxplot</code></td>
+</tr>
+<tr class="even">
+<td align="left"><code>sco.class</code></td>
+<td align="left"><code>s1d.class</code></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>sco.distri</code></td>
+<td align="left"><code>s1d.distri</code></td>
+</tr>
+<tr class="even">
+<td align="left"><code>sco.gauss</code></td>
+<td align="left"><code>s1d.gauss</code></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>sco.label</code></td>
+<td align="left"><code>s1d.label</code></td>
+</tr>
+<tr class="even">
+<td align="left"><code>sco.match</code></td>
+<td align="left"><code>s1d.match</code></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>sco.quant</code></td>
+<td align="left">no equivalence</td>
+</tr>
+<tr class="even">
+<td align="left"><code>s.chull</code></td>
+<td align="left"><code>s.class</code><a href="#fn2" class="footnoteRef" id="fnref2"><sup>2</sup></a></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>s.kde2d</code></td>
+<td align="left"><code>s.density</code></td>
+</tr>
+<tr class="even">
+<td align="left"><code>s.match.class</code></td>
+<td align="left">superposition of <code>s.match</code> and <code>s.class</code></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>triangle.biplot</code></td>
+<td align="left"><code>triangle.match</code></td>
+</tr>
+<tr class="even">
+<td align="left"><code>triangle.plot</code></td>
+<td align="left"><code>triangle.label</code></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>s.multinom</code></td>
+<td align="left"><code>triangle.multinom</code></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div id="arguments" class="section level2">
+<h2><span class="header-section-number">2.2</span> Arguments</h2>
+<p>The list of arguments of a function are given by the <code>args</code> function.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(ade4)
+<span class="kw">library</span>(adegraphics)</code></pre></div>
+<pre><code>## 
+## Attaching package: 'adegraphics'</code></pre>
+<pre><code>## The following objects are masked from 'package:ade4':
+## 
+##     kplotsepan.coa, s.arrow, s.class, s.corcircle, s.distri,
+##     s.image, s.label, s.logo, s.match, s.traject, s.value,
+##     table.value, triangle.class</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">args</span>(s.label)</code></pre></div>
+<pre><code>## function (dfxy, labels = rownames(dfxy), xax = 1, yax = 2, facets = NULL, 
+##     plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...) 
+## NULL</code></pre>
+<p>Some arguments are very general and present in all user functions:</p>
+<ul>
+<li><p><code>plot</code>: a logical value indicating if the graph should be displayed</p></li>
+<li><p><code>storeData</code>: a logical value indicating if the data should be stored in the returned object. If <code>FALSE</code>, only the names of the data are stored. This allows to reduce the size of the returned object but it implies that the data should not be modified in the environment to plot again the graph.</p></li>
+<li><p><code>add</code>: a logical value indicating if the graph should be superposed on the graph already displayed in the current device (it replaces the argument <code>add.plot</code> in <code>ade4</code>).</p></li>
+<li><p><code>pos</code>: an integer indicating the position of the environment where the data are stored, relative to the environment where the function is called. Useful only if <code>storeData</code> is <code>FALSE</code>.</p></li>
+<li><p><code>…</code>: additional graphical parameters (see below)</p></li>
+</ul>
+<p>Some other arguments influence the graphical outputs and they are thus specific to the type of produced graph. <a href="#gargsVSclass">Figure 2</a> summarizes some of these graphical parameters available for the different functions. We only reported the parameters stored in the <code>g.args</code> slot of the returned object (see the <a href="#gargs">Parameters in <code>g.args</code></a> section).</p>
+<br>
+<div style="text-align:center">
+<p><a name="gargsVSclass"></a> <span style="color:blue">Figure 2: Specific arguments in each object class</span> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAMACAMAAADMiSWtAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEh [...]
+</div>
+<p><br></p>
+<p><br> The <code>ade4</code> users would note that the names of some arguments have been modified in <code>adegraphics</code>. The <a href="#appendix">Appendix</a> gives a full list of these modifications.</p>
+<p><a name="slots"></a></p>
+</div>
+<div id="slots-and-methods" class="section level2">
+<h2><span class="header-section-number">2.3</span> Slots and Methods</h2>
+<p>A call to a graphical function (see the <a href="#user-functions">User functions</a> section) returns an <code>ADEg</code> object. Each object is defined by a number of slots and several methods are associated to this class. Let us consider the <code>olympic</code> data set available in the <code>ade4</code> package. A principal component analysis (PCA) is applied on the <code>olympic$tab</code> table that contains the results for 33 participating athletes at the 1988 summer olympic g [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">data</span>(olympic)
+pca1 <-<span class="st"> </span><span class="kw">dudi.pca</span>(olympic$tab, <span class="dt">scannf =</span> <span class="ot">FALSE</span>)</code></pre></div>
+<p>The barplot of eigenvalues is then drawn and stored in <code>g1</code>:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g1 <-<span class="st"> </span><span class="kw">s1d.barchart</span>(pca1$eig, <span class="dt">p1d.horizontal =</span> F, <span class="dt">ppolygons.col =</span> <span class="st">"white"</span>)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAMAAACTGUWNAAABsFBMVEUAAAADAwMEBAQFBQUGBgYHBwcKCgoNDQ0ODg4PDw8QEBARERESEhITExMWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEjIyMkJCQlJSUnJycoKCgpKSkqKiosLCwtLS0uLi4vLy8wMDAzMzM1NTU4ODg5OTk7Ozs8PDw+Pj4/Pz9AQEBBQUFDQ0NERERNTU1OTk5PT09VVVVWVlZaWlpiYmJjY2NkZGRlZWVmZmZnZ2dpaWlqampra2ttbW1zc3N0dHR1dXV3d3d5eXl7e3t9fX1+fn5/f3+Dg4OEhISIiIiLi4uMjIyOjo6Pj4+QkJCRkZGSkpKUlJSWlpaXl5eZmZmbm5ufn5+hoaGjo6OmpqaoqKipqamqqqqrq6usrKywsLCys [...]
+<p><br> The class of the <code>g1</code> object is <code>C1.barchart</code> which extends the <code>ADEg</code> class:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">class</span>(g1)</code></pre></div>
+<pre><code>## [1] "C1.barchart"
+## attr(,"package")
+## [1] "adegraphics"</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">showClass</span>(<span class="st">"C1.barchart"</span>)</code></pre></div>
+<pre><code>## Class "C1.barchart" [package "adegraphics"]
+## 
+## Slots:
+##                                                                        
+## Name:          data  trellis.par     adeg.par lattice.call       g.args
+## Class:         list         list         list         list         list
+##                                              
+## Name:         stats       s.misc         Call
+## Class:         list         list         call
+## 
+## Extends: 
+## Class "ADEg.C1", directly
+## Class "ADEg", by class "ADEg.C1", distance 2
+## Class "ADEgORtrellis", by class "ADEg.C1", distance 3
+## Class "ADEgORADEgSORtrellis", by class "ADEg.C1", distance 3</code></pre>
+<p><br> This object contains different slots:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">slotNames</span>(g1)</code></pre></div>
+<pre><code>## [1] "data"         "trellis.par"  "adeg.par"     "lattice.call"
+## [5] "g.args"       "stats"        "s.misc"       "Call"</code></pre>
+<p><br> These slots are defined for each <code>ADEg</code> object and contain different types of information. The package <code>adegraphics</code> uses the capabilities of the <code>lattice</code> package to display a graph (by generating a <code>trellis</code> object). Hence, several slots contain information that will be passed in the call to the <code>lattice</code> functions:</p>
+<ul>
+<li><p><code>data</code>: a list containing information about the data.</p></li>
+<li><p><code>trellis.par</code>: a list of graphical parameters that are directly passed to the <code>lattice</code> functions using the <code>par.settings</code> argument (see the <a href="#trellispar">Parameters in <code>trellis.par</code></a> section).</p></li>
+<li><p><code>adeg.par</code>: a list of graphical parameters defined in <code>adegraphics</code>. The list of parameters can be obtained using the <code>adegpar</code> function (see the <a href="#adegpar">Parameters in <code>adeg.par</code></a> section).</p></li>
+<li><p><code>lattice.call</code>: a list of two elements containing the information required to create the <code>trellis</code> object: <code>graphictype</code> (the name of the <code>lattice</code> functions that should be used) and <code>arguments</code> (the list of parameter values required to obtain the <code>trellis</code> object).</p></li>
+<li><p><code>g.args</code>: a list containing at least the different values of the graphical arguments described in <a href="#gargsVSclass">Figure 2</a> (see the <a href="#gargs">Parameters in <code>g.args</code></a> section).</p></li>
+<li><p><code>stats</code>: a list of internal preliminary computations performed to display the graph.</p></li>
+<li><p><code>s.misc</code>: a list of other internal parameters.</p></li>
+<li><p><code>Call</code>: an object of class <code>call</code> containing the matched call.</p></li>
+</ul>
+<p><br> These different slots can be extracted using the <code>@</code> operator:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g1 at data</code></pre></div>
+<pre><code>## $score
+##  [1] 3.4182381 2.6063931 0.9432964 0.8780212 0.5566267 0.4912275 0.4305952
+##  [8] 0.3067981 0.2669494 0.1018542
+## 
+## $frame
+## [1] 24
+## 
+## $storeData
+## [1] TRUE</code></pre>
+<p><br> All these slots are automatically filled during the object creation. The <code>trellis.par</code>, <code>adeg.par</code> and <code>g.args</code> can also be modified <em>a posteriori</em> using the <code>update</code> method (see the <a href="#update">Customizing a graph</a> section). This allows to customize graphs after their creation.</p>
+<p>We consider the correlation circle that depicts the correlation between PCA axes and the results for each event:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g2 <-<span class="st"> </span><span class="kw">s.corcircle</span>(pca1$co)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAMAAACTGUWNAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZ [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">class</span>(g2)</code></pre></div>
+<pre><code>## [1] "S2.corcircle"
+## attr(,"package")
+## [1] "adegraphics"</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g2 at g.args</code></pre></div>
+<pre><code>## $fullcircle
+## [1] TRUE
+## 
+## $xlim
+## [1] -1.2  1.2
+## 
+## $ylim
+## [1] -1.2  1.2
+## 
+## $scales
+## $scales$draw
+## [1] FALSE</code></pre>
+<p><br> The argument <code>fullcircle</code> can be updated <em>a posteriori</em> so that the original object is modified:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">update</span>(g2, <span class="dt">fullcircle =</span> <span class="ot">FALSE</span>)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAMAAACTGUWNAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZ [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g2 at g.args</code></pre></div>
+<pre><code>## $fullcircle
+## [1] FALSE
+## 
+## $xlim
+## [1] -0.8815395  0.9544397
+## 
+## $ylim
+## [1] -0.6344523  1.2015270
+## 
+## $scales
+## $scales$draw
+## [1] FALSE</code></pre>
+<p>Several other methods have been defined for the <code>ADEg</code> class allowing to extract information, modify or combine objects:</p>
+<ul>
+<li><p><code>getcall</code>, <code>getlatticecall</code> and <code>getstats</code>: these accessor methods return respectively the <code>Call</code>, the <code>lattice.call</code> and the <code>stats</code> slots.</p></li>
+<li><p><code>getparameters</code>: this method returns the <code>trellis.par</code> and/or the <code>adeg.par</code> slots.</p></li>
+<li><p><code>show</code>, <code>print</code> and <code>plot</code>: these methods display the <code>ADEg</code> object in the current device or in a new one.</p></li>
+<li><p><code>gettrellis</code>: this method returns the <code>ADEg</code> object as a <code>trellis</code> object. It can then be exploited using the <code>lattice</code> and <code>latticeExtra</code> packages.</p></li>
+<li><p><code>superpose</code>, <code>+</code> and <code>add.ADEg</code>: these methods superpose two <code>ADEg</code> graphs. It returns a multiple graph object of class <code>ADEgS</code> (see the <a href="#superpose">The basic methods for superposition, juxtaposition and insertion</a> section).</p></li>
+<li><p><code>insert</code>: this method inserts an <code>ADEg</code> graph in an existing one or in the current device. It returns an <code>ADEgS</code> object (see the <a href="#superpose">The basic methods for superposition, juxtaposition and insertion</a> section).</p></li>
+<li><p><code>cbindADEg</code>, <code>rbindADEg</code>: these methods combine several <code>ADEg</code> graphs. It returns an <code>ADEgS</code> object (see the <a href="#superpose">The basic methods for superposition, juxtaposition and insertion</a> section).</p></li>
+<li><p><code>update</code>: this method modifies the graphical parameters after the <code>ADEg</code> creation. It updates the current display and returns the modified <code>ADEg</code> (see the <a href="#update">Customizing a graph</a> section).</p></li>
+</ul>
+<p>For instance:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">getcall</span>(g1) ## equivalent to g1 at Call</code></pre></div>
+<pre><code>## s1d.barchart(score = pca1$eig, p1d.horizontal = F, ppolygons.col = "white")</code></pre>
+<p>A biplot-like graph can be obtained using the <code>superpose</code> method. The result is a multiple graph:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g3 <-<span class="st"> </span><span class="kw">s.label</span>(pca1$li)
+g4 <-<span class="st"> </span><span class="kw">s.arrow</span>(<span class="dv">5</span> *<span class="st"> </span>pca1$c1, <span class="dt">add =</span> <span class="ot">TRUE</span>)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAMAAACTGUWNAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZ [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">class</span>(g4)</code></pre></div>
+<pre><code>## [1] "ADEgS"
+## attr(,"package")
+## [1] "adegraphics"</code></pre>
+<p>In addition, some object classes have specific methods. For instance, a <code>zoom</code> method is available for <code>ADEg.S1</code> and <code>ADEg.S2</code> classes. For the <code>ADEg.S2</code> class, the method <code>addhist</code> (see the <a href="#superpose">The basic methods for superposition, juxtaposition and insertion</a> section) decorates a 2-D graph by adding marginal distributions as histograms and density lines (this method replaces and extends the <code>s.hist</code> [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">zoom</span>(g3, <span class="dt">zoom =</span> <span class="dv">2</span>, <span class="dt">center =</span> <span class="kw">c</span>(<span class="dv">2</span>, -<span class="dv">2</span>))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAMAAACTGUWNAAACx1BMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwuLi4wMDAxMTEyMjIzMzM0NDQ1NTU3Nzc5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERGRkZHR0dISEhKSkpLS0tMTExNTU1PT09QUFBSUlJTU1NUVFRVVVVXV1dZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NlZWVmZmZnZ2doaGhpaWlra2tsbGxtbW1ubm5vb29wcHBxc [...]
+</div>
+</div>
+<div id="multiple-graph-adegs-object" class="section level1">
+<h1><span class="header-section-number">3</span> Multiple graph (<code>ADEgS</code> object)</h1>
+<p>The <code>adegraphics</code> package provides class <code>ADEgS</code> to manage easily the combination of several graphs. This class allows to deal with the superposition, insertion or juxtaposition of several graphs in a single object. An object of this class is a list containing several graphical objects and information about their positioning. Different ways to generate <code>ADEgS</code> objects are described below.</p>
+<div id="slots-and-methods-1" class="section level2">
+<h2><span class="header-section-number">3.1</span> Slots and Methods</h2>
+<p>The class <code>ADEgS</code> is used to store multiple graphs. Different slots are associated to this class (use the symbol <code>@</code> to extract information):</p>
+<ul>
+<li><p><code>ADEglist</code>: a list of graphs stored as <code>trellis</code>, <code>ADEg</code> and/or <code>ADEgS</code> objects.</p></li>
+<li><p><code>positions</code>: a matrix containing the positions of the graphs. It has four columns and as many rows as the number of graphical objects in the <code>ADEglist</code> slot. For each graph (i.e. row), it contains the coordinates of the bottom-left and top-right corners in <code>npc</code> units (i.e. normalized parent coordinates varying between 0 and 1).</p></li>
+<li><p><code>add</code>: a square binary matrix with as many rows and columns as the number of graphical objects in the <code>ADEglist</code> slot. It allows to manage the superposition of graphs: the value at the i-th row and j-th column is equal to 1 if the j-th graphical object is superposed on the i-th. Otherwise, this value is equal to 0.</p></li>
+<li><p><code>Call</code>: an object of class <code>call</code> containing the matched call.</p></li>
+</ul>
+<p>Several methods have been implemented to obtain information, edit or modify <code>ADEgS</code> objects. Several methods are inspired from the management of <code>list</code> in R:</p>
+<ul>
+<li><p><code>[</code>, <code>[[</code> and <code>$</code>: these methods extract one or more elements from the <code>ADEgS</code> object.</p></li>
+<li><p><code>getpositions</code>, <code>getgraphics</code> and <code>getcall</code>: these methods return the <code>positions</code>, the <code>ADEglist</code> and the <code>Call</code> slots, respectively.</p></li>
+<li><p><code>names</code> and <code>length</code>: these methods return the names and number of graphs contained in the object.</p></li>
+<li><p><code>[[<-</code> and <code>names<-</code>: these methods replace a graph or its name in an <code>ADEgS</code> object (acts on the <code>ADEglist</code> slot).</p></li>
+<li><p><code>show</code>, <code>plot</code> and <code>print</code>: these methods display the <code>ADEgS</code> object in the current device or in a new one.</p></li>
+<li><p><code>superpose</code> and <code>+</code>: these methods superpose two graphs. It returns a multiple graph object of class <code>ADEgS</code> (see the <a href="#superpose">The basic methods for superposition, juxtaposition and insertion</a> section).</p></li>
+<li><p><code>insert</code>: this method inserts a graph in an existing one or in the current device. It returns a multiple graph object of class <code>ADEgS</code> (see the <a href="#superpose">The basic methods for superposition, juxtaposition and insertion</a> section).</p></li>
+<li><p><code>cbindADEg</code>, <code>rbindADEg</code>: these methods combine several graphs. It returns an <code>ADEgS</code> object (see the <a href="#superpose">The basic methods for superposition, juxtaposition and insertion</a> section).</p></li>
+<li><p><code>update</code>: this method modifies the names and/or the <code>positions</code> of the graphs contained in an <code>ADEgS</code> object. It updates the current display and returns the modified <code>ADEgS</code>.</p></li>
+</ul>
+<p>We will show in the next sections how these methods can be used to deal with <code>ADEgS</code> objects.</p>
+</div>
+<div id="creating-an-adegs-object-by-hand" class="section level2">
+<h2><span class="header-section-number">3.2</span> Creating an <code>ADEgS</code> object by hand</h2>
+<p>The <code>ADEgS</code> objects can be created by easy manipulation of several simple graphs. Some methods (e.g., <code>insert</code>, <code>superpose</code>) can be used to create a compilation of graphs by hand.</p>
+<p><a name="superpose"></a></p>
+<div id="the-basic-methods-for-superposition-juxtaposition-and-insertion" class="section level3">
+<h3><span class="header-section-number">3.2.1</span> The basic methods for superposition, juxtaposition and insertion</h3>
+<p>The functions <code>superpose</code>, <code>+</code> and <code>add.ADEg</code> allow the superposition of an <code>ADEg</code>/<code>ADEgS</code> object on an <code>ADEg</code>/<code>ADEgS</code> object.</p>
+<p>The vector <code>olympic$score</code> contains the total number of points computed for each participant. This vector is used to generate a <code>factor</code> partitioning the participants in two groups according to their final result (more or less than 8000 points):</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">fac.score <-<span class="st"> </span><span class="kw">factor</span>(olympic$score <<span class="st"> </span><span class="dv">8000</span>, <span class="dt">labels =</span> <span class="kw">c</span>(<span class="st">"MT8000"</span>, <span class="st">"LT8000"</span>))</code></pre></div>
+<p>These two groups can be represented on the PCA factorial map using the <code>s.class</code> function:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g5 <-<span class="st"> </span><span class="kw">s.class</span>(pca1$li, fac.score, <span class="dt">col =</span> <span class="kw">c</span>(<span class="st">"red"</span>, <span class="st">"blue"</span>), <span class="dt">chullSize =</span> <span class="dv">1</span>, <span class="dt">ellipseSize =</span> <span class="dv">0</span>, 
+              <span class="dt">plabels.cex =</span> <span class="dv">2</span>, <span class="dt">pbackground.col =</span> <span class="st">"grey85"</span>, <span class="dt">paxes.draw =</span> <span class="ot">TRUE</span>)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAIAAAArpSLoAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOy9eXwT57X/f2ZGmkWrN2xjg9l3AmENCSEJISwJKWkIa7Y2kJDQ7Xvbe7vcJv2l3/R7b3vb3i5pszUlSSELELYQSAhLzA4xmw22WcxiDNh41b5rZn5/jBCyJMsjaUYjyc/7lVdeZjQzekbSfOY85zznHIzneUAgEAglwJUeAAKB6LkgAUIgEIqBBAiBQCgGEiAEAqEYSIAQCIRiIAFCIBCKgQQIgUAoBhIgBAKhGEiAEAiEYiABQiAQioEECIFAKAYSIAQCoRhIgBAIhGIgAUIgEIqBBKgbzGZzVVWV0qOQkaampvPnzys9Chm5cuVKQ0OD0qOQkbNnz7a0tCg9igRBAtQN5eXlr732mtKjkJHNmzf/7W9/U [...]
+<p>The graph with the labels (object <code>g3</code>) can then be superposed on this one:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g6 <-<span class="st"> </span><span class="kw">superpose</span>(g5, g3, <span class="dt">plot =</span> <span class="ot">TRUE</span>) ## equivalent to g5 + g3</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAIAAAArpSLoAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOydeXxM5/7Hv2f2JctkkU0qkYQQoa2tqqr2UkVp7Vy1XBotV3up4t72+lXLrajeLkqFokIisdVSpbYgiqhYsiEhspDIMkkmmcxyzvn9cRiTWc6cmTmzJHner77ulWfOec4zc+Z85vt8n+f7/WIkSQICgUC4Ao6rB4BAIFovSIAQCITLQAKEQCBcBhIgBALhMpAAIRAIl4EECIFAuAwkQAgEwmUgAUIgEC4DCRACgXAZSIAQCITLQAKEQCBcBhIgBALhMpAAIRAIl4EECIFAuAwkQAgEwmUgAUIgEC4DCZBlfvnll7Fjx7p6FI4iOzu7R48erh6FA2nfvr2rh+BAevTokZ2d7epR2A4SIMtcvXr1r7/+cvUoH [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">class</span>(g6)</code></pre></div>
+<pre><code>## [1] "ADEgS"
+## attr(,"package")
+## [1] "adegraphics"</code></pre>
+<p>In the case of a superposition, the graphical parameters (e.g., background and limits) of the first graph (the one below) are used as a reference and applied to the second one (the one above). Note that it is also possible to use the <code>add = TRUE</code> argument in the call of a simple user function (functions described in <a href="#functionsADEg">Table 1</a>) to perform a superposition. The graph <code>g6</code> can also be obtained by:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g5
+<span class="kw">s.label</span>(pca1$li, <span class="dt">add =</span> <span class="ot">TRUE</span>)</code></pre></div>
+<p>The functions <code>cbindADEg</code> and <code>rbindADEg</code> allows to combine several graphical objects (<code>ADEg</code>, <code>ADEgS</code> or <code>trellis</code>) by rows or by columns. The new created <code>ADEgS</code> contains the list of the reduced graphs:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">rbindADEg</span>(<span class="kw">cbindADEg</span>(g2, g3), <span class="kw">cbindADEg</span>(g5, g6), <span class="dt">plot =</span> <span class="ot">TRUE</span>)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAJACAIAAADq+E5hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdeTxU6/8A8DN2WpAQMbaUIVxaSLaorFOWlMiaRpIrLqluC7dC9rWypJKi0KaiQou1pDBZ6oqSUEgL2c3vj/P9zm++tjD7eN5/3NfMmTPP+YwbnznnfJ7Pg2hsbLx27RoOh4MAACAdJiYmCwsLCILA7xcAkBz8+8Vy69at9PR0XV1dascDAAwlLy+PjY0NgiDa//3C4XCfPn0SERGhdiBEuX79uoyMjKysLLUDmbne3t5fv37x8fFROxCiNDc3L168GIFAkPUo8O8XCw6HU1dXDwwMJOvBAGC28fDwgE+8aP/3a2RkpKCgQEtLi9qBEOXly5empqYODg7UDmTm2tvbP3/+vHz5cmoHQpQnT55oaGgwMTGR9 [...]
+<p>The function <code>insert</code> allows the insertion of a graphical object on another one (<code>ADEg</code> or <code>ADEgS</code>). It takes the position of the inserted graph as an argument:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g7 <-<span class="st"> </span><span class="kw">insert</span>(g2, g6, <span class="dt">posi =</span> <span class="kw">c</span>(<span class="fl">0.65</span>, <span class="fl">0.65</span>, <span class="fl">0.95</span>, <span class="fl">0.95</span>))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAIAAAArpSLoAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOydd1xT1/vHT3YgbBBkCCJTwIULEVERraOKCwEVFTfW0SruamndCm3dAzeiKIhFUKyiKCKIUnGwh8oWlJ0QMu/vj/trmm+AkHGToJz3q3/knpx77pOafDjnOed5HhyCIAACgUBUAV7VBkAgkO4LFCAIBKIyoABBIBCVAQUIAoGoDChAEAhEZUABgkAgKgMKEAQCURlQgCAQiMqAAgSBQFQGFCAIBKIyoABBIBCVAQUIAoGoDChAEAhEZUABgkAgKgMKEAQCURlQgCAQiMqAAtQ54eHhM2bMULUViiInJ2fw4MGqtkKBWFpaqtoEBTJ48OCcnBxVWyE7UIA6559//nn16pWqrVAUhYWF2dnZqrZCgXz8+FHVJ [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">class</span>(g7)</code></pre></div>
+<pre><code>## [1] "ADEgS"
+## attr(,"package")
+## [1] "adegraphics"</code></pre>
+<p>The different methods associated to the <code>ADEgS</code> class allow to obtain information and to modify the multiple graph:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">length</span>(g7)</code></pre></div>
+<pre><code>## [1] 3</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">names</span>(g7)</code></pre></div>
+<pre><code>## [1] "g1" "g2" "X"</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">names</span>(g7) <-<span class="st"> </span><span class="kw">c</span>(<span class="st">"chulls"</span>, <span class="st">"labels"</span>, <span class="st">"cor"</span>)
+<span class="kw">class</span>(g7[<span class="dv">1</span>])</code></pre></div>
+<pre><code>## [1] "ADEgS"
+## attr(,"package")
+## [1] "adegraphics"</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">class</span>(g7[[<span class="dv">1</span>]])</code></pre></div>
+<pre><code>## [1] "S2.class"
+## attr(,"package")
+## [1] "adegraphics"</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">class</span>(g7$chulls)</code></pre></div>
+<pre><code>## [1] "S2.class"
+## attr(,"package")
+## [1] "adegraphics"</code></pre>
+<p>The multiple graph contains three simple graphs. It can be easily updated. For instance, the size of the inserted graph can be modified:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">pos.mat <-<span class="st"> </span><span class="kw">getpositions</span>(g7)
+pos.mat</code></pre></div>
+<pre><code>##           [,1] [,2] [,3] [,4]
+##           0.00 0.00 1.00 1.00
+##           0.00 0.00 1.00 1.00
+## positions 0.65 0.65 0.95 0.95</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">pos.mat[<span class="dv">3</span>,] <-<span class="st"> </span><span class="kw">c</span>(<span class="fl">0.1</span>, <span class="fl">0.7</span>, <span class="fl">0.3</span>, <span class="fl">0.9</span>)
+<span class="kw">update</span>(g7, <span class="dt">positions =</span> pos.mat)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAIAAAArpSLoAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOydd1xTVxvHz80eQMIeIiDIUNGqoKIV3KsVUV8FZy11Yh1V4cXRoa2riq9araKitVoc4MIJKmhBQBQ3U4ZsBGUGCBk39/3jtmkaIIRs4Hw//fSTnJx77xPk/jj3Oc9AMAwDEAgEog0I2jYAAoF0X6AAQSAQrQEFCAKBaA0oQBAIRGtAAYJAIFoDChAEAtEaUIAgEIjWgAIEgUC0BhQgCASiNaAAQSAQrQEFCAKBaA0oQBAIRGtAAYJAIFoDChAEAtEaUIAgEIjWgAIEgUC0BhSg9jl79uyMGTO0bYW6yMjIcHNz07YVaqRXr17aNkGNuLm5ZWRkaNsKxYEC1D7Pnj17/vy5tq1QFzk5Oenp6dq2Qo0UFBRo2 [...]
+<p>The graphs themselves can be modified, without affecting the global structure of the <code>ADEgS</code> object. Here, we replace the correlation circle by the barplot of eigenvalues:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g7[[<span class="dv">3</span>]] <-<span class="st"> </span>g1
+g7</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAIAAAArpSLoAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOydeXxM5/7Hv2f2JXsiCyGRREKk9q2qaotSRWntXLVcGkXVj9putW710uLq7aJUtKiQRFC1FLEGSUMQSxJEQmQhkWWSzGQyy5nz++MwxixnzuwzyfN+9XWveeac53xnzpxPnuf7PN/vFyMIAhAIBMIRMBxtAAKBaL4gAUIgEA4DCRACgXAYSIAQCITDQAKEQCAcBhIgBALhMJAAIRAIh4EECIFAOAwkQAgEwmEgAUIgEA4DCRACgXAYSIAQCITDQAKEQCAcBhIgBALhMJAAIRAIh4EECIFAOAwkQMb5/fffx4wZ42grbEVubm737t0dbYUNadu2raNNsCHdu3fPzc11tBXmgwTIONeuXbt+/bqjrbAV+fn5O [...]
+<p>The <code>addhist</code> method adds univariate marginal distributions around an <code>ADEg.S2</code> and returns an <code>ADEgS</code> object:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">addhist</span>(g3)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAMAAACTGUWNAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZ [...]
+<p>More examples are available in the help page by typing <code>example(superpose)</code>, <code>example(insert)</code>, <code>example(add.ADEg)</code> and <code>example(addhist)</code> in the R session.</p>
+</div>
+<div id="the-adegs-function" class="section level3">
+<h3><span class="header-section-number">3.2.2</span> The <code>ADEgS</code> function</h3>
+<p>The <code>ADEgS</code> function provides the most elementary and flexible way to create an <code>ADEgS</code> object. The different arguments of the function are:</p>
+<ul>
+<li><p><code>adeglist</code>: a list of several <code>trellis</code>, <code>ADEg</code> and/or <code>ADEgS</code> objects.</p></li>
+<li><p><code>positions</code>: a matrix with four columns and as many rows as the number of graphical objects in the <code>ADEglist</code> slot. For each subgraph, i.e. in each row, the coordinates of the top-right and the bottom-left hand corners are given in <code>npc</code> units (i.e., normalized parent coordinates varying from 0 to 1).</p></li>
+<li><p><code>layout</code>: an alternative way to specify the positions of graphs. It could be a vector of length 2 indicating the number of rows and columns used to split the device (similar to <code>mfrow</code> parameter in basic graphs). It could also be a matrix specifying the location of the graphs: each value in this matrix should be 0 or a positive integer (similar to <code>layout</code> function for basic graphs).</p></li>
+<li><p><code>add</code>: a square matrix with as many rows and columns as the number of graphical objects in the <code>ADEglist</code> slot. The value at the i-th row and j-th column is equal to 1 if the j-th graphical object is superposed to i-th one. Otherwise, this value is equal to 0.</p></li>
+<li><p><code>plot</code>: a logical value indicating if the graphs should be displayed.</p></li>
+</ul>
+<p>When users fill only one argument among <code>positions</code>, <code>layout</code> and <code>add</code>, the other values are automatically computed to define the <code>ADEgS</code> object.</p>
+<p>We illustrate the different possibilities to create objects with the <code>ADEgS</code> function. Simple juxtaposition using a vector as layout:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">ADEgS</span>(<span class="dt">adeglist =</span> <span class="kw">list</span>(g2, g3), <span class="dt">layout =</span> <span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">2</span>))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAEgCAMAAABrWDzDAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZ [...]
+<p>Layout specified as a matrix:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">mlay <-<span class="st"> </span><span class="kw">matrix</span>(<span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">1</span>, <span class="dv">0</span>, <span class="dv">1</span>, <span class="dv">1</span>, <span class="dv">0</span>, <span class="dv">0</span>, <span class="dv">0</span>, <span class="dv">2</span>), <span class="dt">byrow =</span> T, <span class="dt">nrow =</span> <span class=" [...]
+mlay</code></pre></div>
+<pre><code>##      [,1] [,2] [,3]
+## [1,]    1    1    0
+## [2,]    1    1    0
+## [3,]    0    0    2</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">ADEgS</span>(<span class="dt">adeglist =</span> <span class="kw">list</span>(g6, g2), <span class="dt">layout =</span> mlay)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAIAAADytinCAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOydd1xUV/r/nzv1TqP3oggoil2jISr2GkuMZTfRFGsM2WTXjfmqMfmubiwx8bsbNT93TaKJMTGiCNbEghUFVBCwgBRRUBGQOgMDU+/9/XF1HGbuzNxpMMB5v/xj5s65554ZL5955jlPwUiSBAQCgUC4Hqy2XgACgUAg6EECjUAgEC4KEmgEAoFwUZBAIxAIhIuCBBqBQCBcFCTQCAQC4aIggUYgEAgXBQk0AoFAuChIoBEIBMJFQQKNQCAQLgoSaAQCgXBRkEAjEAiEi4IEGoFAIFwUJNAIBALhoiCBRiAQCBel8wr0V1999fPPP7f1KqwjISFh3bp1bb0K68jOzl6yZElbr8I6amtrX3/99bZeBQLRiQX60 [...]
+<p>Using the matrix of positions offers a very flexible way to arrange the different graphs:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">mpos <-<span class="st"> </span><span class="kw">rbind</span>(<span class="kw">c</span>(<span class="dv">0</span>, <span class="fl">0.3</span>, <span class="fl">0.7</span>, <span class="dv">1</span>), <span class="kw">c</span>(<span class="fl">0.5</span>, <span class="dv">0</span>, <span class="dv">1</span>, <span class="fl">0.5</span>))
+<span class="kw">ADEgS</span>(<span class="dt">adeglist =</span> <span class="kw">list</span>(g3, g5), <span class="dt">positions =</span> mpos)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAIAAADytinCAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdeVgT1/o48DPZFwKETQVUZJGCWlcUd9zxK1KLuNe9FbnV3lbbwsXbgrv+vLXa3tal1mvtolVQwFoVd2RRgygqoAKCAgLKDmHLMr8/xqaRhECGLBPyfp4+fZLJmTlvEnnn5MyZczCZTHbv3j0cxxEAoOvCMGzQoEE0Gs3YgQAtMO7cuTNhwoS33nrL2JGQ19LSQqPRGAyGsQPRo+rqarFY7OTkZOxA9AjH8ebmZg6HY+xA9KuxsZHD4WAYZuB6Hz16dOXKleHDhxu4XtAZDJlMNmDAgNTUVGNHQt6TJ0/4fH7XTl7ffvvt5cuXY2NjjR2IHjU2NmZkZPj6+ho7EP1KTk728fFhsVgGrnfUqFEymczAlYJOg [...]
+<p>Lastly, superposition can also be specified using the <code>add</code> argument:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">ADEgS</span>(<span class="kw">list</span>(g5, g3), <span class="dt">add =</span> <span class="kw">matrix</span>(<span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">1</span>, <span class="dv">0</span>, <span class="dv">0</span>), <span class="dt">byrow =</span> <span class="ot">TRUE</span>, <span class="dt">ncol =</span> <span class="dv">2</span>))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAIAAAArpSLoAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOydeXxM5/7Hv2f2JctkkU0qkYQQoa2tqqr2UkVp7Vy1XBotV3up4t72+lXLrajeLkqFokIisdVSpbYgiqhYsiEhspDIMkkmmcxyzvn9cRiTWc6cmTmzJHner77ulWfOec4zc+Z85vt8n+f7/WIkSQICgUC4Ao6rB4BAIFovSIAQCITLQAKEQCBcBhIgBALhMpAAIRAIl4EECIFAuAwkQAgEwmUgAUIgEC4DCRACgXAZSIAQCITLQAKEQCBcBhIgBALhMpAAIRAIl4EECIFAuAwkQAgEwmUgAUIgEC4DCZBlfvnll7Fjx7p6FI4iOzu7R48erh6FA2nfvr2rh+BAevTokZ2d7epR2A4SIMtcvXr1r7/+cvUoH [...]
+<p>More examples are available in the help page by typing <code>example(ADEgS)</code> in the R session.</p>
+</div>
+</div>
+<div id="automatic-collections" class="section level2">
+<h2><span class="header-section-number">3.3</span> Automatic collections</h2>
+<p>The package <code>adegraphics</code> contains functionalities to create collections of graphs. These collections are based on a simple graph repeated for different groups of individuals, variables or axes. The building process of these collections is quite simple (definition of arguments in the call of a user function) and leads to the creation of an <code>ADEgS</code> object.</p>
+<p><a name="facets"></a></p>
+<div id="partitioning-the-data-facets" class="section level3">
+<h3><span class="header-section-number">3.3.1</span> Partitioning the data (<code>facets</code>)</h3>
+<p>The <code>adegraphics</code> package allows to split up the data by one variable (<code>factor</code>) and to plot the subsets of data together. This possibility of conditional plot is available for all user functions (except the <code>table.*</code> functions) by setting the <code>facets</code> argument. This is directly inspired by the functionalities offered in the <code>lattice</code> and <code>ggplot2</code> packages.</p>
+<p>Let us consider the <code>jv73</code> data set. The table <code>jv73$morpho</code> contains the measures of 6 variables describing the geomorphology of 92 sites. A PCA can be performed on this data set:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">data</span>(jv73)
+pca2 <-<span class="st"> </span><span class="kw">dudi.pca</span>(jv73$morpho, <span class="dt">scannf =</span> <span class="ot">FALSE</span>)
+<span class="kw">s.label</span>(pca2$li)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAMAAACTGUWNAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZ [...]
+<p>The sites are located on 12 rivers (<code>jv73$fac.riv</code>) and it is possible to represent the PCA scores for each river using the <code>facets</code> argument:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g8 <-<span class="st"> </span><span class="kw">s.label</span>(pca2$li, <span class="dt">facets =</span> jv73$fac.riv)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAHzCAMAAADIEF8zAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZ [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">length</span>(g8)</code></pre></div>
+<pre><code>## [1] 12</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">names</span>(g8)</code></pre></div>
+<pre><code>##  [1] "Allaine"   "Audeux"    "Clauge"    "Cuisance"  "Cusancin" 
+##  [6] "Dessoubre" "Doubs"     "Doulonnes" "Drugeon"   "Furieuse" 
+## [11] "Lison"     "Loue"</code></pre>
+<p>The <code>ADEgS</code> returned object contains the 12 plots. It is then possible to focus on a given river (e.g., the Doubs river) by considering only a subplot (e.g., type <code>g8$Doubs</code>). The <code>facets</code> functionality is very general and available for the majority of <code>adegraphics</code> functions. For instance, with the <code>s.class</code> function:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">s.class</span>(pca2$li, <span class="dt">fac =</span> jv73$fac.riv, <span class="dt">col =</span> <span class="kw">rainbow</span>(<span class="dv">12</span>), <span class="dt">facets =</span> jv73$fac.riv)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAHzCAIAAABwrDhWAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdd3xUVfr48c+UZCYJKZACyUBIA0KRUBK6NOkqoBQBXcTGCpbVdXUtqL9d98vX78LqYlsXXbvCqigCIgsoSyiKgkDoEALppJBCkskkU+7vjyEhCUlIQjKTTJ73Ky9ed+49c8+5PDPzzNx77jmqDz744NtvvwVKSkq8vLxwOGfVe+zYsaioKJ1O5+B6TSaTm5ubRqNxcL1lZWVqtbpbt26vvfYa8OGHH0rcHUnibidxdwyJu107j7tq3rx5Xbp0GTp06JkzZ6Kjox3cGuDEiRO9evVSq9UOrveRRx557LHHIiMjHVxvcnJyp06dvL29HVxvZmamm5vbI488YrFYgPnz50vcHUnibidxdwyJu107jzvz5s1bs [...]
+</div>
+<div id="multiple-axes" class="section level3">
+<h3><span class="header-section-number">3.3.2</span> Multiple axes</h3>
+<p>All 2-D functions (i.e. <code>s.*</code>) returning an object inheriting from the <code>ADEg.S2</code> class have the <code>xax</code> et <code>yax</code> arguments. These arguments allow to choose which column of the main argument (i.e. <code>df</code>) should be plotted as x and y axes. As in <code>ade4</code>, these two arguments can be simple integers. In <code>adegraphics</code>, the user can also specify vectors as <code>xax</code> and/or <code>yax</code> arguments to obtain mul [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">pca1 <-<span class="st"> </span><span class="kw">dudi.pca</span>(olympic$tab, <span class="dt">scannf =</span> <span class="ot">FALSE</span>, <span class="dt">nf =</span> <span class="dv">4</span>)
+g9 <-<span class="st"> </span><span class="kw">s.corcircle</span>(pca1$co, <span class="dt">xax =</span> <span class="dv">1</span>:<span class="dv">2</span>, <span class="dt">yax =</span> <span class="dv">3</span>:<span class="dv">4</span>)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAJACAMAAABSRCkEAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZ [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">length</span>(g9)</code></pre></div>
+<pre><code>## [1] 4</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">names</span>(g9)</code></pre></div>
+<pre><code>## [1] "x1y3" "x2y3" "x1y4" "x2y4"</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g9 at positions</code></pre></div>
+<pre><code>##      [,1] [,2] [,3] [,4]
+## [1,]  0.0  0.5  0.5  1.0
+## [2,]  0.5  0.5  1.0  1.0
+## [3,]  0.0  0.0  0.5  0.5
+## [4,]  0.5  0.0  1.0  0.5</code></pre>
+</div>
+<div id="multiple-score" class="section level3">
+<h3><span class="header-section-number">3.3.3</span> Multiple score</h3>
+<p>All 1-D functions (i.e. <code>s1d.*</code>) returning an object inheriting from the <code>ADEg.C1</code> or <code>ADEg.S1</code> classes have the <code>score</code> argument. Usually, this argument should be a numeric vector but it is also possible to consider an object with several columns (<code>data.frame</code> or <code>matrix</code>). In this case, an <code>ADEgS</code> object is returned in which one graph by column is created. For instance for the <code>olympic</code> data set, [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">dim</span>(pca1$li)</code></pre></div>
+<pre><code>## [1] 33  4</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">s1d.boxplot</span>(pca1$li, fac.score, <span class="dt">col =</span> <span class="kw">c</span>(<span class="st">"red"</span>, <span class="st">"blue"</span>), 
+  <span class="dt">psub =</span> <span class="kw">list</span>(<span class="dt">position =</span> <span class="st">"topleft"</span>, <span class="dt">cex =</span> <span class="dv">2</span>))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAJACAIAAADq+E5hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdeWATZf4/8M8kadL7pqUtPTgK1AItqFBbSrmUxZPD28UDXFDk64rCioq6q4iwy1q+PxERFHc5XEAWrIiAX5CChXIuUOVqoVBaerfpkTR35vdHuqX0SJp0kunTvl//0M488zyfCXnyTibTGe7atWvbtm3jeZ4AQDgSieSxxx4jIswvAMFZ5pcsIyPj22+/nTBhgtj1tEGlUhmNRn9/f7ELEcDGjRvd3d0tr2isq66udnd39/T0FLsQAVRUVPj6+ioUCsF7PnDggFwuJyIXzy+z2VxSUhIREeGyEZ1h1apVw4cPT0lJEbsQxzU0NGi12sDAQLEL6ZSioqI+ffqIXUUbLPOLS09PLygoSE9PF7ueNhQVFWk0m [...]
+</div>
+<div id="multiple-variable" class="section level3">
+<h3><span class="header-section-number">3.3.4</span> Multiple variable</h3>
+<p>Some user functions (<code>s1d.density</code>, <code>s1d.gauss</code>, <code>s1d.boxplot</code>, <code>s1d.class</code>, <code>s.class</code>, <code>s.image</code>, <code>s.traject</code>, <code>s.value</code>, <code>triangle.class</code>) have an argument named <code>fac</code> or <code>z</code>. This argument can have several columns (<code>data.frame</code> or <code>matrix</code>) so that each column is used to create a separate graph. For instance, we can represent the distributio [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">s.value</span>(pca2$li, pca2$tab, <span class="dt">symbol =</span> <span class="st">"circle"</span>)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAGACAMAAAByRC0tAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZ [...]
+</div>
+<div id="outputs-of-the-ade4-package" class="section level3">
+<h3><span class="header-section-number">3.3.5</span> Outputs of the <code>ade4</code> package</h3>
+<p>Lastly, we reimplemented all the graphical functions of the <code>ade4</code> package designed to represent the outputs of a multivariate analysis. The functions <code>ade4::plot.*</code>, <code>ade4::kplot.*</code>, <code>ade4::scatter.*</code> and <code>ade4::score.*</code> return <code>ADEgS</code> objects. It is now very easy to represent or modify these graphical outputs:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">data</span>(meaudret)
+pca3 <-<span class="st"> </span><span class="kw">dudi.pca</span>(meaudret$env, <span class="dt">scannf =</span> <span class="ot">FALSE</span>)
+pca4 <-<span class="st"> </span><span class="kw">dudi.pca</span>(meaudret$spe, <span class="dt">scale =</span> <span class="ot">FALSE</span>, <span class="dt">scannf =</span> <span class="ot">FALSE</span>)
+coi1 <-<span class="st"> </span><span class="kw">coinertia</span>(pca3, pca4, <span class="dt">scannf =</span> <span class="ot">FALSE</span>, <span class="dt">nf =</span> <span class="dv">3</span>)
+g10 <-<span class="st"> </span><span class="kw">plot</span>(coi1)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAJACAMAAABSRCkEAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZ [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">class</span>(g10)</code></pre></div>
+<pre><code>## [1] "ADEgS"
+## attr(,"package")
+## [1] "adegraphics"</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">names</span>(g10)</code></pre></div>
+<pre><code>## [1] "Xax"       "Yax"       "eig"       "XYmatch"   "Yloadings" "Xloadings"</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g10 at Call</code></pre></div>
+<pre><code>## plot.coinertia(x = coi1)</code></pre>
+<p><a name="update"></a></p>
+</div>
+</div>
+</div>
+<div id="customizing-a-graph" class="section level1">
+<h1><span class="header-section-number">4</span> Customizing a graph</h1>
+<p>Compared to the <code>ade4</code> package, the main advantage of <code>adegraphics</code> concerns the numerous possibilities to customize a graph using several graphical parameters. These parameters are stored in slots <code>trellis.par</code>, <code>adeg.par</code> and <code>g.args</code> (see the <a href="#slots">Slots and Methods</a> section) of an <code>ADEg</code> object. These parameters can be defined during the creation of a graph or updated <em>a posteriori</em> (using the < [...]
+<p><a name="trellispar"></a></p>
+<div id="parameters-in-trellis.par" class="section level2">
+<h2><span class="header-section-number">4.1</span> Parameters in <code>trellis.par</code></h2>
+<p>The <code>trellis.par</code> slot is a list of parameters that are directly included in the call of functions of the <code>lattice</code> package. The name of parameters and their default value are given by the <code>trellis.par.get</code> function of <code>lattice</code>.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(lattice)
+<span class="kw">sort</span>(<span class="kw">names</span>(<span class="kw">trellis.par.get</span>()))</code></pre></div>
+<pre><code>##  [1] "add.line"          "add.text"          "as.table"         
+##  [4] "axis.components"   "axis.line"         "axis.text"        
+##  [7] "background"        "box.3d"            "box.dot"          
+## [10] "box.rectangle"     "box.umbrella"      "clip"             
+## [13] "dot.line"          "dot.symbol"        "fontsize"         
+## [16] "grid.pars"         "layout.heights"    "layout.widths"    
+## [19] "panel.background"  "par.main.text"     "par.sub.text"     
+## [22] "par.xlab.text"     "par.ylab.text"     "par.zlab.text"    
+## [25] "plot.line"         "plot.polygon"      "plot.symbol"      
+## [28] "reference.line"    "regions"           "shade.colors"     
+## [31] "strip.background"  "strip.border"      "strip.shingle"    
+## [34] "superpose.line"    "superpose.polygon" "superpose.symbol"</code></pre>
+<p>Hence, modifications of some of these parameters will modify the graphical display of an <code>ADEg</code> object. For instance, margins are defined using <code>layout.widths</code> and <code>layout.heights</code> parameters, <code>clip</code> parameter allows to overpass panel boundaries and <code>axis.line</code> and <code>axis.text</code> allow to customize lines and text of axes.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">d <-<span class="st"> </span><span class="kw">scale</span>(olympic$tab)
+g11 <-<span class="st"> </span><span class="kw">table.image</span>(d, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g12 <-<span class="st"> </span><span class="kw">table.image</span>(d, <span class="dt">axis.line =</span> <span class="kw">list</span>(<span class="dt">col =</span> <span class="st">"blue"</span>), <span class="dt">axis.text =</span> <span class="kw">list</span>(<span class="dt">col =</span> <span class="st">"red"</span>), 
+  <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+<span class="kw">ADEgS</span>(<span class="kw">c</span>(g11, g12), <span class="dt">layout =</span> <span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">2</span>))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAFQCAIAAADvJFsWAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzde1gU59k/8O/OwrIgHiCIICEqgvBzQWW1kChgPBSFKNiCBqxEq69Rwfe62hiT6hut2vR9Y03SKmqtMYZgGmwEUUATE40iHkFEmoAEQYuYC5STkdMue5jfH6sEWW2ZnSE7u3t/rvyB6DzcjHxzO7tzzyNhWRaEEEIIsS6MuQsghBBCiPCowRNCCCFWiBo8IYQQYoWowRNCCCFWiBo8IYQQYoWowRNCCCFWiBo8IYQQYoWowRNCCCFWiBo8IYQQYoWowRNCCCFWiBo8IYQQYoWowRNCCCFWiBo8IYQQYoWowRNCCCFWiBo8IYQQYoWowRNCCCFWiBo8IYQQYoWowRNCCCFWiBo8IYQQYoWowRNCCCFWiBo8I [...]
+<p><a name="adegpar"></a></p>
+</div>
+<div id="parameters-in-adeg.par" class="section level2">
+<h2><span class="header-section-number">4.2</span> Parameters in <code>adeg.par</code></h2>
+<p>The <code>adeg.par</code> slot is a list of graphical parameters specific to the <code>adegraphics</code> package. The name of parameters and their default value are available using the <code>adegpar</code> function which is inspired by the <code>par</code> function of the <code>graphics</code> package.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">names</span>(<span class="kw">adegpar</span>())</code></pre></div>
+<pre><code>##  [1] "p1d"         "parrows"     "paxes"       "pbackground" "pellipses"  
+##  [6] "pgrid"       "plabels"     "plegend"     "plines"      "pnb"        
+## [11] "porigin"     "ppalette"    "ppoints"     "ppolygons"   "pSp"        
+## [16] "psub"        "ptable"</code></pre>
+<p>A description of these parameters is available in the help page of the function (<code>?adegpar</code>). Note that each <code>adeg.par</code> parameter starts by the letter ’p’ and its name relates to the type of graphical element considered (<code>ptable</code> is for tables display, <code>ppoints</code> for points, <code>parrows</code> for arrows, etc). Each element of this list can contain one or more sublists. Details on a sublist are obtained using its name either as a parameter  [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">adegpar</span>(<span class="st">"ppoints"</span>)</code></pre></div>
+<pre><code>## $ppoints
+## $ppoints$alpha
+## [1] 1
+## 
+## $ppoints$cex
+## [1] 1
+## 
+## $ppoints$col
+## [1] "black"
+## 
+## $ppoints$pch
+## [1] 20
+## 
+## $ppoints$fill
+## [1] "black"</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">adegpar</span>()$ppoints</code></pre></div>
+<pre><code>## $alpha
+## [1] 1
+## 
+## $cex
+## [1] 1
+## 
+## $col
+## [1] "black"
+## 
+## $pch
+## [1] 20
+## 
+## $fill
+## [1] "black"</code></pre>
+<p>The full list of available parameters is summarized in <a href="#paramVSparam">Figure 3</a>.</p>
+<br>
+<div style="text-align:center">
+<p><a name="paramVSparam"></a> <span style="color:blue">Figure 3: Parameters that can be set with the <code>adegpar</code> function.</span> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAKgCAMAAABz4j/3AAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFC [...]
+</div>
+<p><br></p>
+<p>The ordinate represents the different sublists and the abscissa gives the name of the parameters available in each sublist. Note that some row names have two keys separated by a dot: the first key indicates the first level of the sublist, etc. For example <code>plabels.boxes</code> is the sublist <code>boxes</code> of the sublist <code>plabels</code>. The parameters <code>border</code>,<code>col</code>, <code>alpha</code>, <code>lwd</code>, <code>lty</code> and <code>draw</code> in <c [...]
+<p>According to the function called, only some of the full list of <code>adeg.par</code> parameters are useful to modify the graphical display. <a href="#paramVSfunction">Figure 4</a> indicates which parameters can affect the display of an object created by a given user function. For example, the background (<code>pbackground</code> parameter) can be modified for all functions whereas the display of ellipses (<code>pellipses</code> parameter) affects only three functions.</p>
+<br>
+<div style="text-align:center">
+<p><a name="paramVSfunction"></a> <span style="color:blue">Figure 4: Effect of <code>adeg.par</code> parameters in <code>adegraphics</code> functions.</span> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAPACAMAAADdYTsZAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT [...]
+</div>
+<p><br></p>
+<div id="global-assignment" class="section level3">
+<h3><span class="header-section-number">4.2.1</span> Global assignment</h3>
+<p>The <code>adegpar</code> function allows to modify globally the values of graphical parameters so that changes will affect all subsequent displays. For example, we update the size/color of labels and add axes to a plot:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">oldadegpar <-<span class="st"> </span><span class="kw">adegpar</span>()
+<span class="kw">adegpar</span>(<span class="st">"plabels"</span>)</code></pre></div>
+<pre><code>## $plabels
+## $plabels$alpha
+## [1] 1
+## 
+## $plabels$cex
+## [1] 1
+## 
+## $plabels$col
+## [1] "black"
+## 
+## $plabels$srt
+## [1] "horizontal"
+## 
+## $plabels$optim
+## [1] FALSE
+## 
+## $plabels$boxes
+## $plabels$boxes$alpha
+## [1] 1
+## 
+## $plabels$boxes$border
+## [1] "black"
+## 
+## $plabels$boxes$col
+## [1] "white"
+## 
+## $plabels$boxes$draw
+## [1] TRUE
+## 
+## $plabels$boxes$lwd
+## [1] 1
+## 
+## $plabels$boxes$lty
+## [1] 1</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g13 <-<span class="st"> </span><span class="kw">s.label</span>(<span class="dt">dfxy =</span> pca1$li, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+<span class="kw">adegpar</span>(<span class="dt">plabels =</span> <span class="kw">list</span>(<span class="dt">col =</span> <span class="st">"blue"</span>, <span class="dt">cex =</span> <span class="fl">1.5</span>), <span class="dt">paxes.draw =</span> <span class="ot">TRUE</span>)
+<span class="kw">adegpar</span>(<span class="st">"plabels"</span>)</code></pre></div>
+<pre><code>## $plabels
+## $plabels$alpha
+## [1] 1
+## 
+## $plabels$cex
+## [1] 1.5
+## 
+## $plabels$col
+## [1] "blue"
+## 
+## $plabels$srt
+## [1] "horizontal"
+## 
+## $plabels$optim
+## [1] FALSE
+## 
+## $plabels$boxes
+## $plabels$boxes$alpha
+## [1] 1
+## 
+## $plabels$boxes$border
+## [1] "black"
+## 
+## $plabels$boxes$col
+## [1] "white"
+## 
+## $plabels$boxes$draw
+## [1] TRUE
+## 
+## $plabels$boxes$lwd
+## [1] 1
+## 
+## $plabels$boxes$lty
+## [1] 1</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g14 <-<span class="st"> </span><span class="kw">s.label</span>(<span class="dt">dfxy =</span> pca1$li, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+<span class="kw">ADEgS</span>(<span class="kw">c</span>(g13, g14), <span class="dt">layout =</span> <span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">2</span>))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAEgCAIAAADT5FumAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdd1xT5/cH8E8YYYuo4KhbEBfOalVEqRP3wqq1uKhVrFpXhcpPwY3aqtj6rXtbrQgqblyoOBBwg1BKizIEERmyIcnvj0tjTEIWN4SE8371j+TmjkPa5tzxPOdwBAIBCCGEEG2jp+kACCGEEFVQAiOEEKKVKIERQgjRSgbR0dEODg70JIyQyujTp8+dO3c0HQUhNYvehw8fvvjiC0E1VlBQcP/+fU1Hobrff/992LBhmo5CdfHx8a9fv9Z0FKqLiorKzs5W6yGePn2am5ur6f+XCalx6BYiIYQQrUQJjBBCiFaiBEYIIUQrUQIjhBCilSiBER00cODAU6dOMa+7du1qaWmpyFa3b9/u3r27qampvb394cOH1 [...]
+<p>As the <code>adegpar</code> function can accept numerous graphical parameters, it can be used to define some graphical themes. The next releases of <code>adegraphics</code> will offer functionalities to easily create, edit and store graphical themes. Here, we reassign the original default parameters:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">adegpar</span>(oldadegpar)</code></pre></div>
+</div>
+<div id="local-assignment" class="section level3">
+<h3><span class="header-section-number">4.2.2</span> Local assignment</h3>
+<p>A second option is to update the graphical parameters locally so that the changes will only modify the object created. This is done using the dots (<code>...</code>) argument in the call to a user function. In this case, the default values of parameters in the global environment are not modified:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">adegpar</span>(<span class="st">"ppoints"</span>)</code></pre></div>
+<pre><code>## $ppoints
+## $ppoints$alpha
+## [1] 1
+## 
+## $ppoints$cex
+## [1] 1
+## 
+## $ppoints$col
+## [1] "black"
+## 
+## $ppoints$pch
+## [1] 20
+## 
+## $ppoints$fill
+## [1] "black"</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">s.label</span>(<span class="dt">dfxy =</span> pca1$li, <span class="dt">plabels.cex =</span> <span class="dv">0</span>, <span class="dt">ppoints =</span> <span class="kw">list</span>(<span class="dt">col =</span> <span class="kw">c</span>(<span class="dv">2</span>, <span class="dv">4</span>, <span class="dv">5</span>), <span class="dt">cex =</span> <span class="fl">1.5</span>, <span class="dt">p [...]
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAMAAACTGUWNAAABqlBMVEUAAAAAAP8A//8BAQEDAwMEBAQGBgYHBwcJCQkKCgoNDQ0PDw8QEBARERETExMWFhYZGRkbGxscHBwdHR0eHh4fHx8hISEiIiImJiYnJycpKSksLCw5OTk7Ozs8PDxAQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhLS0tSUlJTU1NUVFRaWlpfX19gYGBiYmJjY2NkZGRlZWVoaGhpaWlra2tsbGxtbW1ubm5vb29wcHBycnJzc3N0dHR1dXV3d3d5eXl7e3t9fX1+fn5/f3+BgYGDg4OFhYWHh4eIiIiLi4uNjY2Ojo6Pj4+RkZGTk5OVlZWXl5eampqbm5ufn5+hoaGmpqaqqqqrq6usrKyurq6wsLC1tbW9vb2+vr6/v7/AwMDBwcHCwsLDw8PEx [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">adegpar</span>(<span class="st">"ppoints"</span>)</code></pre></div>
+<pre><code>## $ppoints
+## $ppoints$alpha
+## [1] 1
+## 
+## $ppoints$cex
+## [1] 1
+## 
+## $ppoints$col
+## [1] "black"
+## 
+## $ppoints$pch
+## [1] 20
+## 
+## $ppoints$fill
+## [1] "black"</code></pre>
+<p>In the previous example, we can see that parameters can be either specified using a ’<code>.</code>’ separator or a list. For instance, using <code>plabels.cex = 0</code> or <code>plabels = list(cex = 0)</code> is strictly equivalent. Moreover, partial names can be used if there is no ambiguity (such as <code>plab.ce = 0</code> in our example).</p>
+<p><a name="gargs"></a></p>
+</div>
+</div>
+<div id="parameters-in-g.args" class="section level2">
+<h2><span class="header-section-number">4.3</span> Parameters in <code>g.args</code></h2>
+<p>The <code>g.args</code> slot is a list of parameters specific to the function used (and thus to the class of the returned object). Several parameters are very general and used in all <code>adegraphics</code> functions:</p>
+<ul>
+<li><p><code>xlim</code>, <code>ylim</code>: limits of the graph on the x and y axes</p></li>
+<li><p><code>main</code>, <code>sub</code>: main title and subtitle</p></li>
+<li><p><code>xlab</code>, <code>ylab</code>: labels of the x and y axes</p></li>
+<li><p><code>scales</code>: a list determining how the x and y axes (tick marks dans labels) are drawn; this is the <code>scales</code> parameter of the <code>xyplot</code> function of <code>lattice</code></p></li>
+</ul>
+<p>The <code>ADEg.S2</code> objects can also contain spatial information (map stored as a <code>Spatial</code> object or neighborhood stored as a <code>nb</code> object):</p>
+<ul>
+<li><p><code>Sp</code>, <code>sp.layout</code>: objects from the <code>sp</code> package to display spatial objects, <code>Sp</code> for maps and <code>sp.layout</code> for spatial widgets as a North arrow, scale, etc.</p></li>
+<li><p><code>nbobject</code>: object of class <code>nb</code> or <code>listw</code> to display neighbor graphs.</p></li>
+</ul>
+<p>When the <code>facets</code> (see the <a href="#facets">Partitioning the data (<code>facets</code>)</a> section) argument is used, users can modify the parameter <code>samelimits</code>: if it is <code>TRUE</code>, all graphs have the same limits whereas limits are computed for each subgraph independently when it is <code>FALSE</code>. For example, considering the <code>jv73</code> data set, each subgraph is computed with its own limits and labels are then more scattered:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">s.label</span>(pca2$li, <span class="dt">facets =</span> jv73$fac.riv, <span class="dt">samelimits =</span> <span class="ot">FALSE</span>)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAHzCAMAAADIEF8zAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZ [...]
+<p>Several other <code>g.args</code> parameters can be updated according to the class of the created object (see <a href="#gargsVSclass">Figure 2</a>).</p>
+</div>
+<div id="parameters-applied-on-a-adegs" class="section level2">
+<h2><span class="header-section-number">4.4</span> Parameters applied on a <code>ADEgS</code></h2>
+<p>Users can either apply the changes to all graphs or to update only one graph. Of an <code>ADEgS</code>, to apply changes on all the graphs contained in an <code>ADEgS</code>, the syntax is similar to the one described for an <code>ADEg</code> object. For example, background color can be changed for all graphs in <code>g10</code> using the <code>pbackground.col</code> parameter.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g15 <-<span class="st"> </span><span class="kw">plot</span>(coi1, <span class="dt">pbackground.col =</span> <span class="st">"steelblue"</span>)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAJACAIAAADq+E5hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdd1xTV/sA8HOzExJIwt57CoLKUkHEBWq1uOt43dZRbR3tW/eo1tHaqq3bOmodOKvSKuIGRBkOEJW9V5iBJCRk3d8f6cuPIjMkuQme76effpKbe899QpAn99xznoOgKAogCIIgSNfgsA4AgiAIgpQBExgEQRCkk2ACgyAIgnQSAesAIN329u1bLy8veCcVgiD1CQoKiouL+3A7TGBQj/B4PAvHPn1m71ZJayMdSbWN8hflUpW0piVoRGRhf8oviUKsA1GxcCdSBV/+uqJXfVgEUd3zYyt9v/od60BUbLQTqYwvT9XND4vHKWiIO97mS7ALEYIgCNJJMIH1Nhs3bnz9+nUHO4hEomnTpoWGhh46dKjVS9evX [...]
+<p>To change the parameters of a given graph, the name of the parameter must be preceded by the name of the subgraph. This supposes that the names of subgraphs are known. For example, to modify only two graphs:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">names</span>(g15)</code></pre></div>
+<pre><code>## [1] "Xax"       "Yax"       "eig"       "XYmatch"   "Yloadings" "Xloadings"</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">plot</span>(coi1, <span class="dt">XYmatch.pbackground.col =</span> <span class="st">"steelblue"</span>,  <span class="dt">XYmatch.pgrid.col =</span> <span class="st">"red"</span>, 
+     <span class="dt">eig.ppolygons.col =</span> <span class="st">"orange"</span>)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAJACAIAAADq+E5hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdd1xT19sA8JMNCQFC2CAbQZSlrAo4EAW1Ii4UsUihuKqts3WDSh11+7q17gEiVsSBiAsQZThQFBAQBGSPQAgJme8faflRQEZIchM8349/JHec+wSVJ/fcc56DEggEAIIgCILkDRrpACAIgiBIFDCBQRAEQXIJJjAIgiBILmGRDgCSb+/fv7e2toZPUiEIkhw3N7fk5OTO22ECg/qFTqfrmg4dGrhTLK0tuXvii5purMsUsbQmI1QYjacOL/H7/TLSgYjZL3FHCrVN7jhORDoQcSJWFL44vsJmyy2kAxGzFTcP5RhYxg+fgHQgoqBXFTcln+xyF+xChCAIguQSTGADzcaNG9+8edPNASwWa/bs2WPHjj1y5 [...]
+</div>
+</div>
+<div id="using-adegraphics-functions-in-your-package" class="section level1">
+<h1><span class="header-section-number">5</span> Using <code>adegraphics</code> functions in your package</h1>
+<p>In this section, we illustrate how <code>adegraphics</code> functionalities can be used to implement graphical functions in your own package. We created an objet of class <code>track</code> that contains a vector of distance and time.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">tra1 <-<span class="st"> </span><span class="kw">list</span>()
+tra1$time <-<span class="st"> </span><span class="kw">runif</span>(<span class="dv">300</span>)
+tra1$distance <-<span class="st"> </span>tra1$time *<span class="st"> </span><span class="dv">5</span> +<span class="st"> </span><span class="kw">rnorm</span>(<span class="dv">300</span>)
+<span class="kw">class</span>(tra1) <-<span class="st"> "track"</span></code></pre></div>
+<p>For an object of the class <code>track</code>, we wish to represent different components of the data:</p>
+<ul>
+<li><p>an histogram of distances</p></li>
+<li><p>an histogram of speeds (i.e., distance / time)</p></li>
+<li><p>a 2D plot representing the distance, the time and the line corresponding to the linear model that predict distance by time</p></li>
+</ul>
+<p>The corresponding multiple plot can be done using <code>adegraphics</code> functions:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g1 <-<span class="st"> </span><span class="kw">s1d.hist</span>(tra1$distance, <span class="dt">psub.text =</span> <span class="st">"distance"</span>, <span class="dt">ppolygons.col =</span> <span class="st">"blue"</span>, 
+               <span class="dt">pgrid.draw =</span> <span class="ot">FALSE</span>, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g2 <-<span class="st"> </span><span class="kw">s1d.hist</span>(tra1$distance /<span class="st"> </span>tra1$time, <span class="dt">psub.text =</span> <span class="st">"speed"</span>, <span class="dt">ppolygons.col =</span> <span class="st">"red"</span>, 
+               <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g31 <-<span class="st"> </span><span class="kw">s.label</span>(<span class="kw">cbind</span>(tra1$time, tra1$distance), <span class="dt">paxes =</span> <span class="kw">list</span>(<span class="dt">aspectratio =</span> <span class="st">"fill"</span>, 
+               <span class="dt">draw =</span> <span class="ot">TRUE</span>), <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g32 <-<span class="st"> </span><span class="kw">xyplot</span>(tra1$distance ~<span class="st"> </span>tra1$time, <span class="dt">aspect =</span> g31 at adeg.par$paxes$aspectratio, 
+              <span class="dt">panel =</span> function(x, y) {<span class="kw">panel.lmline</span>(x, y)})
+g3 <-<span class="st"> </span><span class="kw">superpose</span>(g31, g32)
+G <-<span class="st"> </span><span class="kw">ADEgS</span>(<span class="kw">list</span>(g1, g2, g3))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAADcCAIAAAAgIYQBAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdeSDU2/84/ufYxi5kJxRSSCQVyZJoEy3ai0rp3hYt97anTfu+76muVFqUkmQLEdmypJKt7CJk32Z+f5z35/WbL7KOlJ6Pv8685rzO68zk3ue8zuuc56HduHHj6dOn8MsrLy9PTEw0MDDo6Y6gbsTJybl27Vp9fX3qyM2bN3+Lv882VVVV8fHx0Wi0nu5IlzQ2NgYHB5uZmfV0R7qKwWDU1tby8fF16Kzmf58I/cq4fHx85OTkfv3AGRoaGhQUZGtr29MdQd3I1dU1IiKC9X+gv8vfZ5s+fvzYv39/bm7unu5IlxQUFHh6evaC/wwrKysLCwuVlZU7dFbzv0+EfmVcADBixIhf/7/Y2traq1ev/vr9RF3x6 [...]
+<p>To facilitate the graphical representation of an object of class <code>track</code>, the simplest solution is to design a function <code>plot</code> for this class. We illustrate how to define such function with a particular emphasis on the management of graphical parameters. The function is provided below and we detail the different steps.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">plot.track <-<span class="st"> </span>function(x, <span class="dt">pos =</span> -<span class="dv">1</span>, <span class="dt">storeData =</span> <span class="ot">TRUE</span>, <span class="dt">plot =</span> <span class="ot">TRUE</span>, ...) {
+ 
+ ## step 1 : sort parameters for each graph
+ graphsnames <-<span class="st"> </span><span class="kw">c</span>(<span class="st">"histDist"</span>, <span class="st">"histSpeed"</span>, <span class="st">"regression"</span>)
+ sortparameters <-<span class="st"> </span><span class="kw">sortparamADEgS</span>(..., <span class="dt">graphsnames =</span> graphsnames, 
+                                  <span class="dt">nbsubgraphs =</span> <span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">1</span>, <span class="dv">2</span>))
+ 
+ ## step 2 : define default values for graphical parameters
+ params <-<span class="st"> </span><span class="kw">list</span>()
+ params[[<span class="dv">1</span>]] <-<span class="st"> </span><span class="kw">list</span>(<span class="dt">psub =</span> <span class="kw">list</span>(<span class="dt">text =</span> <span class="st">"distance"</span>), <span class="dt">ppolygons =</span> <span class="kw">list</span>(<span class="dt">col =</span> <span class="st">"blue"</span>), 
+                     <span class="dt">pgrid =</span> <span class="kw">list</span>(<span class="dt">draw =</span> <span class="ot">FALSE</span>))
+ params[[<span class="dv">2</span>]] <-<span class="st"> </span><span class="kw">list</span>(<span class="dt">psub =</span> <span class="kw">list</span>(<span class="dt">text =</span> <span class="st">"speed"</span>), <span class="dt">ppolygons =</span> <span class="kw">list</span>(<span class="dt">col =</span> <span class="st">"red"</span>), 
+                     <span class="dt">pgrid =</span> <span class="kw">list</span>(<span class="dt">draw =</span> <span class="ot">FALSE</span>))
+ params[[<span class="dv">3</span>]] <-<span class="st"> </span><span class="kw">list</span>()
+ params[[<span class="dv">3</span>]]$l1 <-<span class="st"> </span><span class="kw">list</span>(<span class="dt">paxes =</span> <span class="kw">list</span>(<span class="dt">aspectratio =</span> <span class="st">"fill"</span>, <span class="dt">draw =</span> <span class="ot">TRUE</span>))
+ params[[<span class="dv">3</span>]]$l2 <-<span class="st"> </span><span class="kw">list</span>()
+ <span class="kw">names</span>(params) <-<span class="st"> </span>graphsnames
+ sortparameters <-<span class="st"> </span><span class="kw">modifyList</span>(params, sortparameters, <span class="dt">keep.null =</span> <span class="ot">TRUE</span>)
+ 
+ ## step 3 : create each individual plot (ADEg)
+ g1 <-<span class="st"> </span><span class="kw">do.call</span>(<span class="st">"s1d.hist"</span>, <span class="kw">c</span>(<span class="kw">list</span>(<span class="dt">score =</span> <span class="kw">substitute</span>(x$distance), <span class="dt">plot =</span> <span class="ot">FALSE</span>, 
+               <span class="dt">storeData =</span> storeData, <span class="dt">pos =</span> pos -<span class="st"> </span><span class="dv">2</span>), sortparameters[[<span class="dv">1</span>]]))
+ g2 <-<span class="st"> </span><span class="kw">do.call</span>(<span class="st">"s1d.hist"</span>, <span class="kw">c</span>(<span class="kw">list</span>(<span class="dt">score =</span> <span class="kw">substitute</span>(x$distance /<span class="st"> </span>x$time), 
+               <span class="dt">plot =</span> <span class="ot">FALSE</span>, <span class="dt">storeData =</span> storeData, <span class="dt">pos =</span> pos -<span class="st"> </span><span class="dv">2</span>), sortparameters[[<span class="dv">2</span>]]))
+ g31 <-<span class="st"> </span><span class="kw">do.call</span>(<span class="st">"s.label"</span>, <span class="kw">c</span>(<span class="kw">list</span>(<span class="dt">dfxy =</span> <span class="kw">substitute</span>(<span class="kw">cbind</span>(x$time, x$distance)), <span class="dt">plot =</span> 
+               <span class="ot">FALSE</span>, <span class="dt">storeData =</span> storeData, <span class="dt">pos =</span> pos -<span class="st"> </span><span class="dv">2</span>), sortparameters[[<span class="dv">3</span>]][[<span class="dv">1</span>]]))
+ g32 <-<span class="st"> </span><span class="kw">xyplot</span>(x$distance ~<span class="st"> </span>x$time, <span class="dt">aspect =</span> g31 at adeg.par$paxes$aspectratio,
+               <span class="dt">panel =</span> function(x, y) {<span class="kw">panel.lmline</span>(x, y)})
+ g3 <-<span class="st"> </span><span class="kw">do.call</span>(<span class="st">"superpose"</span>, <span class="kw">list</span>(g31, g32))
+ g3 at Call <-<span class="st"> </span><span class="kw">call</span>(<span class="st">"superpose"</span>, g31 at Call, g32$call)
+ 
+ 
+ ## step 4 : create the multiple plot (ADEgS)
+ lay <-<span class="st"> </span><span class="kw">matrix</span>(<span class="dv">1</span>:<span class="dv">3</span>, <span class="dv">1</span>, <span class="dv">3</span>)
+ object <-<span class="st"> </span><span class="kw">new</span>(<span class="dt">Class =</span> <span class="st">"ADEgS"</span>, <span class="dt">ADEglist =</span> <span class="kw">list</span>(g1, g2, g3), <span class="dt">positions =</span> 
+               <span class="kw">layout2position</span>(lay), <span class="dt">add =</span> <span class="kw">matrix</span>(<span class="dv">0</span>, <span class="dt">ncol =</span> <span class="dv">3</span>, <span class="dt">nrow =</span> <span class="dv">3</span>), 
+               <span class="dt">Call =</span> <span class="kw">match.call</span>())
+ <span class="kw">names</span>(object) <-<span class="st"> </span>graphsnames
+ if(plot)
+   <span class="kw">print</span>(object)
+ <span class="kw">invisible</span>(object)
+}</code></pre></div>
+<p>In the first step, the arguments given by the user through the dots (…) argument are managed. A name is given to each subgraph and stored in the vector <code>graphnames</code>. Then, the function <code>sortparamADEgS</code> associates the graphical parameters of the dots (…) argument to each subgraph. If a prefix is specified and matches the name of a graph (e.g., <code>histDist.pbackground.col = grey</code>), the parameter is applied only to the graphic specified (e.g., called <code> [...]
+In the second step, default values for some graphical parameters are modified. The default parameters are stored in a list which has the same structure that the one produced by <code>sortparamADEgS</code> (i.e., names corresponding to those contained in <code>graphsnames</code>). Then, the <code>modifyList</code> function is applied to merge user and defaults values of paramaters (if a parameter is specified by the user and in the default, the value given by the user is used).<br />
+In the third step, each subgraph is created. Here, we create two <code>C1.hist</code> objects and superpose a <code>S2.label</code> object and a <code>trellis</code> one. The functions <code>do.call</code> and <code>substitute</code> are used to provide a pretty call for each subgraph (stored in the <code>Call</code> slot).<br />
+In a final step, the multiple graph is build through the creation of a new <code>ADEgS</code> object and possibly plotted.<br />
+The <code>plot.track</code> function can then be used by:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">plot</span>(tra1)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAADcCAIAAAAgIYQBAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdeSBV2/s4/ueYZQqZCYUUUpKKZMjQQDSoNKmbUjfN9zbPaZ7nmepKpaSUJCREZB5SmcssY8h8zu+P9f7s3/kixJHief21zj5rr73Oyb3P2Wuv9SzarVu3nj17Br+9ysrKxMREXV3dnu4I6kbs7Ozr16/X0dGhjty+ffuP+PvsI5qamkJCQgwNDXu6Iz2j5d8nQr8zDh8fHxkZmd8/cIaEhAQGBtrY2PR0R1A3cnFxCQ8PZ/4f6J/y99lHfP361dPTs8/+Z9jy7xOh3xkHAIwZM+b3/y+2rq7uxo0bv38/UVe8efOm5cE/4u+zj/j8+bOjo2Of/edo9e8Tod8WW093ACGEEEKshwEeIYQQ6oUwwCOEEEK9E [...]
+<p>Graphical parameters can be modified by:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">plot</span>(tra1, <span class="dt">histDist.ppoly.col =</span> <span class="st">"green"</span>, <span class="dt">pbackground.col =</span> <span class="st">"grey"</span>)</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAADcCAIAAAAgIYQBAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdZ0BT1xsw8CcQCCAzYW9QFBARBGQ668JRFcG66sBZravWVdyzLhzVukWo1bqqVhQRRUBBFEFky0amYCDslZD3w/m/983LEmMAgef36eTk3JNzI+2Te+85z6F5e3v7+vrCN6+8vDw2NtbBwaGzB4Lakbi4+Nq1awcPHkzV+Pj4dIm/zx6Cx+M9f/58+PDhnT2QztH07xOhbxndz8+voaHBzMyss0fyGTExMYWFhaampp09ENSO/Pz8wsPDBf8H2lX+PnsIDofz6dOnHvufYdO/T4S+ZXQAMDExGTZsWGeP5DPq6+v9/Py+/XGirxEbG9u0skv8ffYQHz9+PHHiRI/952j27xOhb5ZYZw8AIYQQQqKHAR4hh [...]
+</div>
+<div id="examples" class="section level1">
+<h1><span class="header-section-number">6</span> Examples</h1>
+<div id="labels-customization" class="section level2">
+<h2><span class="header-section-number">6.1</span> Labels customization</h2>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">data</span>(meaudret)
+g16 <-<span class="st"> </span><span class="kw">s.label</span>(pca3$li, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g17 <-<span class="st"> </span><span class="kw">s.label</span>(pca3$li, <span class="dt">ppoints.col=</span> <span class="st">"red"</span>, <span class="dt">plabels =</span> <span class="kw">list</span>(<span class="dt">box =</span> <span class="kw">list</span>(<span class="dt">draw =</span> <span class="ot">FALSE</span>), 
+  <span class="dt">optim =</span> <span class="ot">TRUE</span>), <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+<span class="kw">ADEgS</span>(<span class="kw">c</span>(g16, g17), <span class="dt">layout =</span> <span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">2</span>))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAEgCAIAAADT5FumAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nO3deVxUVf8H8O+ogCCooKAhIuKCooS5AGommgmlIuKKKG6UUlYoJooZtLiVv1xSc89HsXpyScVc0CdRCCRQIZbQBESQRWWVgWGb+f1xdRph9v3C5/16Xk8zd+499yCc+71z7vecwxEIBAQAAMA2bXRdAQAAAGUggAEAACshgAEAADulpaVxOBxd1wKA3V5//XWBOGhfAKqT1L7aPHv2zNXVVexn8uByuTdv3lT6cO2wt7dPTEzUdS2kyc7OzsnJ0XUtpKmqqkpISNB1LWS4efMml8vV/nlTUlIqKyvFNjy0L32A9qUWeti+0IUIAACshAAGAACshAAGAACshAAGAACshAAGLYerq6uJiQkRTZgw4eTJk4oef [...]
+</div>
+<div id="ellipses-stars-and-convex-hulls" class="section level2">
+<h2><span class="header-section-number">6.2</span> Ellipses, stars and convex hulls</h2>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g18 <-<span class="st"> </span><span class="kw">s.class</span>(pca3$li, <span class="dt">fac =</span> meaudret$design$season, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g19 <-<span class="st"> </span><span class="kw">s.class</span>(pca3$li, <span class="dt">fac =</span> meaudret$design$season, <span class="dt">ellipseSize =</span> <span class="dv">0</span>, 
+  <span class="dt">chullSize =</span> <span class="dv">1</span>, <span class="dt">starSize =</span> <span class="fl">0.5</span>, <span class="dt">col =</span> <span class="ot">TRUE</span>, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g20 <-<span class="st"> </span><span class="kw">s.class</span>(pca3$li, <span class="dt">fac =</span> meaudret$design$season, <span class="dt">pellipses.lwd =</span> <span class="dv">2</span>, 
+  <span class="dt">pellipses.border =</span> <span class="dv">2</span>:<span class="dv">5</span>, <span class="dt">pellipses.col =</span> <span class="dv">2</span>:<span class="dv">5</span>, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g21 <-<span class="st"> </span><span class="kw">s.class</span>(pca3$li, <span class="dt">fac =</span> meaudret$design$season, <span class="dt">ellipseSize =</span> <span class="dv">0</span>, 
+  <span class="dt">chullSize =</span> <span class="dv">0</span>, <span class="dt">ppolygons.lwd =</span> <span class="dv">2</span>, <span class="dt">plines.col =</span> <span class="dv">2</span>:<span class="dv">5</span>, <span class="dt">starSize =</span> <span class="fl">1.2</span>, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+<span class="kw">ADEgS</span>(<span class="kw">c</span>(g18, g19, g20, g21), <span class="dt">layout =</span> <span class="kw">c</span>(<span class="dv">2</span>, <span class="dv">2</span>))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAJACAIAAADq+E5hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdeXwTZcIH8CczSSb30ftKmya9D+hBD6BAwXJKFRC8uAQVZFcF0RVZUXlxdxFXXXFZUUSUY5WlokBRFEIppaWllHL0ht5pm15p0tx33j8GYy2l9kqblOf7B59p5sgzLZNf5pnnIFitVgBBEARBzgYZ6wJAEARB0FDAAIMgCIKcEvGXX3558803h7y/xWIxmUxkMnkEyzTiJBIJg8FgMpljXZD+6HQ6CoUy1qXoj9lstlgsJBJprAvSH71eTyKREGQMvpnR6fRTp06x2eyeL8Lry0HA62tEONr1RayoqAgJCXn11VeHdlCFQtHa2hoSEjISJbSXzZs3JycnP/7442NdkPuyWq3FxcXx8fFjXZD+dHZ2qlQqP [...]
+</div>
+<div id="values-and-legend" class="section level2">
+<h2><span class="header-section-number">6.3</span> Values and legend</h2>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">data</span>(rpjdl)
+coa2 <-<span class="st"> </span><span class="kw">dudi.coa</span>(rpjdl$fau, <span class="dt">scannf =</span> <span class="ot">FALSE</span>, <span class="dt">nf =</span> <span class="dv">3</span>)
+g22 <-<span class="st"> </span><span class="kw">s.value</span>(coa2$li, coa2$li[,<span class="dv">3</span>], <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g23 <-<span class="st"> </span><span class="kw">s.value</span>(coa2$li, coa2$li[,<span class="dv">3</span>], <span class="dt">method =</span> <span class="st">"color"</span>, <span class="dt">ppoints.cex =</span> <span class="fl">0.8</span>, 
+  <span class="dt">plegend.size=</span> <span class="fl">0.8</span>, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g24 <-<span class="st"> </span><span class="kw">s.value</span>(coa2$li, coa2$li[,<span class="dv">3</span>], <span class="dt">plegend.size =</span> <span class="fl">0.8</span>, <span class="dt">ppoints.cex =</span> <span class="fl">0.8</span>, 
+  <span class="dt">symbol =</span> <span class="st">"square"</span>, <span class="dt">method =</span> <span class="st">"color"</span>, <span class="dt">key =</span> <span class="kw">list</span>(<span class="dt">columns =</span> <span class="dv">1</span>), 
+  <span class="dt">col =</span> <span class="kw">colorRampPalette</span>(<span class="kw">c</span>(<span class="st">"yellow"</span>, <span class="st">"blue"</span>))(<span class="dv">6</span>), <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g25 <-<span class="st"> </span><span class="kw">s.value</span>(coa2$li, coa2$li[, <span class="dv">3</span>], <span class="dt">center =</span> <span class="dv">0</span>, <span class="dt">method =</span> <span class="st">"size"</span>, <span class="dt">ppoints.cex =</span> <span class="fl">0.6</span>, 
+  <span class="dt">symbol =</span> <span class="st">"circle"</span>, <span class="dt">col =</span> <span class="kw">c</span>(<span class="st">"yellow"</span>, <span class="st">"red"</span>), <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+<span class="kw">ADEgS</span>(<span class="kw">c</span>(g22, g23, g24, g25), <span class="dt">layout =</span> <span class="kw">c</span>(<span class="dv">2</span>, <span class="dv">2</span>))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAJACAIAAADq+E5hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOydd3wU1fr/z8zsbMlu+iaQkIQWgVBE6YiIAqJerjSVixRFUBFR9IrtK16xK6J4EVG4AipSBC6CBaRJEUKvISEhhTRSSNlke5vy++P5Or/5zpZsym52k/P+I6/NtD27s2eec57zPJ+H4HkeYTAYDAYTapCt3QAMBoPBYJoCNmAYDAaDCUlk+/btW7x4cYDf1el0kiRJUVSA3zdgVFRUqNXqiIiI1m6Iv3A4HBRFteE76HA4ZDIZSTZihKdWq3/55ZfIyEjxRty//AHuX6FOS/UvWXZ2do8ePRYtWtTSLfRGcXFxWFhYXFxcIN80kCxatGjIkCH/+Mc/Wrsh/uL69etRUVExMTGt3RB/kZ+fr9Vqo6KifD/lw [...]
+</div>
+<div id="d-plot" class="section level2">
+<h2><span class="header-section-number">6.4</span> 1-D plot</h2>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">score1 <-<span class="st"> </span><span class="kw">c</span>(<span class="kw">rnorm</span>(<span class="dv">1000</span>, <span class="dt">mean =</span> -<span class="fl">0.5</span>, <span class="dt">sd =</span> <span class="fl">0.5</span>), <span class="kw">rnorm</span>(<span class="dv">1000</span>, <span class="dt">mean =</span> <span class="dv">1</span>))
+fac1 <-<span class="st"> </span><span class="kw">rep</span>(<span class="kw">c</span>(<span class="st">"A"</span>, <span class="st">"B"</span>), <span class="dt">each =</span> <span class="dv">1000</span>)
+g26 <-<span class="st"> </span><span class="kw">s1d.density</span>(score1, fac1, <span class="dt">pback.col =</span> <span class="st">"grey75"</span>, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g27 <-<span class="st"> </span><span class="kw">s1d.density</span>(score1, fac1, <span class="dt">col =</span> <span class="kw">c</span>(<span class="dv">2</span>, <span class="dv">4</span>), <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g28 <-<span class="st"> </span><span class="kw">s1d.density</span>(score1, fac1, <span class="dt">col =</span> <span class="kw">c</span>(<span class="dv">2</span>, <span class="dv">4</span>), <span class="dt">p1d.reverse =</span> <span class="ot">TRUE</span>, <span class="dt">p1d.horizontal =</span> <span class="ot">FALSE</span>, 
+  <span class="dt">p1d.rug.draw =</span> <span class="ot">FALSE</span>, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g29 <-<span class="st"> </span><span class="kw">s1d.density</span>(score1, fac1, <span class="dt">col =</span> <span class="kw">c</span>(<span class="dv">2</span>, <span class="dv">4</span>), <span class="dt">ppolygons.alpha =</span> <span class="fl">0.2</span>, 
+  <span class="dt">p1d =</span> <span class="kw">list</span>(<span class="dt">rug =</span> <span class="kw">list</span>(<span class="dt">tck =</span> <span class="dv">1</span>, <span class="dt">line =</span> <span class="ot">FALSE</span>)), <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+<span class="kw">ADEgS</span>(<span class="kw">c</span>(g26, g27, g28, g29), <span class="dt">layout =</span> <span class="kw">c</span>(<span class="dv">2</span>, <span class="dv">2</span>))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAJACAIAAADq+E5hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdeXQc13km/OfeWrt6ARo7QHBfJJIiJXmRHUcaK1ZsJz5xvnhyJjlO4ix2Esc+k/HMSU6+TDJZ9B0n8TgZW8k4thzHdmwpjiTLlmztlGhREilwE/cFC7ES+9KN3teq+/3RIASCIIilu6ur+v0dHR2y0d11SaLw9L313rdYf3//E088IYQAIWQdDMP4zGc+I8vywgcHBgbo/CJk/ZY8v9hDDz309a9//R3veEeJjiqEYIyV6M3t9dprr+VyuZ/92Z+1eyAlYVkW59zuUZREif5oTz/99IULF7Zs2bLwwX/8x3989NFHH3jggaIfrmB8fLyhoWHRWe0OTzzxRDab/Y3f+A27B1J8pmlOTEy0tbXZPZCSmJqa8 [...]
+</div>
+<div id="maps-and-neighbor-graphs" class="section level2">
+<h2><span class="header-section-number">6.5</span> Maps and neighbor graphs</h2>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(Guerry)
+<span class="kw">library</span>(sp)
+<span class="kw">data</span>(gfrance85)
+region.names <-<span class="st"> </span><span class="kw">data.frame</span>(gfrance85)[, <span class="dv">5</span>]
+col.region <-<span class="st"> </span><span class="kw">colors</span>()[<span class="kw">c</span>(<span class="dv">149</span>, <span class="dv">254</span>, <span class="dv">468</span>, <span class="dv">552</span>, <span class="dv">26</span>)]
+g30 <-<span class="st"> </span><span class="kw">s.class</span>(<span class="kw">coordinates</span>(gfrance85), region.names, <span class="dt">porigin.include =</span> <span class="ot">FALSE</span>, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g31 <-<span class="st"> </span><span class="kw">s.class</span>(<span class="kw">coordinates</span>(gfrance85), region.names, <span class="dt">ellipseSize =</span> <span class="dv">0</span>, <span class="dt">starSize =</span> <span class="dv">0</span>, 
+  <span class="dt">Sp =</span> gfrance85, <span class="dt">pgrid.draw =</span> <span class="ot">FALSE</span>, <span class="dt">pSp.col =</span> col.region[region.names], <span class="dt">pSp.alpha =</span> <span class="fl">0.4</span>, 
+  <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+<span class="kw">ADEgS</span>(<span class="kw">c</span>(g30, g31), <span class="dt">layout =</span> <span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">2</span>))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAEgCAIAAADT5FumAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOydd1xT1/vHb/YgZLBCIEAIe+8liAgqOFBBRa2jWqu2au3+ar/t96dt7be1/amtta1ata66cCCoRUREkCkbwx4JK4MRsifJ74/wixjCcNRR7/sPXzf3nnPuSeTc557nPOfzQLRaLQACAgICAvKqAX3RHQABAQEBAXkSQAMGAgICAvJKAhowEBAQEJBXkwcPHkAgkBfdCxCQV5uoqCitMcDxBQLy9Iw1vuAikSgsLKyoqOhF9xCora2lUCgWFhYvuiPGqa6utrOzMzMze9EdMU5VVZWDgwOJRHrRHTFORUWFk5MTgUB40R0xTllZmZubm6mp6ZNVr6mpWbVqldFLL8/4AgF5RRlnfIEuRBAQEBCQVxLQgIGAg [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">s.Spatial</span>(gfrance85[,<span class="dv">7</span>:<span class="dv">12</span>])</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAGACAMAAAByRC0tAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZ [...]
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">data</span>(mafragh, <span class="dt">package =</span> <span class="st">"ade4"</span>)
+g32 <-<span class="st"> </span><span class="kw">s.label</span>(mafragh$xy, <span class="dt">nb =</span> mafragh$nb, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g33 <-<span class="st"> </span><span class="kw">s.label</span>(mafragh$xy, <span class="dt">nb =</span> mafragh$nb, <span class="dt">pnb.ed.col =</span> <span class="st">"red"</span>, <span class="dt">plab.cex =</span> <span class="dv">0</span>, 
+  <span class="dt">pnb.node =</span> <span class="kw">list</span>(<span class="dt">cex =</span> <span class="dv">3</span>, <span class="dt">col =</span> <span class="st">"blue"</span>), <span class="dt">ppoints.col =</span> <span class="st">"green"</span>, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+<span class="kw">ADEgS</span>(<span class="kw">c</span>(g32, g33), <span class="dt">layout =</span> <span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">2</span>))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAEgCAIAAADT5FumAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOydZ1wUSROH/xvISbIoKCCoqCCod5j1VEyoKGJEMYt6onhmDJgT5nTmHFBQwmEAcwJEBUVAlCCISM4ZdnfeD4PDsCwYXk/F6+e3H6Zranp6ere3prurqzkURYFAIBAIhPoG90cXgEAgEAiEr4EYMAKBQCDUS4gBIxAIBEL9JCIigsPh/OhSEAj1m65du1KSIO2LQPj/qa19cQsKCiwtLcWkBQUFISEhEi+oL4SEhBQUFPzoUnw9SUlJb968+dGl+HoqKiru37//o0vxf/Hy5cv09PTP0Xzx4kV+fr7Ehkfa188JaV8/nG/SvsgQIoFAIBDqJcSAEQgEAqFeQgwYgUAgEOolxIARCAQCoV5CDBih3tCnTx9PT [...]
+</div>
+<div id="ternary-plots" class="section level2">
+<h2><span class="header-section-number">6.6</span> Ternary plots</h2>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">data</span>(euro123, <span class="dt">package =</span> <span class="st">"ade4"</span>)
+df <-<span class="st"> </span><span class="kw">rbind.data.frame</span>(euro123$in78, euro123$in86, euro123$in97)
+<span class="kw">row.names</span>(df) <-<span class="st"> </span><span class="kw">paste</span>(<span class="kw">row.names</span>(euro123$in78), <span class="kw">rep</span>(<span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>), <span class="kw">rep</span>(<span class="dv">12</span>, <span class="dv">3</span>)), <span class="dt">sep =</span> <span class="st">""</span>)
+g34 <-<span class="st"> </span><span class="kw">triangle.label</span>(df, <span class="dt">label =</span> <span class="kw">row.names</span>(df), <span class="dt">showposition =</span> <span class="ot">TRUE</span>, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+g35 <-<span class="st"> </span><span class="kw">triangle.label</span>(euro123$in78, <span class="dt">plabels.cex =</span> <span class="dv">0</span>, <span class="dt">ppoints.cex =</span> <span class="dv">2</span>, <span class="dt">addmean =</span> <span class="ot">TRUE</span>, 
+  <span class="dt">show =</span> <span class="ot">FALSE</span>, <span class="dt">plot =</span> <span class="ot">FALSE</span>)
+<span class="kw">ADEgS</span>(<span class="kw">c</span>(g34, g35), <span class="dt">layout =</span> <span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">2</span>))</code></pre></div>
+<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAEgCAMAAABrWDzDAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZ [...]
+<p><a name="appendix"></a></p>
+</div>
+</div>
+<div id="appendix" class="section level1">
+<h1><span class="header-section-number">7</span> Appendix</h1>
+<p>This appendix summarizes the main changes between <code>ade4</code> and <code>adegraphics</code>. Each line corresponds to a graphical argument defined in <code>ade4</code> and its equivalent in <code>adegraphics</code> is given.</p>
+<table style="width:100%;">
+<colgroup>
+<col width="18%"></col>
+<col width="21%"></col>
+<col width="27%"></col>
+<col width="28%"></col>
+<col width="3%"></col>
+</colgroup>
+<thead>
+<tr class="header">
+<th align="left">Arguments in <code>ade4</code></th>
+<th align="left">Functions in <code>ade4</code></th>
+<th align="left"><code>g.args</code> in <code>adegraphics</code></th>
+<th align="left"><code>adeg.par</code> in <code>adegraphics</code></th>
+<th align="left"></th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td align="left"><code>abline.x</code></td>
+<td align="left"><code>table.cont</code></td>
+<td align="left"><code>ablineX</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>abline.y</code></td>
+<td align="left"><code>table.cont</code></td>
+<td align="left"><code>ablineY</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>abmean.x</code></td>
+<td align="left"><code>table.cont</code></td>
+<td align="left"><code>meanX</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>abmean.y</code></td>
+<td align="left"><code>table.cont</code></td>
+<td align="left"><code>meanY</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>addaxes</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.chull</code>, <code>s.class</code>, <code>s.distri</code>, <code>s.image</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.logo</code>, <code>s.match</code>, <code>s.traject</code>, <code>s.value</code>, <code>triangle.class</code>, <code>triangle.plot</code></td>
+<td align="left"></td>
+<td align="left"><code>paxes.draw</code></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>area</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.chull</code>, <code>s.class</code>, <code>s.distri</code>, <code>s.image</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.logo</code>, <code>s.match</code>, <code>s.traject</code>, <code>s.value</code></td>
+<td align="left"><code>Sp</code></td>
+<td align="left"></td>
+<td align="left">a <code>Sp</code> object</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>axesell</code></td>
+<td align="left"><code>s.class</code>, <code>s.distri</code>, <code>triangle.class</code></td>
+<td align="left"></td>
+<td align="left"><code>pellipses.axes.draw</code></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>box</code></td>
+<td align="left"><code>s.corcircle</code>, <code>triangle.plot</code></td>
+<td align="left"></td>
+<td align="left"><code>pbackground.box</code></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>boxes</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.label</code>, <code>sco.class</code>, <code>sco.label</code>, <code>sco.match</code></td>
+<td align="left"></td>
+<td align="left"><code>plabels.boxes.draw</code></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>cellipse</code></td>
+<td align="left"><code>s.class</code>, <code>s.distri</code>, <code>triangle.class</code></td>
+<td align="left"><code>ellipseSize</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>cgrid</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.class</code>, <code>s.chull</code>, <code>s.corcircle</code>, <code>s.distri</code>, <code>s.image</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.logo</code>, <code>s.match</code>, <code>s.traject</code>, <code>s.value</code>, <code>sco.boxplot</code>, <code>sco.class</code>, <code>sco.distri</code>, <code>sco.gauss</code>, <code>sco.label</code>, <code>sco.match</code></td>
+<td align="left"></td>
+<td align="left"><code>pgrid.nint</code></td>
+<td align="left">both play on the grid mesh, but they are not strictly equivalent</td>
+</tr>
+<tr class="even">
+<td align="left"><code>clabel</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.class</code>, <code>s.chull</code>, <code>s.corcircle</code>, <code>s.distri</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.match</code>, <code>s.traject</code>, <code>sco.boxplot</code>, <code>sco.class</code>, <code>sco.distri</code>, <code>sco.gauss</code>, <code>sco.label</code>, <code>sco.match</code>, <code>triangle.plot</code></td>
+<td align="left"></td>
+<td align="left"><code>plabels.cex</code></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>clabel</code></td>
+<td align="left"><code>table.dist</code></td>
+<td align="left"></td>
+<td align="left"></td>
+<td align="left"><code>axis.text = list()</code> <code>lattice</code> parameter</td>
+</tr>
+<tr class="even">
+<td align="left"><code>clabel.col</code></td>
+<td align="left"><code>table.cont</code>, <code>table.paint</code>, <code>table.value</code></td>
+<td align="left"></td>
+<td align="left"></td>
+<td align="left"><code>axis.text = list()</code> <code>lattice</code> parameter</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>clabel.row</code></td>
+<td align="left"><code>table.cont</code>, <code>table.paint</code>, <code>table.value</code></td>
+<td align="left"></td>
+<td align="left"></td>
+<td align="left"><code>axis.text = list()</code> <code>lattice</code> parameter</td>
+</tr>
+<tr class="even">
+<td align="left"><code>clegend</code></td>
+<td align="left"><code>s.value</code>, <code>table.cont</code>, <code>table.value</code></td>
+<td align="left"></td>
+<td align="left"><code>plegend.size</code> <code>ppoints.cex</code></td>
+<td align="left">parameters setting the legend size</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>clegend</code></td>
+<td align="left"><code>table.paint</code></td>
+<td align="left"></td>
+<td align="left"><code>plegend.size</code></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>clogo</code></td>
+<td align="left"><code>s.logo</code></td>
+<td align="left"></td>
+<td align="left"><code>ppoints.cex</code></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>cneig</code></td>
+<td align="left"><code>s.image</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.logo</code>, <code>s.value</code></td>
+<td align="left"></td>
+<td align="left"><code>pnb.edge.lwd</code></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>col.labels</code></td>
+<td align="left"><code>table.cont</code>, <code>table.paint</code>, <code>table.value</code></td>
+<td align="left"><code>labelsy</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>contour</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.class</code>, <code>s.chull</code>, <code>s.distri</code>, <code>s.image</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.logo</code>, <code>s.match</code>, <code>s.traject</code>, <code>s.value</code></td>
+<td align="left"><code>Sp</code></td>
+<td align="left"></td>
+<td align="left">a <code>Sp</code> object</td>
+</tr>
+<tr class="even">
+<td align="left"><code>contour.plot</code></td>
+<td align="left"><code>s.image</code></td>
+<td align="left"><code>region</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>cpoints</code>, <code>cpoint</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.class</code>, <code>s.chull</code>, <code>s.distri</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.match</code>, <code>s.traject</code>, <code>s.value</code>, <code>sco.class</code>, <code>sco.label</code>, <code>sco.match</code>, <code>triangle.class</code>, <code>triangle.plot</code></td>
+<td align="left"></td>
+<td align="left"><code>ppoints.cex</code></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>csize</code></td>
+<td align="left"><code>s.value</code>, <code>table.cont</code>, <code>table.dist</code>, <code>table.paint</code>, <code>table.value</code></td>
+<td align="left"><code>ppoints.cex</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>csize</code></td>
+<td align="left"><code>sco.distri</code></td>
+<td align="left"><code>sdSize</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>cstar</code></td>
+<td align="left"><code>s.class</code>, <code>s.distri</code>, <code>triangle.class</code></td>
+<td align="left"><code>starSize</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>csub</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.chull</code>, <code>s.class</code>, <code>s.corcircle</code>, <code>s.distri</code>, <code>s.image</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.logo</code>, <code>s.match</code>, <code>s.traject</code>, <code>s.value</code>, <code>sco.boxplot</code>, <code>sco.class</code>, <code>sco.distri</code>, <code>sco.gauss</code>, <code>sco.label</code>, <code>sco.match</code>, <code>triangle.class</code>, <code>triangle.plot</code></td>
+<td align="left"></td>
+<td align="left"><code>psub.cex</code></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>draw.line</code></td>
+<td align="left"><code>triangle.biplot</code>, <code>triangle.class</code>, <code>triangle.plot</code></td>
+<td align="left"></td>
+<td align="left"><code>pgrid.draw</code></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>edge</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.match</code>, <code>s.traject</code></td>
+<td align="left"></td>
+<td align="left"><code>parrows.length</code></td>
+<td align="left">setting the length of the arrows to 0 is equivalent to <code>edge = FALSE</code></td>
+</tr>
+<tr class="even">
+<td align="left"><code>grid</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.chull</code>, <code>s.class</code>, <code>s.corcircle</code>, <code>s.distri</code>, <code>s.image</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.logo</code>, <code>s.match</code>, <code>s.traject</code>, <code>s.value</code>, <code>sco.boxplot</code>, <code>sco.class</code>, <code>sco.distri</code>, <code>sco.gauss</code>, <code>sco.label</code>, <code>sco.match</code>, <code>table.cont</code>, <code>table.dist</code>, <code>ta [...]
+<td align="left"></td>
+<td align="left"><code>pgrid.draw</code></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>horizontal</code></td>
+<td align="left"><code>sco.class</code>, <code>sco.gauss</code>, <code>sco.label</code>, <code>sco.match</code></td>
+<td align="left"></td>
+<td align="left"><code>p1d.horizontal</code></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>image.plot</code></td>
+<td align="left"><code>s.image</code></td>
+<td align="left"><code>contour</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>includeorigin</code>, <code>include.origin</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.chull</code>, <code>s.class</code>, <code>s.distri</code>, <code>s.image</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.logo</code>, <code>s.match</code>, <code>s.traject</code>, <code>s.value</code>, <code>sco.boxplot</code>, <code>sco.class</code>, <code>sco.distri</code>, <code>sco.gauss</code>, <code>sco.label</code>, <code>sco.match</code></td>
+<td align="left"></td>
+<td align="left"><code>porigin.include</code></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>kgrid</code></td>
+<td align="left"><code>s.image</code></td>
+<td align="left"><code>gridsize</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>klogo</code></td>
+<td align="left"><code>s.logo</code></td>
+<td align="left"></td>
+<td align="left"></td>
+<td align="left">no correspondence</td>
+</tr>
+<tr class="even">
+<td align="left"><code>labeltriangle</code></td>
+<td align="left"><code>triangle.class</code> , <code>triangle.plot</code></td>
+<td align="left"></td>
+<td align="left"></td>
+<td align="left">no correspondence</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>legen</code></td>
+<td align="left"><code>sco.gauss</code></td>
+<td align="left"><code>labelplot</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>neig</code></td>
+<td align="left"><code>s.image</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.logo</code>, <code>s.value</code></td>
+<td align="left"><code>nbobject</code></td>
+<td align="left"></td>
+<td align="left">a <code>nb</code> object</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>optchull</code></td>
+<td align="left"><code>s.chull</code></td>
+<td align="left"><code>chullSize</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>origin</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.chull</code>, <code>s.class</code>, <code>s.corcircle</code>, <code>s.distri</code>, <code>s.image</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.logo</code>, <code>s.match</code>, <code>s.traject</code>, <code>s.value</code>, <code>sco.boxplot</code>, <code>sco.class</code>, <code>sco.distri</code>, <code>sco.gauss</code>, <code>sco.label</code>, <code>sco.match</code></td>
+<td align="left"></td>
+<td align="left"><code>porigin.origin</code></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>pch</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.chull</code>, <code>s.class</code>, <code>s.distri</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.match</code>, <code>s.traject</code>, <code>s.value</code>, <code>sco.boxplot</code>, <code>sco.class</code>, <code>sco.label</code>, <code>sco.match</code>, <code>triangle.class</code>, <code>triangle.plot</code>, <code>table.cont</code></td>
+<td align="left"></td>
+<td align="left"><code>ppoints.pch</code></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>pixmap</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.chull</code>, <code>s.class</code>, <code>s.distri</code>, <code>s.image</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.logo</code>, <code>s.match</code>, <code>s.traject</code>, <code>s.value</code></td>
+<td align="left"></td>
+<td align="left"></td>
+<td align="left">no correspondence</td>
+</tr>
+<tr class="odd">
+<td align="left"><code>pos.lab</code></td>
+<td align="left"><code>sco.class</code>, <code>sco.label</code>, <code>sco.match</code></td>
+<td align="left"></td>
+<td align="left"><code>p1d.labpos</code></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>possub</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.chull</code>, <code>s.class</code>, <code>s.corcircle</code>, <code>s.distri</code>, <code>s.image</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.logo</code>, <code>s.match</code>, <code>s.traject</code>, <code>s.value</code>, <code>sco.class</code>, <code>sco.gauss</code>, <code>sco.label</code>, <code>sco.match</code>, <code>triangle.class</code>, <code>triangle.plot</code></td>
+<td align="left"></td>
+<td align="left"><code>psub.pos</code></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>rectlogo</code></td>
+<td align="left"><code>s.logo</code></td>
+<td align="left"><code>rect</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>reverse</code></td>
+<td align="left"><code>sco.class</code>, <code>sco.gauss</code>, <code>sco.label</code>, <code>sco.match</code></td>
+<td align="left"></td>
+<td align="left"><code>p1d.reverse</code></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>row.labels</code></td>
+<td align="left"><code>table.cont</code>, <code>table.paint</code>, <code>table.value</code></td>
+<td align="left"><code>labelsx</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>scale</code></td>
+<td align="left"><code>triangle.class</code>, <code>triangle.plot</code></td>
+<td align="left"><code>adjust</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>show.position</code></td>
+<td align="left"><code>triangle.class</code>, <code>triangle.plot</code></td>
+<td align="left"><code>showposition</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>sub</code></td>
+<td align="left"><code>s.arrow</code>, <code>s.chull</code>, <code>s.class</code>, <code>s.corcircle</code>, <code>s.distri</code>, <code>s.image</code>, <code>s.kde2d</code>, <code>s.label</code>, <code>s.logo</code>, <code>s.match</code>, <code>s.traject</code>, <code>s.value</code>, <code>sco.boxplot</code>, <code>sco.class</code>, <code>sco.distri</code>, <code>sco.gauss</code>, <code>sco.label</code>, <code>sco.match</code>, <code>triangle.class</code>, <code>triangle.plot</code></td>
+<td align="left"></td>
+<td align="left"><code>psub.text</code></td>
+<td align="left"></td>
+</tr>
+<tr class="odd">
+<td align="left"><code>y.rank</code></td>
+<td align="left"><code>sco.distri</code></td>
+<td align="left"><code>yrank</code></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+<tr class="even">
+<td align="left"><code>zmax</code></td>
+<td align="left"><code>s.value</code></td>
+<td align="left"></td>
+<td align="left"></td>
+<td align="left">set to default max(abs(z))</td>
+</tr>
+<tr class="odd">
+<td align="left"></td>
+<td align="left"></td>
+<td align="left"></td>
+<td align="left"></td>
+<td align="left"></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div id="references" class="section level1 unnumbered">
+<h1>References</h1>
+<div id="refs" class="references">
+<div id="ref-Dray2007">
+<p>Dray, S., and A. B. Dufour. 2007. “The Ade4 Package: Implementing the Duality Diagram for Ecologists.” <em>Journal of Statistical Software</em> 22 (4): 1–20.</p>
+</div>
+<div id="ref-Murrell2005">
+<p>Murrell, P. 2005. <em>R Graphics</em>. Chapman & Hall/CRC.</p>
+</div>
+<div id="ref-Sarkar2008">
+<p>Sarkar, D. 2008. <em>Lattice: Multivariate Data Visualization with R</em>. Springer.</p>
+</div>
+</div>
+</div>
+<div class="footnotes">
+<hr />
+<ol>
+<li id="fn1"><p>The <code>table.value</code> function is now generic and can handle <code>dist</code> or <code>table</code> objects as arguments.<a href="#fnref1">↩</a></p></li>
+<li id="fn2"><p>Convex hulls are now drawn by the <code>s.class</code> function (argument <code>chullSize</code>.)<a href="#fnref2">↩</a></p></li>
+</ol>
+</div>
+
+
+
+<!-- dynamically load mathjax for compatibility with self-contained -->
+<script>
+  (function () {
+    var script = document.createElement("script");
+    script.type = "text/javascript";
+    script.src  = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
+    document.getElementsByTagName("head")[0].appendChild(script);
+  })();
+</script>
+
+</body>
+</html>
diff --git a/man/ADEg-class.Rd b/man/ADEg-class.Rd
new file mode 100644
index 0000000..1ab8d02
--- /dev/null
+++ b/man/ADEg-class.Rd
@@ -0,0 +1,159 @@
+\name{ADEg-class}
+\docType{class}
+
+\alias{ADEg}
+\alias{ADEg-class}
+
+\alias{add.ADEg,ADEg-method}
+\alias{getcall,ADEg-method}
+\alias{getlatticecall}
+\alias{getlatticecall,ADEg-method}
+\alias{getparameters}
+\alias{getparameters,ADEg-method}
+\alias{getstats}
+\alias{getstats-methods}
+\alias{getstats,ADEg-method}
+\alias{gettrellis}
+\alias{gettrellis-methods}
+\alias{gettrellis,ADEg-method}
+\alias{panelbase}
+\alias{panelbase-methods}
+\alias{panelbase,ADEg-method}
+\alias{printSuperpose,ADEgORtrellis,ADEgORtrellis-method}
+\alias{plot,ADEg-method}
+\alias{plot,ADEg,ANY-method}
+\alias{print,ADEg-method}
+\alias{show,ADEg-method}
+\alias{update,ADEg}
+\alias{update,ADEg-method}
+
+\title{Class \code{ADEg}
+}
+
+\description{
+  An object of \code{ADEg} class is a simple graphic.
+  This object can be blended in with another one (superposition, insertion and/or juxtaposition) to 
+  form a more complex graphics (an \code{ADEgS} object).
+  
+  The \code{ADEg} class is a virtual class, i.e. a class which is not possible to create objects but which have heirs.
+  This class has five son classes : \code{ADEg.S1}, \code{ADEg.S2}, \code{ADEg.C1}, \code{ADEg.T} and \code{ADEg.Tr}.
+}
+
+\section{Objects from the Class}{
+  None object of this class can be instantiated.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+      
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list of two elements to create the \code{trellis} object: 
+      \itemize{
+        \item{\code{graphictype}: the \code{lattice} function to use}
+        \item{\code{arguments}: its parameters to obtain the \code{trellis} object} 
+    }}
+    
+    \item{\code{g.args}}{a list containing some parameters linked with the created object of \code{ADEg} class:
+      \itemize{
+        \item{\code{xlim}, \code{ylim}}
+        \item{\code{main}, \code{sub}}
+        \item{\code{xlab}, \code{ylab}}
+        \item{\code{samelimits}}
+        \item{\code{scales}: a list of scales informations (ticks, marks and labels for the x-axis or the y-axis) 
+          in the form of the lattice argument \code{scales} in the \code{xyplot} function}
+    }}
+      
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some other internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Methods}{
+  \describe{
+    \item{panelbase}{\code{signature(object = "ADEg")}: draws grid and text and produces graphical output 
+      from the graphical object}
+    
+    \item{getcall}{\code{signature(object = "ADEg")}: returns the \code{Call} slot}
+    
+    \item{getlatticecall}{\code{signature(object = "ADEg")}: returns the \code{lattice.call} slot}
+    
+    \item{getstats}{\code{signature(object = "ADEg")}: returns the \code{stats} slot}
+    
+    \item{getparameters}{\code{signature(object = "ADEg", number)}:
+      if \code{number} is 1, returns the \code{trellis.par} slot,  
+      if it is 2, returns the \code{adeg.par} slot
+      and if it is 0, returns the both slots}
+    
+    \item{add.ADEg}{\code{signature(object = "ADEg")}: superposes an ADEg on the 
+      current one plotted}
+      
+    \item{+}{\code{signature(e1 = "ADEg", e2 = "ADEg")}: superposes e2 on e1}
+    
+    \item{superpose}{\code{signature(g1 = "ADEgORtrellis", g2 = "ADEgORtrellis", which = "ANY", plot = "ANY")}: 
+      creates a new \code{ADEgS} object performing a superposition of \code{g2} on \code{g1}.}
+      
+    \item{printSuperpose}{\code{signature(g1 = "ADEgORtrellis", refg = "ADEgORtrellis")}: 
+      internal method, not for users.}
+      
+    \item{cbindADEg}{\code{signature(g1 = "ADEgORADEgS", g2 = "ADEgORADEgS")}:
+      creates a new \code{"ADEgS"} object combining \code{g1} on \code{g2}.}
+      
+    \item{rbindADEg}{\code{signature(g1 = "ADEgORADEgS", g2 = "ADEgORADEgS")}:
+      creates a new \code{"ADEgS"} object combining \code{g1} on \code{g2} by rows.}
+      
+    \item{insert}{\code{signature(graphics = "ADEgORtrellis", oldgraphics = "missing", posi, ratio, inset, plot, which)}: 
+      creates a new \code{ADEgS} object performing an insertion of \code{graphics} into the current device.}
+      
+    \item{insert}{\code{signature(graphics = "ADEgORtrellis", oldgraphics = "ADEg", posi, ratio, inset, plot)}: 
+      creates a new \code{ADEgS} object performing an insertion of \code{graphics} into \code{oldgraphics}.}      
+          
+    \item{show}{\code{signature(x = "ADEg")}: prints the \code{ADEg} object}
+    
+    \item{plot}{\code{signature(x = "ADEg")}: prints the \code{ADEg} object}
+    
+    \item{print}{\code{signature(x = "ADEg")}: displays the \code{ADEg} object
+      in the current device or in a new one}
+     
+    \item{update}{\code{signature(object = "ADEg")}: modifies graphical parameters after 
+      the \code{ADEg} creation, updates the current display and returns the modified \code{ADEg}}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\note{
+  For any \code{ADEg} creation, various graphical parameters can be passed into the dots (...) arguments.
+  \itemize{
+    \item{the parameters listed in \code{adegpar()} can be changed, even if
+      some of them do no modify the graphic representation chosen.}
+  
+    \item{the \code{lattice} parameters listed in \code{trellis.par.get()} can also be changed.}
+    
+    \item{limits, main and sub title, and axes labels can be changed using the keys 
+      \code{xlim}, \code{ylim}, \code{main}, \code{sub}, \code{xlab} and \code{ylab}.}
+    
+    \item{a neighbouring graph (object of class \code{nb} or \code{listw}) and a spatial one (object of
+      class \code{sp}) can be display in the background using the keys \code{nbobject}, \code{Sp} and \code{sp.layout}.}
+  }
+}
+
+\seealso{
+  \code{\linkS4class{ADEgS}}
+  \code{\link{adegpar}}
+  \code{\link{superpose}}
+  \code{\link{insert}}
+}
+
+\examples{
+showClass("ADEg")
+}
+
+\keyword{classes}
diff --git a/man/ADEg.C1-class.Rd b/man/ADEg.C1-class.Rd
new file mode 100644
index 0000000..3799254
--- /dev/null
+++ b/man/ADEg.C1-class.Rd
@@ -0,0 +1,110 @@
+\name{ADEg.C1-class}
+\docType{class}
+
+\alias{ADEg.C1}
+\alias{ADEg.C1-class}
+
+\alias{panelbase,ADEg.C1-method}
+\alias{gettrellis,ADEg.C1-method}
+\alias{prepare,ADEg.C1-method}
+\alias{setlatticecall,ADEg.C1-method}
+
+\title{Class \code{ADEg.C1}
+}
+
+\description{
+  An object of \code{ADEg.C1} class represents unidimensional data into two dimensions.
+  
+  The \code{ADEg.C1} class is a virtual class, i.e. a class which is not possible to create objects but which have heirs.
+  This class inherits from \code{ADEg} class and 
+  has three son classes : \code{C1.barchart}, \code{C1.curve}, \code{C1.density}, \code{C1.dotplot}, \code{C1.gauss}, 
+  \code{C1.hist}, \code{C1.interval}
+}
+
+\section{Objects from the Class}{
+  None object of this class can be instantiated.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+  
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list of two elements to create the \code{trellis} object: 
+      \itemize{
+        \item{\code{graphictype}: \code{xyplot}}
+        \item{\code{arguments}: its parameters to obtain the \code{trellis} object} 
+    }}
+    
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters:
+     \itemize{
+        \item{\code{hori.update}: a logical indicating if the sense of direction of the graphics is updating}
+        \item{\code{backgrid}: a list of two elements for grid lines. \code{backgrid$x} defines the coordinates 
+          of the lines (horizontal or vertical depending on the graphics orientation) and \code{backgrid$d} the grid mesh}
+    }}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg}}, directly.
+}
+
+\section{Methods}{
+  \describe{
+    \item{prepare}{\code{signature(object = "ADEg.C1")}: 
+      performs the calculations before display the object (e.g. limits, grid and axis calculations)}
+    
+    \item{setlatticecall}{\code{signature(object = "ADEg.C1")}: 
+      prepares the \code{lattice.call} slot}
+    
+    \item{panelbase}{\code{signature(object = "ADEg.C1")}: 
+      defines the graphical background (e.g. grid, rugs and box)}
+    
+    \item{gettrellis}{\code{signature(object = "ADEg.C1")}: 
+      converts the graphic into a \code{trellis} object of \code{lattice} class}
+   }
+}
+
+\note{
+  The \code{ADEg.S1} class and \code{ADEg.C1} class are both used to represent an unidimensional information (e.g. a score).
+  The difference between these two classes is mainly ideological : an \code{ADEg.S1} object is a representation into one 
+  dimension (e.g. one line) while an \code{ADEg.C1} object is a representation into two dimensions (e.g. curves).
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\link{adegpar}}
+  \code{\linkS4class{C1.barchart}}
+  \code{\linkS4class{C1.curve}}
+  \code{\linkS4class{C1.density}}
+  \code{\linkS4class{C1.dotplot}}
+  \code{\linkS4class{C1.gauss}}
+  \code{\linkS4class{C1.hist}}
+  \code{\linkS4class{C1.interval}}
+  \code{\linkS4class{ADEg}}
+}
+
+\examples{
+showClass("ADEg.C1")
+}
+
+\keyword{classes}
diff --git a/man/ADEg.S1-class.Rd b/man/ADEg.S1-class.Rd
new file mode 100644
index 0000000..9324534
--- /dev/null
+++ b/man/ADEg.S1-class.Rd
@@ -0,0 +1,119 @@
+\name{ADEg.S1-class}
+\docType{class}
+
+\alias{ADEg.S1}
+\alias{ADEg.S1-class}
+
+\alias{prepare,ADEg.S1-method}
+\alias{setlatticecall,ADEg.S1-method}
+\alias{gettrellis,ADEg.S1-method}
+\alias{panelbase,ADEg.S1-method}
+
+\title{Class \code{ADEg.S1}}
+
+\description{
+  An object of \code{ADEg.S1} class represents unidimensional data into one dimension.
+  
+  The \code{ADEg.S1} class is a virtual class, i.e. a class which is not possible to create objects but which have heirs.
+  This class inherits from \code{ADEg} class and 
+  has five son classes : \code{S1.boxplot}, \code{S1.class}, \code{S1.distri}, \code{S1.label} and \code{S1.match}. 
+}
+
+\section{Objects from the Class}{
+  None object of this class can be instantiated.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
+      \item{\code{at}: the index value.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+  
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list of two elements to create the \code{trellis} object: 
+      \itemize{
+        \item{\code{graphictype}: \code{xyplot}}
+        \item{\code{arguments}: its parameters to obtain the \code{trellis} object} 
+    }}
+    
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S1} class.}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters:
+     \itemize{
+        \item{\code{hori.update}: a logical indicating if the sense of direction of the graphics is updating}
+        \item{\code{backgrid}: a list of two elements for grid lines. \code{backgrid$x} defines the coordinates 
+          of the lines (horizontal or vertical depending on the graphics orientation) and \code{backgrid$d} the grid mesh}
+        \item{\code{rug}: an index value indicating where the rugs are drawn}
+    }}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg}}, directly.
+}
+
+\section{Methods}{
+  \describe{
+    \item{prepare}{\code{signature(object = "ADEg.S1")}: 
+      performs the calculations before display the object (e.g. limits, grid and axis calculations)}
+    
+    \item{setlatticecall}{\code{signature(object = "ADEg.S1")}: 
+      prepares the \code{lattice.call} slot}
+      
+    \item{panelbase}{\code{signature(object = "ADEg.S1")}: 
+      defines the graphical background (e.g. grid, rugs and box)}
+      
+    \item{gettrellis}{\code{signature(object = "ADEg.S1")}: 
+      converts the graphic into a \code{trellis} object of \code{lattice} class}
+      
+    \item{zoom}{\code{signature(object = "ADEg.S1", zoom = "numeric", center = "missing")}: 
+      performs a zoom in (if zoom < 1) or out (if zoom > 1) centered, only in one-dimension}
+      
+    \item{zoom}{\code{signature(object = "ADEg.S1", zoom = "numeric", center = "numeric")}: 
+      performs a zoom in (if zoom < 1) or out (if zoom > 1) around the center passed in parameter, only in one-dimension}
+  }
+}
+
+\note{
+  Various graphical parameters are used for display an ADEg.S1 object. 
+  The list \code{p1d} in \code{adegpar()} is thought specific for \code{ADEg.S1} objects.
+
+  The \code{ADEg.S1} class and \code{ADEg.C1} class are both used to represent an unidimensional information (e.g. a score).
+  The difference between these two classes is mainly ideological : an \code{ADEg.S1} object is a representation into one 
+  dimension (e.g. one line) while an \code{ADEg.C1} object is a representation into two dimensions (e.g. curves).
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\link{adegpar}}
+  \code{\link{zoom}}
+  \code{\linkS4class{S1.boxplot}}
+  \code{\linkS4class{S1.class}}
+  \code{\linkS4class{S1.distri}}
+  \code{\linkS4class{S1.label}}
+  \code{\linkS4class{S1.match}}
+  \code{\linkS4class{ADEg}}  
+}
+
+\examples{
+showClass("ADEg.S1")
+adegpar("p1d")
+}
+
+\keyword{classes}
diff --git a/man/ADEg.S2-class.Rd b/man/ADEg.S2-class.Rd
new file mode 100644
index 0000000..d78737f
--- /dev/null
+++ b/man/ADEg.S2-class.Rd
@@ -0,0 +1,127 @@
+\name{ADEg.S2-class}
+\docType{class}
+
+\alias{ADEg.S2}
+\alias{ADEg.S2-class}
+
+\alias{prepare,ADEg.S2-method}
+\alias{setlatticecall,ADEg.S2-method}
+\alias{gettrellis,ADEg.S2-method}
+\alias{panelbase,ADEg.S2-method}
+
+\title{Class \code{ADEg.S2}}
+
+\description{
+  An object of \code{ADEg.S2} class represents bi-dimensional data.
+  
+  The \code{ADEg.S2} class is a virtual class, i.e. a class which is not possible to create objects but which have heirs.
+  This class inherits from \code{ADEg} class and 
+  has eleven son classes : \code{S2.arrow}, \code{S2.class}, \code{S2.corcircle}, \code{S2.density}, \code{S2.distri}, 
+  \code{S2.image}, \code{S2.label}, \code{S2.logo}, \code{S2.match}, \code{S2.traject} and \code{S2.value}.  
+}
+
+\section{Objects from the Class}{
+  None object of this class can be instantiated.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
+      \item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
+      \item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+  
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list of two elements to create the \code{trellis} object: 
+      \itemize{
+        \item{\code{graphictype}: \code{xyplot}}
+        \item{\code{arguments}: its parameters to obtain the \code{trellis} object} 
+    }}
+    
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class:
+      \itemize{
+      \item{\code{fullcircle}: only for \code{S2.corcircle} objects}
+      \item{\code{method}: only for \code{S2.value} objects}
+      \item{\code{symbol}: only for \code{S2.value} objects}
+      \item{\code{center}: only for \code{S2.value} objects}
+    }}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters:
+     \itemize{
+        \item{\code{xfullcircle.update} and \code{yfullcircle.update}: a logical indicating if the circle size is updating (only for \code{S2.corcircle} objects)}
+        \item{\code{plegend.update}: a logical indicating if the legend parameters are updating}
+        \item{\code{breaks.update}: a logical indicating if the legend breaks are updating}
+        \item{\code{backgrid}: a list of elements for grid lines}
+    }}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg}}, directly.
+}
+
+\section{Methods}{
+  \describe{
+    \item{prepare}{\code{signature(object = "ADEg.S2")}: 
+      performs the calculations before display the object (e.g. limits, grid and axis calculations)}
+    
+    \item{setlatticecall}{\code{signature(object = "ADEg.S2")}: 
+      prepares the \code{lattice.call} slot}
+    
+    \item{panelbase}{\code{signature(object = "ADEg.S2")}: 
+      defines the graphical background (e.g. grid and box)}
+  
+    \item{gettrellis}{\code{signature(object = "ADEg.S2")}: 
+      converts the graphic into a \code{trellis} object of \code{lattice} class}
+      
+    \item{zoom}{\code{signature(object = "ADEg.S2", zoom = "numeric", center = "missing")}: 
+      performs a zoom in (if zoom < 1) or out (if zoom > 1) centered}
+    
+    \item{zoom}{\code{signature(object = "ADEg.S2", zoom = "numeric",	center = "numeric")}: 
+      performs a zoom in (if zoom < 1) or out (if zoom > 1) around the center passed in parameter (center should be a two-length vector)}
+    
+    \item{addhist}{\code{signature(object = "ADEg.S2")}: 
+      adds histograms and density lines against a bi-dimensional graphics}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\link{addhist}}
+  \code{\link{zoom}}
+  \code{\link{adegpar}}
+  \code{\linkS4class{S2.arrow}}
+  \code{\linkS4class{S2.class}}
+  \code{\linkS4class{S2.corcircle}}
+  \code{\linkS4class{S2.density}}
+  \code{\linkS4class{S2.distri}}
+  \code{\linkS4class{S2.image}}
+  \code{\linkS4class{S2.label}}
+  \code{\linkS4class{S2.logo}}
+  \code{\linkS4class{S2.match}}
+  \code{\linkS4class{S2.traject}}
+  \code{\linkS4class{S2.value}}
+  \code{\linkS4class{ADEg}}
+}
+
+\examples{
+showClass("ADEg.S2")
+}
+
+\keyword{classes}
diff --git a/man/ADEg.T-class.Rd b/man/ADEg.T-class.Rd
new file mode 100644
index 0000000..68ad011
--- /dev/null
+++ b/man/ADEg.T-class.Rd
@@ -0,0 +1,106 @@
+\name{ADEg.T-class}
+\docType{class}
+
+\alias{ADEg.T}
+\alias{ADEg.T-class}
+
+\alias{gettrellis,ADEg.T-method}
+\alias{prepare,ADEg.T-method}
+\alias{setlatticecall,ADEg.T-method}
+\alias{panelbase,ADEg.T-method}
+
+\title{Class \code{ADEg.T}}
+
+\description{
+  An object of \code{ADEg.T} class represents table data.
+  
+  The \code{ADEg.T} class is a virtual class, i.e. a class which is not possible to create objects but which have heirs.
+  This class inherits from \code{ADEg} class and 
+  has two son classes : \code{T.image} and \code{T.value}.  
+}
+
+\section{Objects from the Class}{
+  None object of this class can be instantiated.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}:}{a list containing data or data's name. \itemize{
+      \item{\code{dftab}: the displayed values which can be \code{table}, \code{dist} or \code{matrix}
+        in the form of a data frame, a name or a matching call}
+      \item{\code{coordsx}: an integer or a vector indicating the columns of \code{dftab} kept}
+      \item{\code{coordsy}: an integer or a vector indicating the rows of \code{dftab} kept}
+      \item{\code{labelsx}: the columns' labels}
+      \item{\code{labelsy}: the rows' labels}
+      \item{"\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list of two elements to create the \code{trellis} object: 
+      \itemize{
+        \item{\code{graphictype}: \code{xyplot}}
+        \item{\code{arguments}: its parameters to obtain the \code{trellis} object} 
+    }}
+    
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.T} class:
+      \itemize{
+        \item{\code{method}: only for \code{T.value} objects}
+        \item{\code{symbol}: only for \code{T.value} objects}
+        \item{\code{center}: only for \code{T.value} objects}
+    }}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters:
+      \itemize{
+        \item{\code{breaks.update}: a logical indicating if the legend breaks is updating}
+        \item{\code{axes$dx} and \code{axes$dy}: intervals for the cell size}
+    }}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg}}, directly.
+}
+
+\section{Methods}{
+  \describe{
+    \item{prepare}{\code{signature(object = "ADEg.T")}: 
+      performs the calculations before display the object (e.g. limits, grid and axis calculations)}
+    
+    \item{setlatticecall}{\code{signature(object = "ADEg.T")}: 
+      prepares the \code{lattice.call} slot}
+    
+    \item{panelbase}{\code{signature(object = "ADEg.T")}: 
+      defines the graphical background (e.g. axes, labels, ticks, box and grid)}
+    
+    \item{gettrellis}{\code{signature(object = "ADEg.T")}: 
+      converts the graphic into a \code{trellis} object of \code{lattice} class}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\link{adegpar}}
+  \code{\linkS4class{T.image}}
+  \code{\linkS4class{T.value}}
+  \code{\linkS4class{ADEg}}  
+}
+
+\examples{
+showClass("ADEg.T")
+}
+
+\keyword{classes}
diff --git a/man/ADEg.Tr-class.Rd b/man/ADEg.Tr-class.Rd
new file mode 100644
index 0000000..eba15dc
--- /dev/null
+++ b/man/ADEg.Tr-class.Rd
@@ -0,0 +1,103 @@
+\name{ADEg.Tr-class}
+\docType{class}
+
+\alias{ADEg.Tr}
+\alias{ADEg.Tr-class}
+
+\alias{gettrellis,ADEg.Tr-method}
+\alias{prepare,ADEg.Tr-method}
+\alias{setlatticecall,ADEg.Tr-method}
+\alias{panelbase,ADEg.Tr-method}
+
+\title{Class \code{"ADEg.Tr"}}
+
+\description{ 
+  An object of \code{ADEg.Tr} class represents triangular coordinates in 2D.
+  
+  The \code{ADEg.Tr} class is a virtual class, i.e. a class which is not possible to create objects but which have heirs.
+  This class inherits from \code{ADEg} class and 
+  has three son classes : \code{Tr.class}, \code{Tr.label}, \code{T.match} and \code{T.traject}.  
+}
+
+\section{Objects from the Class}{
+  None object of this class can be instantiated.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}:}{a list containing data or data's name. \itemize{
+      \item{\code{dfxyz}: the displayed values in the form of a data frame with three columns, a name or a matching call.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}  
+      
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list of two elements to create the \code{trellis} object: 
+      \itemize{
+        \item{\code{graphictype}: \code{xyplot}}
+        \item{\code{arguments}: its parameters to obtain the \code{trellis} object} 
+    }}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.Tr} class:
+      \itemize{
+      \item{\code{max3d} and \code{min3d}: triangular limits}
+      \item{\code{adjust}: a logical to adjust the device with the limits}
+    }}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters:
+     \itemize{
+        \item{\code{adjust.update}: a logical indicating if the \code{adjust} slot is updating}
+        \item{\code{cornerp}: coordinates of the triangle extremities.}
+        \item{\code{lgrid}: a list containing the three coordinates of the grid segments extremities(\code{pts1}, 
+          \code{pts2}, \code{pts3}) and the value of the division (\code{posgrid})}
+    }}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg}}, directly.
+}
+
+\section{Methods}{
+  \describe{
+    \item{prepare}{\code{signature(object = "ADEg.Tr")}: 
+      performs the calculations before display the object (e.g. limits, grid and axis calculations)}
+
+    \item{setlatticecall}{\code{signature(object = "ADEg.Tr")}: 
+      prepares the \code{lattice.call} slot}
+      
+    \item{panelbase}{\code{signature(object = "ADEg.Tr")}: 
+      defines the graphical background (e.g. triangle and grid)}
+      
+    \item{gettrellis}{\code{signature(object = "ADEg.Tr")}: 
+      converts the graphic into a \code{trellis} object of \code{lattice} class}
+  }
+}
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\link{adegpar}}
+  \code{\linkS4class{Tr.class}}
+  \code{\linkS4class{Tr.label}}
+  \code{\linkS4class{Tr.match}}
+  \code{\linkS4class{Tr.traject}}
+  \code{\linkS4class{ADEg}}  
+}
+
+\examples{
+showClass("ADEg.Tr")
+}
+
+\keyword{classes}
diff --git a/man/ADEgS-class.Rd b/man/ADEgS-class.Rd
new file mode 100644
index 0000000..08970df
--- /dev/null
+++ b/man/ADEgS-class.Rd
@@ -0,0 +1,173 @@
+\name{ADEgS-class}
+\docType{class}
+
+\alias{ADEgS-class}
+
+\alias{$,ADEgS-method}
+\alias{[,ADEgS,numeric,missing,logical-method}
+\alias{[,ADEgS,numeric,missing,missing-method}
+\alias{[[,ADEgS,numeric,missing-method}
+\alias{[[,ADEgS,character,missing-method}
+\alias{[[<-,ADEgS,numeric,missing,ADEg-method}
+\alias{[[<-,ADEgS,numeric,missing,ADEgS-method}  
+
+\alias{getcall,ADEgS-method}
+\alias{getgraphics}
+\alias{getgraphics,ADEgS-method}
+\alias{getpositions}
+\alias{getpositions,ADEgS-method}
+\alias{length,ADEgS-method}
+\alias{names,ADEgS-method}
+\alias{names<-,ADEgS,character-method}
+
+\alias{show,ADEgS-method}
+\alias{plot,ADEgS-method}
+\alias{plot,ADEgS,ANY-method}
+\alias{print,ADEgS-method}
+
+\alias{update,ADEgS}
+\alias{update,ADEgS-method}
+
+\title{Class \code{"ADEgS"}}
+
+\description{
+  An object of \code{ADEgS} class is a complex graphic.
+  This class allows the superposition, the insertion and/or the juxtaposition of several \code{ADEg}, \code{trellis} and/or \code{ADEgS} objects.
+  
+  The \code{ADEgS} class have neither father class nor son classes.
+}
+
+\section{Objects from the Class}{
+  \code{ADEgS} objects can be created by calls of the form \code{new("ADEgS", ...)}.
+  
+  The regular usage in this package is to use the \code{ADEgS}, \code{add.ADEg}, \code{superpose}, \code{insert} or \code{+} functions.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{ADEglist}}{a list of several \code{trellis}, \code{ADEg} and/or \code{ADEgS} objects.}
+    
+    \item{\code{positions}}{a matrix with four columns and as many rows as the number of graphical objects in the \code{ADEglist} slot.
+      For each simple graphic, i.e. in each row, the coordinates of the top-right and the bottom-left hand corners are in \code{npc} unit (normalized parent coordinates).}
+      
+    \item{\code{add}}{a square matrix with as many rows and columns as the number of graphical objects in the \code{ADEglist} slot.
+      The value at the i-th row and j-th column is equal to 1 whether the j-th graphical object in the \code{ADEglist} slot is superpose to i-th graphical one.
+      Otherwise, this value is equal to 0.}
+      
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Methods}{
+  \describe{
+    \item{[}{\code{signature(x = "ADEgS", i = "numeric", j = "missing", drop = "logical")}:
+      extracts the \code{i}-th sub-graphics in the \code{x at ADEglist}. \code{i} can be a vector. 
+      If \code{i} is a single number and if the extracted graphic in an \code{ADEg} object, the sub-selection 
+      is in the form of \code{ADEg} if \code{drop} is \code{TRUE} and in the form of \code{ADEgS} otherwise.}
+      
+    \item{[}{\code{signature(x = "ADEgS", i = "numeric", j = "missing", drop = "missing")}: 
+      the same than the previous method. \code{drop} is \code{FALSE} by default}
+      
+    \item{[[}{\code{signature(x = "ADEgS", i = "numeric", j = "missing")}: 
+      extracts one sub-graphic, the \code{i}-th one, in the \code{x at ADEglist}}
+      
+    \item{[[}{\code{signature(x = "ADEgS", i = "character", j = "missing")}: 
+      extracts one sub-graphic, named \code{i} in the \code{x at ADEglist}}
+      
+    \item{[[<-}{\code{signature(x = "ADEgS", i = "numeric", j = "missing", value = "ADEg")}: 
+      replaces one sub graphic, the \code{i}-th one, by an \code{ADEg} object in the \code{x at ADEglist}}
+      
+    \item{[[<-}{\code{signature(x = "ADEgS", i = "numeric", j = "missing", value = "ADEgS")}: 
+      replaces one sub graphic, the \code{i}-th one, by an \code{ADEgS} object in the \code{x at ADEglist}}
+      
+    \item{$}{\code{signature(x = "ADEgS")}: 
+      extracts one sub-graphic by its name in the \code{x at ADEglist}}
+      
+    \item{getpositions}{\code{signature(object = "ADEgS")}: 
+      returns the positions matrix of the object, i.e. \code{object at positions}}
+      
+    \item{getgraphics}{\code{signature(object = "ADEgS")}: 
+      returns the list of graphics of the object, 
+      i.e. \code{object at ADEglist}}
+      
+    \item{getcall}{\code{signature(object = "ADEgS")}: 
+      returns the call of the object, i.e. \code{object at Call}}
+      
+    \item{names}{\code{signature(object = "ADEgS")}: 
+      returns the graphics' names of the object, i.e. the names of \code{object at ADEglist}}
+      
+    \item{names<-}{\code{signature(object = "ADEgS")}: 
+      replaces the graphics' names of the object, i.e. the names of \code{object at ADEglist}}
+      
+    \item{length}{\code{signature(x = "ADEgS")}: 
+      returns the number of graphics into \code{x}, i.e. the length of \code{x at ADEglist}}
+      
+    \item{plot}{\code{signature(x = "ADEgS")}: same as \code{print}}
+    
+    \item{print}{\code{signature(x = "ADEgS")}: 
+      displays the graphical elements into one device using positions and superposition management (\code{x at add} matrix)}
+      
+    \item{show}{\code{signature(object = "ADEgS")}: same as \code{print}} 
+      
+    \item{superpose}{\code{signature(g1 = "ADEgS", g2 = "ADEg", which = "numeric", plot = "logical")}: 
+      creates a new \code{"ADEgS"} object performing a superposition of \code{g2} on the which-th \code{ADEg} object of \code{g1}. 
+      This object is printed if \code{plot} is \code{TRUE}.}
+      
+    \item{superpose}{\code{signature(g1 = "ADEgS", g2 = "ADEg", which = "numeric", plot = "ANY")}: 
+      creates a new \code{"ADEgS"} object performing a superposition of \code{g2} on the which-th \code{ADEg} object of \code{g1}. 
+      This object is printed only if \code{plot} is \code{TRUE}.}
+      
+    \item{superpose}{\code{signature(g1 = "ADEgS", g2 = "ADEg", which = "missing", plot = "ANY")}: 
+      creates a new \code{"ADEgS"} object performing a superposition of \code{g2} on the last \code{ADEg} object of \code{g1}. 
+      This object is printed only if \code{plot} is \code{TRUE}.}
+      
+    \item{superpose}{\code{signature(g1 = "ADEgS", g2 = "ADEgS", which = "missing", plot = "ANY")}:
+      creates a new \code{"ADEgS"} object performing a superposition between two \code{ADEgS} having the same length and the same \code{positions} slot. 
+      It is used when \code{g1} and \code{g2} are both created with a partition of individual groups, variables or analysis' axis.}  
+      
+    \item{+}{\code{signature(e1 = "ADEg", e2 = "ADEgS")}:
+      creates a new \code{"ADEgS"} object performing a superposition of \code{e1} on \code{e2}.}
+    
+    \item{+}{\code{signature(e1 = "ADEgS", e2 = "ADEg")}:
+      creates a new \code{"ADEgS"} object performing a superposition of \code{e2} on \code{e1}.}
+      
+    \item{cbindADEg}{\code{signature(g1 = "ADEgORADEgS", g2 = "ADEgORADEgS")}:
+      creates a new \code{"ADEgS"} object combining \code{g1} on \code{g2} by columns.}      
+      
+    \item{rbindADEg}{\code{signature(g1 = "ADEgORADEgS", g2 = "ADEgORADEgS")}:
+      creates a new \code{"ADEgS"} object combining \code{g1} on \code{g2} by rows.}
+      
+    \item{update}{\code{signature(object = "ADEgS")}: 
+      modifies the graphical parameters of each sub-graphics listed in \code{object at ADEglist} and/or the object's names 
+      (with the key word \code{names}) and/or the \code{object at positions} slot (with the key word \code{positions}), after creation of the \code{object}.
+      The current display is updated and a modified object is returned.}
+      
+    \item{insert}{\code{signature(graphics = "ADEgS", oldgraphics = "missing", posi, ratio, inset, plot, which, dispatch)}: 
+      creates a new \code{"ADEgS"} object performing an insertion of \code{graphics} into the current device.}
+      
+    \item{insert}{\code{signature(graphics = "ADEgS", oldgraphics = "ADEg", posi, ratio, inset, plot)}: 
+      creates a new \code{"ADEgS"} object performing an insertion of \code{graphics} into \code{oldgraphics}.}
+      
+    \item{insert}{\code{signature(graphics = "ADEgORtrellis", oldgraphics = "ADEgS", posi, ratio, inset, plot, which)}: 
+      creates a new \code{"ADEgS"} object performing an insertion of \code{graphics} into \code{oldgraphics}.}
+      
+    \item{insert}{\code{signature(graphics = "ADEgS", oldgraphics = "ADEgS", posi, ratio, inset, plot, which, dispatch)}: 
+      creates a new \code{"ADEgS"} object performing an insertion of \code{graphics} into \code{oldgraphics}.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}
+  \code{\link{ADEgS}}
+  \code{\link{superpose}}
+  \code{\link{insert}}
+}
+
+\examples{
+  showClass("ADEgS")
+}
+
+\keyword{classes}
diff --git a/man/ADEgS.Rd b/man/ADEgS.Rd
new file mode 100644
index 0000000..061c4ab
--- /dev/null
+++ b/man/ADEgS.Rd
@@ -0,0 +1,64 @@
+\name{ADEgS}
+\alias{ADEgS}
+
+\title{Creation of \code{ADEgS} objects}
+
+\description{
+  Creates and displays an \code{"ADEgS"} object, a set of \code{ADEg}, \code{trellis} and/or \code{ADEgS} objects,
+  managed by superposition, insertion and/or juxtaposition.
+}
+
+\usage{
+ADEgS(adeglist, positions, layout, add = NULL, plot = TRUE)
+}
+
+\arguments{
+  \item{adeglist}{a list of several \code{trellis}, \code{ADEg} and/or \code{ADEgS} objects.}
+  
+  \item{positions}{a matrix with four columns and as many rows as the number of graphical objects in \code{ADEglist} slot.
+      For each simple graphic, i.e. in each row, the coordinates of the top-right and the bottom-left hand corners are in \code{npc} unit (normalized parent coordinates).}
+      
+  \item{layout}{a layout indication in two possible forms: \itemize{
+    \item{a list containing arguments of the \code{layout} function}
+    \item{a two-length vector containing rows' and columns' number of layout}
+  }}
+  
+  \item{add}{a square matrix with as many rows and columns as the number of graphical objects in the \code{ADEglist} slot.
+      The value at the i-th row and j-th column is equal to 1 whether the j-th graphical object in \code{ADEglist} slot is superpose to i-th graphical one.
+      Otherwise, this value is equal to 0.}
+      
+  \item{plot}{a logical. If the graphics should be displayed}
+}
+
+\value{
+  an \code{ADEgS} object. If \code{plot = TRUE}, the created object is displayed.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEgS}}
+}
+
+\examples{
+xy <- matrix(rnorm(20), ncol = 2)
+g1 <- s.label(xy)
+g2 <- s.class(xy, fac = as.factor(rep(LETTERS[1:2], length.out = 10)), ppoints.cex = 0,
+  col = c("blue", "red"))
+g3 <- ADEgS(list(g1, g2), rbind(c(0, 0, 0.5, 1), c(0.5, 0, 1, 1)))
+g4 <- ADEgS(list(g1, g2), layout = c(2, 1))
+g5 <- ADEgS(list(g1, g2))
+g6 <- ADEgS(list(g1, g2), add = matrix(c(0, 1, 0, 0), byrow = TRUE, ncol = 2))
+
+data(olympic, package = "ade4")
+dudi1 <- ade4::dudi.pca(olympic$tab, scan = FALSE)
+g7 <- s.arrow(dudi1$li)
+g8 <- s.corcircle(dudi1$co, lab = names(olympic$tab))
+g9 <- ADEgS(list(g7, g8), rbind(c(0, 0, 0.5, 1), c(0.5, 0, 1, 1)))
+g9[[1]]
+g9[1, drop = FALSE]
+length(g9)
+}
+
+\keyword{hplot}
diff --git a/man/C1.barchart-class.Rd b/man/C1.barchart-class.Rd
new file mode 100644
index 0000000..c94a282
--- /dev/null
+++ b/man/C1.barchart-class.Rd
@@ -0,0 +1,82 @@
+\name{C1.barchart-class}
+\docType{class}
+
+\alias{C1.barchart}
+\alias{C1.barchart-class}
+\alias{prepare,C1.barchart-method}
+\alias{panel,C1.barchart-method}
+
+\title{Class \code{C1.barchart}}
+
+\description{
+  A class for the creation and display of a numeric score using barcharts.
+}
+
+\section{Objects from the Class}{
+  \code{C1.barchart} objects can be created by calls of the form \code{new("C1.barchart", ...)}.
+  
+  The regular usage in this package is to use the \code{s1d.barchart} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{score}: the displayed values in the form of a vector, a factor, a name or a matching call.}
+      \item{\code{labels}: the labels' names drawn on the top of bars.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+    
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class.}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations}
+
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.C1}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.C1}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.C1}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.C1}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.C1"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{C1.barchart} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "C1.barchart")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default.}
+      
+    \item{panel}{\code{signature(object = "C1.barchart")}: 
+      draws bar charts and labels.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.C1}}
+  \code{\link{s1d.barchart}}
+}
+
+\examples{
+showClass("C1.barchart")
+}
+
+\keyword{classes}
diff --git a/man/C1.curve-class.Rd b/man/C1.curve-class.Rd
new file mode 100644
index 0000000..cc5e672
--- /dev/null
+++ b/man/C1.curve-class.Rd
@@ -0,0 +1,91 @@
+\name{C1.curve-class}
+\docType{class}
+
+\alias{C1.curve}
+\alias{C1.curve-class}
+\alias{prepare,C1.curve-method}
+\alias{panel,C1.curve-method}
+\alias{C1.curves}
+\alias{C1.curves-class}
+\alias{panel,C1.curves-method}
+
+\title{Class \code{C1.curve}}
+
+\description{
+  A class for the creation and display of a numeric score linked by curves.
+  The \code{C1.curves} allows to deal with multiple scores. 
+}
+
+\section{Objects from the Class}{
+  \code{C1.curve} objects can be created by calls of the form \code{new("C1.curve", ...)}. The regular usage in this package is to use the \code{s1d.curve} function.
+  
+  \code{C1.curves} objects can be created by calls of the form \code{new("C1.curves", ...)}. The regular usage in this package is to use the \code{s1d.curves} function. Class \code{\linkS4class{C1.curves}} extends \code{C1.curve} directly.\cr
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{score}: the displayed values in the form of a vector, a factor, a name or a matching call.}
+      \item{\code{at}: the index value.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+    
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class.}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations}
+
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.C1}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.C1}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.C1}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.C1}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.C1"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{C1.curve} and \code{C1.curves} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "C1.curve")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default.}
+      
+    \item{panel}{\code{signature(object = "C1.curve")}: 
+      draws points and curves.}
+    
+    \item{panel}{\code{signature(object = "C1.curves")}: 
+      draws points and curves.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.C1}}
+  \code{\link{s1d.curve}}
+  \code{\link{s1d.curves}}
+}
+
+\examples{
+showClass("C1.curve")
+showClass("C1.curves")
+}
+
+\keyword{classes}
diff --git a/man/C1.density-class.Rd b/man/C1.density-class.Rd
new file mode 100644
index 0000000..4d98b99
--- /dev/null
+++ b/man/C1.density-class.Rd
@@ -0,0 +1,96 @@
+\name{C1.density-class}
+\docType{class}
+
+\alias{C1.density}
+\alias{C1.density-class}
+\alias{prepare,C1.density-method}
+\alias{panel,C1.density-method}
+
+\title{Class \code{C1.density}}
+
+\description{
+  A class for the creation and display of a numeric score using density curves.
+}
+
+\section{Objects from the Class}{
+  \code{C1.density} objects can be created by calls of the form \code{new("C1.density", ...)}.
+  
+  The regular usage in this package is to use the \code{s1d.density} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
+      \item{\code{fac}: a factor for \code{score} to split in the form of a vector, a factor, a name or a matching call.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class.
+      The specific slots for \code{C1.density} objects are: \itemize{
+      \item{\code{kernel}, \code{bandwidth} and \code{gridsize}: passed in parameters in \code{bkde} function of the 
+        \code{KernSmooth} package.}
+      \item{\code{fill}: a logical to yield the polygons density curves filled.}
+      \item{\code{col}: a logical, a color or a colors vector to color labels, rugs, lines and polygons.}
+    }}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations. 
+      The specific slot for \code{C1.density} objects is: \itemize{
+      \item{\code{densit}: the values of density curve calculated for each factor in \code{fac} computes with 
+        the \code{bkde} function of the \code{KernSmooth} package.}
+    }}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters.
+      The specific slot for \code{C1.density} objects is: \itemize{
+      \item{\code{rug}: an index value indicating where the rugs are drawn}
+    }}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.C1}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.C1}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.C1}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.C1}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.C1"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{C1.density} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "C1.density")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.C1}), modifies some graphical parameters used by default and 
+      calculates the density curves according to the numeric score and the values' categories.}
+      
+    \item{panel}{\code{signature(object = "C1.density")}: 
+      draws density curves.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.C1}}
+  \code{\link{s1d.density}}
+}
+
+\examples{
+showClass("C1.density")
+}
+
+\keyword{classes}
diff --git a/man/C1.dotplot-class.Rd b/man/C1.dotplot-class.Rd
new file mode 100644
index 0000000..bdce227
--- /dev/null
+++ b/man/C1.dotplot-class.Rd
@@ -0,0 +1,82 @@
+\name{C1.dotplot-class}
+\docType{class}
+
+\alias{C1.dotplot}
+\alias{C1.dotplot-class}
+\alias{prepare,C1.dotplot-method}
+\alias{panel,C1.dotplot-method}
+
+\title{Class \code{C1.dotplot}}
+
+\description{
+  A class for the creation and display of a numeric score using dots.
+}
+
+\section{Objects from the Class}{
+  \code{C1.dotplot} objects can be created by calls of the form \code{new("C1.dotplot", ...)}.
+  
+  The regular usage in this package is to use the \code{s1d.dotplot} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{score}: the displayed values in the form of a vector, a factor, a name or a matching call.}
+      \item{\code{at}: the index value.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+    
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class.}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations}
+
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.C1}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.C1}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.C1}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.C1}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.C1"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{C1.dotplot} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "C1.dotplot")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default.}
+      
+    \item{panel}{\code{signature(object = "C1.dotplot")}: 
+      draws segments and dots.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.C1}}
+  \code{\link{s1d.dotplot}}
+}
+
+\examples{
+showClass("C1.dotplot")
+}
+
+\keyword{classes}
diff --git a/man/C1.gauss-class.Rd b/man/C1.gauss-class.Rd
new file mode 100644
index 0000000..84ffb9f
--- /dev/null
+++ b/man/C1.gauss-class.Rd
@@ -0,0 +1,97 @@
+\name{C1.gauss-class}
+\docType{class}
+
+\alias{C1.gauss}
+\alias{C1.gauss-class}
+\alias{prepare,C1.gauss-method}
+\alias{panel,C1.gauss-method}
+
+\title{Class \code{C1.gauss}}
+
+\description{
+  A class for the creation and display of a numeric score using gauss' curves.
+}
+
+\section{Objects from the Class}{
+  \code{C1.gauss} objects can be created by calls of the form \code{new("C1.gauss", ...)}.
+  
+  The regular usage in this package is to use the \code{s1d.gauss} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
+      \item{\code{fac}: a factor for \code{score} splitting in the form of a vector, a factor, a name or a matching call.}
+      \item{\code{wt}: a vector of weights for \code{score}}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class.
+      The specific slots for \code{C1.gauss} objects are: \itemize{
+      \item{\code{fill}: a logical to yield the gauss curves transparent.}
+      \item{\code{col}: a logical, a color or a colors vector to color labels, rugs, lines and polygons.}
+      \item{\code{steps}: a value for the number of segments used to draw Gauss curves.}
+    }}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations. 
+      The specific slots for \code{C1.gauss} objects are: \itemize{
+      \item{\code{means}: the weighted mean calculated for each \code{fac} value.}
+      \item{\code{var}: the weighted variance calculated for each \code{fac} value.}
+      \item{\code{gausscurves}: the density gauss curve calculated for each \code{fac} value.}
+    }}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters.
+      The specific slot for \code{C1.gauss} objects is: \itemize{
+      \item{\code{rug}: an index value indicating where the rugs are drawn}
+    }}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.C1}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.C1}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.C1}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.C1}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.C1"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{C1.gauss} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "C1.gauss")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.C1}), modifies some graphical parameters used by default and 
+      calculates the Gauss curves according to the numeric score and the values' categories (using weighted mean and standard deviation).}
+      
+    \item{panel}{\code{signature(object = "C1.gauss")}: 
+      draws Gauss curves and level names of each curve.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.C1}}
+  \code{\link{s1d.gauss}}
+}
+
+\examples{
+showClass("C1.gauss")
+}
+
+\keyword{classes}
diff --git a/man/C1.hist-class.Rd b/man/C1.hist-class.Rd
new file mode 100644
index 0000000..7d206d3
--- /dev/null
+++ b/man/C1.hist-class.Rd
@@ -0,0 +1,92 @@
+\name{C1.hist-class}
+\docType{class}
+
+\alias{C1.hist}
+\alias{C1.hist-class}
+\alias{prepare,C1.hist-method}
+\alias{panel,C1.hist-method}
+
+\title{Class \code{C1.hist}}
+
+\description{
+  A class for the creation and display of a numeric score using a histogram.
+}
+
+\section{Objects from the Class}{
+  \code{C1.hist} objects can be created by calls of the form \code{new("C1.hist", ...)}.
+  
+  The regular usage in this package is to use the \code{s1d.hist} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{score}: the displayed values in the form of a vector, a factor, a name or a matching call.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+    
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class.
+      The specific slots for \code{C1.hist} objects are: \itemize{
+      \item{\code{breaks}: a vector of values to split \code{score}. If \code{NULL}, \code{pretty(score, nclass)} is used.}
+      \item{\code{nclass}: an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
+      \item{\code{type}: a value among \code{count}, \code{density}, \code{percent} to indicate the unit of the cell height.}
+      \item{\code{right}: a logical indicating if the histogram cells are right-closed (left open) intervals.}
+     }}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations.
+      The specific slots for \code{C1.hist} objects are: \itemize{
+        \item{\code{heights}: the cell height.}
+        \item{\code{breaks}: the cell boundaries.}
+    }}
+
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.C1}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.C1}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.C1}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.C1}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.C1"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{C1.hist} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "C1.hist")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.C1}), modifies some graphical parameters used by default 
+      and calculates the boundaries and the height of cells.}
+      
+    \item{panel}{\code{signature(object = "C1.hist")}: 
+      draws rectangles.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.C1}}
+  \code{\link{s1d.hist}}
+}
+
+\examples{
+showClass("C1.hist")
+}
+
+\keyword{classes}
diff --git a/man/C1.interval-class.Rd b/man/C1.interval-class.Rd
new file mode 100644
index 0000000..856474e
--- /dev/null
+++ b/man/C1.interval-class.Rd
@@ -0,0 +1,85 @@
+\name{C1.interval-class}
+\docType{class}
+
+\alias{C1.interval}
+\alias{C1.interval-class}
+\alias{prepare,C1.interval-method}
+\alias{panel,C1.interval-method}
+
+\title{Class \code{C1.interval}}
+
+\description{
+  A class for the creation and display of an interval between two numeric scores.
+}
+
+\section{Objects from the Class}{
+  \code{C1.interval} objects can be created by calls of the form \code{new("C1.interval", ...)}.
+  
+  The regular usage in this package is to use the \code{s1d.interval} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{score}: the displayed values in the form of a vector, a factor, a name or a matching call.}
+      \item{\code{at}: the index value.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+    
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.C1} class.
+      The specific slot for \code{C1.density} objects is: \itemize{
+      \item{\code{method}: a value, \code{bars} or \code{area}, to represent either segments or areas between scores.}
+    }}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations}
+
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.C1}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.C1}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.C1}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.C1}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.C1"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{C1.interval} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "C1.interval")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default.}
+      
+    \item{panel}{\code{signature(object = "C1.interval")}: 
+      draws segments or polygons.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.C1}}
+  \code{\link{s1d.interval}}
+}
+
+\examples{
+showClass("C1.interval")
+}
+
+\keyword{classes}
diff --git a/man/S1.boxplot-class.Rd b/man/S1.boxplot-class.Rd
new file mode 100644
index 0000000..e1fe7ac
--- /dev/null
+++ b/man/S1.boxplot-class.Rd
@@ -0,0 +1,90 @@
+\name{S1.boxplot-class}
+\docType{class}
+
+\alias{S1.boxplot}
+\alias{S1.boxplot-class}
+\alias{prepare,S1.boxplot-method}
+\alias{panel,S1.boxplot-method}
+\alias{setlatticecall,S1.boxplot-method}
+
+\title{Class \code{S1.boxplot}}
+
+\description{
+  A class for the representation of the link between a variable and a qualitative variable using box-and-whisker plots.
+}
+
+\section{Objects from the Class}{
+  \code{S1.boxplot} objects can be created by calls of the form \code{new("S1.boxplot", ...)}.
+  
+  The regular usage in this package is to use the \code{s1d.boxplot} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
+      \item{\code{fac}: a factor for \code{score} splitting in the form of a vector, a factor, a name or a matching call.}
+      \item{\code{at}: the index value.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+      
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S1} class.
+      The specific slot for \code{S1.boxplot} objects is: \itemize{
+      \item{\code{col}: a \code{NULL} value, a color or a colors vector to color points, labels, lines and polygons.}
+    }}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations}
+
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S1}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S1}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S1}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S1}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S1"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S1.boxplot} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S1.boxplot")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default.}
+    
+    \item{panel}{\code{signature(object = "S1.boxplot")}: 
+      draws box-and-wiskers diagrams, mean points and labels.}
+      
+    \item{setlatticecall}{\code{signature(object = "S1.boxplot")}: 
+      prepares the \code{lattice.call} slot}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S1}}
+  \code{\link{s1d.boxplot}}
+}
+
+\examples{
+showClass("S1.boxplot")
+}
+
+\keyword{classes}
diff --git a/man/S1.class-class.Rd b/man/S1.class-class.Rd
new file mode 100644
index 0000000..8da8faa
--- /dev/null
+++ b/man/S1.class-class.Rd
@@ -0,0 +1,95 @@
+\name{S1.class-class}
+\docType{class}
+
+\alias{S1.class}
+\alias{S1.class-class}
+\alias{prepare,S1.class-method}
+\alias{panel,S1.class-method}
+
+\title{Class \code{S1.class}}
+
+\description{
+  A class for the creation and display of a numeric score aggregated in class by an associated factor.
+}
+
+\section{Objects from the Class}{
+  \code{S1.class} objects can be created by calls of the form \code{new("S1.class", ...)}.
+  
+  The regular usage in this package is to use the \code{s1d.class} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
+      \item{\code{fac}: a factor for \code{score} splitting in the form of a vector, a factor, a name or a matching call.}
+      \item{\code{wt}: a vector of weights for \code{score}}
+      \item{\code{labels}: the labels' names drawn for each class.}
+      \item{\code{at}: the index value.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S1} class.
+      The specific slots for \code{S1.class} objects are: \itemize{
+      \item{\code{col}: a \code{NULL} value, a color or a colors vector to color points, labels and lines.}
+      \item{\code{poslabel}: the label position of each class, it can be \code{regular} or \code{value}.}
+    }}
+
+    \item{\code{stats}}{a list of internal preliminary calculations. 
+      The specific slot for \code{S1.class} objects is: \itemize{
+      \item{\code{means}: the weighted mean calculated for each \code{fac} value.} 
+    }}
+
+    \item{\code{s.misc}}{a list of some others internal parameters.
+    The specific slot for \code{S1.class} objects is: \itemize{
+      \item{\code{rug}: an index value indicating where the rugs are drawn.}
+    }}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S1}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S1}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S1}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S1}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S1"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S1.class} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S1.class")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default.}
+    
+    \item{panel}{\code{signature(object = "S1.class")}: 
+      draws labels and lines matching with score values.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S1}}
+  \code{\link{s1d.class}}
+}
+
+\examples{
+showClass("S1.class")
+}
+
+\keyword{classes}
diff --git a/man/S1.distri-class.Rd b/man/S1.distri-class.Rd
new file mode 100644
index 0000000..9835c32
--- /dev/null
+++ b/man/S1.distri-class.Rd
@@ -0,0 +1,92 @@
+\name{S1.distri-class}
+\docType{class}
+
+\alias{S1.distri}
+\alias{S1.distri-class}
+\alias{prepare,S1.distri-method}
+\alias{panel,S1.distri-method}
+
+\title{Class \code{S1.distri}}
+
+\description{
+  A class for the representation of a set of distributions on a numeric score.
+}
+
+\section{Objects from the Class}{
+  \code{S1.distri} objects can be created by calls of the form \code{new("S1.distri", ...)}.
+  
+  The regular usage in this package is to use the \code{s1d.distri} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
+      \item{\code{dfdistri}: the mass distribution in which each column is a class.}
+      \item{\code{labels}: the labels' names drawn for each distribution.}
+      \item{\code{at}: the index value.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+      
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S1} class.
+      The specific slots for \code{S1.distri} objects are: \itemize{
+      \item{\code{sdSize}: the size of the standard deviation segments.}
+      \item{\code{yrank}: a logical to draw the distributions sorted by means ascending order.}
+    }}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations. 
+      The specific slots for \code{S1.distri} objects are: \itemize{
+      \item{\code{means}: the weighted mean calculated for each distribution.} 
+      \item{\code{sds}: the weighted variance calculated for each distribution.}
+    }}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S1}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S1}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S1}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S1}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S1"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S1.distri} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S1.distri")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S1}), modifies some graphical parameters used by default and calculates weighted mean and standard deviation.}
+    
+    \item{panel}{\code{signature(object = "S1.distri")}: 
+      draws mean points and segments with matching labels.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S1}}
+  \code{\link{s1d.distri}}
+} 
+
+\examples{
+showClass("S1.distri")
+}
+
+\keyword{classes}
diff --git a/man/S1.label-class.Rd b/man/S1.label-class.Rd
new file mode 100644
index 0000000..e6a4577
--- /dev/null
+++ b/man/S1.label-class.Rd
@@ -0,0 +1,89 @@
+\name{S1.label-class}
+\docType{class}
+
+\alias{S1.label}
+\alias{S1.label-class}
+\alias{prepare,S1.label-method}
+\alias{panel,S1.label-method}
+
+\title{Class \code{S1.label}}
+
+\description{
+  A class for the creation and display of a numeric score with labels.
+}
+
+\section{Objects from the Class}{
+  \code{S1.label} objects can be created by calls of the form \code{new("S1.label", ...)}.
+  
+  The regular usage in this package is to use the \code{s1d.label} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
+      \item{\code{labels}: the labels' names drawn for each \code{score} value.}
+      \item{\code{at}: the index value.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+      
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S1} class.
+      The specific slot for \code{S1.class} objects is: \itemize{
+      \item{\code{poslabel}: the label position of each \code{score} value, it can be "regular" or "value".}
+    }}
+
+    \item{\code{stats}}{a list of internal preliminary calculations}
+
+    \item{\code{s.misc}}{a list of some others internal parameters.
+    The specific slot for \code{S1.label} objects is: \itemize{
+      \item{\code{rug}: an index value indicating where the rugs are drawn.}
+    }}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S1}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S1}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S1}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S1}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S1"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S1.label} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S1.label")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default.}
+    
+    \item{panel}{\code{signature(object = "S1.label")}: 
+      draws labels and its links with score points.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S1}}
+  \code{\link{s1d.label}}
+}
+
+\examples{
+showClass("S1.label")
+}
+
+\keyword{classes}
diff --git a/man/S1.match-class.Rd b/man/S1.match-class.Rd
new file mode 100644
index 0000000..030f484
--- /dev/null
+++ b/man/S1.match-class.Rd
@@ -0,0 +1,86 @@
+\name{S1.match-class}
+\docType{class}
+
+\alias{S1.match}
+\alias{S1.match-class}
+\alias{prepare,S1.match-method}
+\alias{panel,S1.match-method}
+
+\title{Class \code{S1.match}}
+
+\description{
+  A class for the creation and display of paired scores.
+}
+
+\section{Objects from the Class}{
+  \code{S1.match} objects can be created by calls of the form \code{new("S1.match", ...)}.
+  
+  The regular usage in this package is to use the \code{s1d.match} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{score}: the displayed values in the form of a numeric vector, a name or a matching call.}
+      \item{\code{labels}: the labels' names drawn for each score.}
+      \item{\code{at}: the index value.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+    
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S1} class.}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations}
+
+    \item{\code{s.misc}}{a list of some others internal parameters.
+    The specific slot for \code{S1.match} objects is: \itemize{
+      \item{\code{rug}: an index value indicating where the rugs are drawn.}
+    }}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S1}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S1}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S1}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S1}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S1"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S1.match} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S1.match")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default.}
+    
+    \item{panel}{\code{signature(object = "S1.match")}: 
+      draws score points and matching segments and labels.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S1}}
+  \code{\link{s1d.match}}
+}
+
+\examples{
+showClass("S1.match")
+}
+
+\keyword{classes}
diff --git a/man/S2.arrow-class.Rd b/man/S2.arrow-class.Rd
new file mode 100644
index 0000000..a8a0012
--- /dev/null
+++ b/man/S2.arrow-class.Rd
@@ -0,0 +1,90 @@
+\name{S2.arrow-class}
+\docType{class}
+
+\alias{S2.arrow}
+\alias{S2.arrow-class}
+\alias{prepare,S2.arrow-method}
+\alias{panel,S2.arrow-method}
+
+\title{Class \code{S2.arrow}}
+
+\description{
+  A class for creating and drawing bi-dimensional plot with arrows from the origin to the coordinates and labeled. 
+}
+
+\section{Objects from the Class}{
+  \code{S2.arrow} objects can be created by calls of the form \code{new("S2.arrow", ...)}.
+  
+  The regular usage in this package is to use the \code{s.arrow} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
+      \item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
+      \item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
+      \item{\code{labels}: a vector containing the arrows' labels.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+    
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
+      The specific slot for \code{S2.arrow} objects is: \itemize{
+      \item{\code{Sp}: a spatial object stem from \code{Sp} package.}
+    }}
+
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters:
+      \itemize{
+        \item{\code{lim.update}: a logical indicating if the limits are updating}
+    }}
+
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S2}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S2.arrow} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S2.arrow")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates limits.}
+      
+    \item{panel}{\code{signature(object = "S2.arrow")}: 
+      draws points, arrows and labels.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S2}}
+  \code{\link{s.arrow}}
+}
+
+\examples{
+showClass("S2.arrow")
+}
+
+\keyword{classes}
diff --git a/man/S2.class-class.Rd b/man/S2.class-class.Rd
new file mode 100644
index 0000000..78a5dc7
--- /dev/null
+++ b/man/S2.class-class.Rd
@@ -0,0 +1,101 @@
+\name{S2.class-class}
+\docType{class}
+
+\alias{S2.class-class}
+\alias{S2.class}
+\alias{prepare,S2.class-method}
+\alias{panel,S2.class-method}
+
+\title{Class \code{S2.class}}
+
+\description{
+  A class for group representation in bi-dimensional plot.
+}
+
+\section{Objects from the Class}{
+  \code{S2.class} objects can be created by calls of the form \code{new("S2.class", ...)}.
+  
+  The regular usage in this package is to use the \code{s.class} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
+      \item{\code{fac}: a factor (or a matrix of factors) splitting the rows of \code{dfxy}.}
+      \item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
+      \item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
+      \item{\code{wt}: a vector of weights for \code{fac}.}
+      \item{\code{labels}: a vector containing the class' labels.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
+      The specific slots for \code{S2.class} objects are: \itemize{
+        \item{\code{ellipseSize}: a positive number for ellipse size.}
+        \item{\code{starSize}: a number between 0 and 1 for star size.}
+        \item{\code{chullSize}: \code{NULL} or a vector of numbers between 0 and 1 for the convex hulls.}
+        \item{\code{col}: a \code{NULL} value, a color or a colors vector to color points, ellipses, labels, lines and polygons.}
+    }}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations. 
+      The specific slots for \code{S2.class} objects are: \itemize{
+        \item{\code{means}: a matrix containing the weighted mean calculated for each \code{fac} value.}
+        \item{\code{covvar}: a list containing the weighted variance-covariance matrices calculated for each \code{fac} value.}
+    }}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters:
+      \itemize{
+        \item{\code{ellipses}: ellipses' coordinates.}
+        \item{\code{chullcoord}: convex hulls' coordinates.}
+    }}
+
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S2}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S2.class} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S2.class")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by 
+      default and calculates ellipses, convex hulls and centroids.}
+      
+    \item{panel}{\code{signature(object = "S2.class")}: 
+      draws ellipses, convex hulls, stars, labels and points.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S2}}
+  \code{\link{s.class}}
+}
+
+\examples{
+showClass("S2.class")
+}
+
+\keyword{classes}
diff --git a/man/S2.corcircle-class.Rd b/man/S2.corcircle-class.Rd
new file mode 100644
index 0000000..2b0100c
--- /dev/null
+++ b/man/S2.corcircle-class.Rd
@@ -0,0 +1,91 @@
+\name{S2.corcircle-class}
+\docType{class}
+
+\alias{S2.corcircle}
+\alias{S2.corcircle-class}
+\alias{prepare,S2.corcircle-method}
+\alias{panel,S2.corcircle-method}
+
+\title{Class \code{S2.corcircle}}
+
+\description{
+  A class for creating and drawing a correlation circle.
+}
+
+\section{Objects from the Class}{
+  \code{S2.corcircle} objects can be created by calls of the form \code{new("S2.corcircle", ...)}.
+  
+  The regular usage in this package is to use the \code{s.corcircle} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
+      \item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
+      \item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
+      \item{\code{labels}: a vector containing the points' labels.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+    
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
+      The specific slot for \code{S2.corcircle} objects is: \itemize{
+      \item{\code{fullcircle}: a logical to include the complete circle (limits are then c(-1, 1)).}
+    }}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters:
+      \itemize{
+        \item{\code{backgrid}: a list of elements for grid lines}
+    }}
+
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S2}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S2.corcircle} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S2.corcircle")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and prepares the drawn grid.}
+      
+    \item{panel}{\code{signature(object = "S2.corcircle")}: 
+      draws arrows, labels and axes.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S2}}
+  \code{\link{s.corcircle}}
+}
+
+\examples{
+showClass("S2.corcircle")
+}
+
+\keyword{classes}
+
diff --git a/man/S2.density-class.Rd b/man/S2.density-class.Rd
new file mode 100644
index 0000000..565be5c
--- /dev/null
+++ b/man/S2.density-class.Rd
@@ -0,0 +1,96 @@
+\name{S2.density-class}
+\docType{class}
+
+\alias{S2.density}
+\alias{S2.density-class}
+\alias{prepare,S2.density-method}
+\alias{panel,S2.density-method}
+
+\title{Class \code{S2.density}}
+
+\description{
+  A class for the creation and display of bi-dimensional plot with density estimation. 
+}
+
+\section{Objects from the Class}{
+  \code{S2.density} objects can be created by calls of the form \code{new("S2.density", ...)}.
+  
+  The regular usage in this package is to use the \code{s.density} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
+      \item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
+      \item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
+      The specific slots for \code{S2.density} objects are: \itemize{
+        \item{\code{bandwidth}: bandwidth for density calculations which is passed in parameters in the \code{bkde2D} function of the \code{KernSmooth} package.}
+        \item{\code{gridsize}: grid dimension.}
+        \item{\code{threshold}: a value between 0 and 1 to draw densities greater than this threshold. No density is visible whether it is equal to 1.}
+        \item{\code{col}: a \code{NULL} value, a color or a colors vector to color densities.}
+        \item{\code{nrpoints}: number of points on the density image.}
+        \item{\code{contour}: a logical to draw contour lines.}
+        \item{\code{region}: a logical to fill grid regions with \code{col}.}
+        \item{\code{nclass}: number of class for density.}
+    }}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations. 
+      The specific slot for \code{S2.density} objects is: \itemize{
+        \item{\code{densit}: a list containing the results of the \code{bkde2D} function.}
+    }}
+
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S2}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S2.density} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S2.density")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates densities.}
+      
+    \item{panel}{\code{signature(object = "S2.density")}: 
+      draws densities and external points.}
+  }
+}  
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}} 
+  \code{\linkS4class{ADEg.S2}} 
+  \code{\link{s.density}}
+}
+
+\examples{
+showClass("S2.density")
+}
+
+\keyword{classes}
diff --git a/man/S2.distri-class.Rd b/man/S2.distri-class.Rd
new file mode 100644
index 0000000..6e85394
--- /dev/null
+++ b/man/S2.distri-class.Rd
@@ -0,0 +1,96 @@
+\name{S2.distri-class}
+\docType{class}
+
+\alias{S2.distri}
+\alias{S2.distri-class}
+\alias{prepare,S2.distri-method}
+\alias{panel,S2.distri-method}
+
+\title{Class \code{S2.distri}}
+
+\description{
+  A class for distributions on a numeric score using a mean-standard deviation display.
+}
+
+\section{Objects from the Class}{
+  \code{S2.distri} objects can be created by calls of the form \code{new("S2.distri", ...)}.
+  
+  The regular usage in this package is to use the \code{s.distri} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
+      \item{\code{dfdistri}: the mass distribution in which each column is a class.}
+      \item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
+      \item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
+       \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
+      The specific slots for \code{S2.distri} objects are: \itemize{
+        \item{\code{ellipseSize}: \code{NULL} or number between 0 and 1 for ellipse size.}
+        \item{\code{starSize}: \code{NULL} or number between 0 and 1 for star size.}
+        \item{\code{col}: a \code{NULL} value, a color or a colors vector to color ellipses, labels, lines and polygons.}
+    }}
+
+    \item{\code{stats}}{a list of internal preliminary calculations. 
+      The specific slots for \code{S2.distri} objects are: \itemize{
+        \item{\code{means}: a matrix containing the weighted mean calculated for each class in\code{dfdistri}.}
+        \item{\code{covvar}: a list containing the weighted variance-covariance matrices calculated for each class in\code{dfdistri}.}
+    }}
+
+    \item{\code{s.misc}}{a list of some others internal parameters:
+      \itemize{
+        \item{\code{ellipses}: ellipses' coordinates.}
+    }}
+
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S2}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S2.distri} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S2.distri")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates ellipses and centroids.}
+      
+    \item{panel}{\code{signature(object = "S2.distri")}: 
+      draws ellipses, stars, labels and points.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S2}}
+  \code{\link{s.distri}}
+}
+
+\examples{
+showClass("S2.distri")
+}
+
+\keyword{classes}
diff --git a/man/S2.image-class.Rd b/man/S2.image-class.Rd
new file mode 100644
index 0000000..9866f79
--- /dev/null
+++ b/man/S2.image-class.Rd
@@ -0,0 +1,98 @@
+\name{S2.image-class}
+\docType{class}
+
+\alias{S2.image}
+\alias{S2.image-class}
+\alias{prepare,S2.image-method}
+\alias{panel,S2.image-method}
+
+\title{Class \code{S2.image}}
+
+\description{
+  A class for the creation of a bi-dimensional plot with a third value represented as a continuous colored surface.
+}
+
+\section{Objects from the Class}{
+  \code{S2.image} objects can be created by calls of the form \code{new("S2.image", ...)}.
+  
+  The regular usage in this package is to use the \code{s.image} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
+      \item{\code{z}: a vector (or a matrix) of values on the \code{dfxy} rows.}
+      \item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
+      \item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
+      The specific slots for \code{S2.image} objects are: \itemize{
+        \item{\code{gridsize}: a 1 or 2-length vector indicating the cell numbers (horizontally and vertically) of the grid for the colored surface.}
+        \item{\code{outsideLimits}: specific limits for the surface as a set of polygons. It must be an \code{SpatialPolygons} object. Hole are authorized.}
+        \item{\code{span}: a value to control the degree of smoothing.}
+        \item{\code{contour}: a logical to draw contour lines.}
+        \item{\code{region}: a logical to fill inter-contour regions.}
+        \item{\code{col}: a \code{NULL} value, a color or a colors vector used for the colored cells.}
+    }}
+
+    \item{\code{stats}}{a list of internal preliminary calculations. 
+      The specific slot for \code{S2.image} objects is: \itemize{
+        \item{\code{value}: a prediction value yielded by a local polynomial regression fitting.}
+    }}
+
+    \item{\code{s.misc}}{a list of some others internal parameters:
+      \itemize{
+        \item{\code{newgrid}: the grid expansion calculated within the prepare method.}
+    }}
+
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S2}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S2.image} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S2.image")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates grid expansion and limits.}
+      
+    \item{panel}{\code{signature(object = "S2.image")}: 
+      draws raster image.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S2}}
+  \code{\link{s.image}}
+}
+
+\examples{
+showClass("S2.image")
+}
+
+\keyword{classes}
diff --git a/man/S2.label-class.Rd b/man/S2.label-class.Rd
new file mode 100644
index 0000000..3851532
--- /dev/null
+++ b/man/S2.label-class.Rd
@@ -0,0 +1,84 @@
+\name{S2.label-class}
+\docType{class}
+
+\alias{S2.label}
+\alias{S2.label-class}
+\alias{prepare,S2.label-method}
+\alias{panel,S2.label-method}
+
+\title{Class \code{S2.label}}
+
+\description{
+  A class for creating and drawing bi-dimensional plot with point label.
+}
+
+\section{Objects from the Class}{
+  \code{S2.label} objects can be created by calls of the form \code{new("S2.label", ...)}.
+  
+  The regular usage in this package is to use the \code{s.label} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
+      \item{\code{labels}: a vector of character strings for the points' labels}
+      \item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
+      \item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object.
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S2}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S2.label} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S2.label")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default.}
+      
+    \item{panel}{\code{signature(object = "S2.label")}: 
+      draws points and labels.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S2}}
+  \code{\link{s.label}}
+}
+
+\examples{
+showClass("S2.label")
+}
+
+\keyword{classes}
diff --git a/man/S2.logo-class.Rd b/man/S2.logo-class.Rd
new file mode 100644
index 0000000..74fb7e6
--- /dev/null
+++ b/man/S2.logo-class.Rd
@@ -0,0 +1,87 @@
+\name{S2.logo-class}
+\docType{class}
+
+\alias{S2.logo}
+\alias{S2.logo-class}
+\alias{prepare,S2.logo-method}
+\alias{panel,S2.logo-method}
+
+\title{Class \code{S2.logo}}
+
+\description{
+  A class for the creation of a bi-dimensional plot with pictures for points representation.
+}
+
+\section{Objects from the Class}{
+  \code{S2.logo} objects can be created by calls of the form \code{new("S2.logo", ...)}.
+  
+  The regular usage in this package is to use the \code{s.logo} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
+      \item{\code{logos}: a list containing the picture to use for each point.}
+      \item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
+      \item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
+      The specific slot for \code{S2.logo} objects is: \itemize{
+        \item{\code{rect}: a logical to frame \code{logos}.}
+    }}
+
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S2}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S2.class} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S2.class")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default.}
+      
+    \item{panel}{\code{signature(object = "S2.class")}: 
+      displays the logos.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S2}}
+  \code{\link{s.logo}}
+}
+
+\examples{
+showClass("S2.logo")
+}
+
+\keyword{classes}
diff --git a/man/S2.match-class.Rd b/man/S2.match-class.Rd
new file mode 100644
index 0000000..8828d71
--- /dev/null
+++ b/man/S2.match-class.Rd
@@ -0,0 +1,87 @@
+\name{S2.match-class}
+\docType{class}
+
+\alias{S2.match}
+\alias{S2.match-class}
+\alias{prepare,S2.match-method}
+\alias{panel,S2.match-method}
+
+\title{Class \code{S2.match}}
+
+\description{
+  A class for the creation and display of paired coordinates in a bi-dimensional plot.
+}
+
+\section{Objects from the Class}{
+  \code{S2.match} objects can be created by calls of the form \code{new("S2.match", ...)}.
+  
+  The regular usage in this package is to use the \code{s.match} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
+      \item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
+      \item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
+      \item{\code{labels}: a vector of character strings containing the matches' labels.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
+      The specific slot for \code{S2.match} objects is: \itemize{
+        \item{\code{arrows}: a logical to draw arrows.}
+    }}
+
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S2}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S2.match} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S2.match")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default.}
+      
+    \item{panel}{\code{signature(object = "S2.match")}: 
+      draws arrows and labels.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S2}}
+  \code{\link{s.match}}
+}
+
+\examples{
+showClass("S2.match")
+}
+
+\keyword{classes}
diff --git a/man/S2.traject-class.Rd b/man/S2.traject-class.Rd
new file mode 100644
index 0000000..1bd590d
--- /dev/null
+++ b/man/S2.traject-class.Rd
@@ -0,0 +1,89 @@
+\name{S2.traject-class}
+\docType{class}
+
+\alias{S2.traject}
+\alias{S2.traject-class}
+\alias{prepare,S2.traject-method}
+\alias{panel,S2.traject-method}
+
+\title{Class \code{S2.traject}}
+
+\description{
+  A class for the creation of a bi-dimensional plot with trajectories linking the points.
+}
+
+\section{Objects from the Class}{
+  \code{S2.traject} objects can be created by calls of the form \code{new("S2.traject", ...)}.
+  
+  The regular usage in this package is to use the \code{s.traject} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
+      \item{\code{fac}: a factor (or a matrix of factors) splitting the rows of \code{dfxy}.}
+      \item{\code{labels}: a vector of character strings containing the trajectories' labels.}
+      \item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
+      \item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
+      The specific slots for \code{S2.traject} objects are: \itemize{
+        \item{\code{order}: a vector containing the drawing order of the trajectories. A vector of length equal to factor.}
+        \item{\code{col}: a \code{NULL} value, a color or a colors vector to color points, labels and lines.}
+    }}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S2}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S2.traject} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S2.traject")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default.}
+      
+    \item{panel}{\code{signature(object = "S2.traject")}: 
+      draws points, arrows and labels.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S2}}
+  \code{\link{s.traject}}
+}
+
+\examples{
+showClass("S2.traject")
+}
+
+\keyword{classes}
diff --git a/man/S2.value-class.Rd b/man/S2.value-class.Rd
new file mode 100644
index 0000000..ed37ced
--- /dev/null
+++ b/man/S2.value-class.Rd
@@ -0,0 +1,109 @@
+\name{S2.value-class}
+\docType{class}
+
+\alias{S2.value}
+\alias{S2.value-class}
+\alias{prepare,S2.value-method}
+\alias{panel,S2.value-method}
+
+\title{Class \code{S2.value}}
+
+\description{
+  A class for the creation and display of bi-dimensional plot with a third value represented (as a variable) by symbols.
+}
+
+\section{Objects from the Class}{
+  \code{S2.value} objects can be created by calls of the form \code{new("S2.value", ...)}.
+  
+  The regular usage in this package is to use the \code{s.value} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}:}{a list containing data or data's name. \itemize{
+      \item{\code{dfxy}: the displayed values in the form of a data frame, a name or a matching call.}
+      \item{\code{z}: a vector (or a matrix) with as many values as rows in \code{dfxy}.}
+      \item{\code{xax}: an integer or a vector indicating the columns of \code{dfxy} kept for the x-axes.}
+      \item{\code{yax}: an integer or a vector indicating the columns of \code{dfxy} kept for the y-axes.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.S2} class.
+      The specific slots for \code{S2.value} objects are: \itemize{
+        \item{\code{method}: the method of representation for \code{z} (color shading or proportional size).}
+        \item{\code{symbol}: the type of symbol (square or circle).}
+        \item{\code{center}: a center value for method \code{size}.}
+        \item{\code{centerpar}: a logical or a list to represent center value using elements in the 
+          \code{adegpar("ppoints")} list.}
+        \item{\code{breaks}: a vector containing the breaks used for splitting \code{z} value. If \code{NULL}, \code{pretty(z, n)} is used.}
+        \item{\code{nclass}: an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
+        \item{\code{col}: a \code{NULL} value, a color or a colors vector to color symbols.}
+     
+    }}
+
+    \item{\code{stats}}{a list of internal preliminary calculations}
+
+    \item{\code{s.misc}}{a list of some others internal parameters:
+      \itemize{
+        \item{\code{plegend.update}: a logical indicating if the legend parameters are updating}
+        \item{\code{breaks.update}: a logical indicating if the legend breaks are updating}
+        \item{\code{lim.update}: a logical indicating if the limits are updating}
+    }}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.S2}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.S2}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.S2}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.S2}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.S2"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{S2.value} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "S2.value")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates limits.}
+      
+    \item{panel}{\code{signature(object = "S2.value")}: 
+      draws symbols.}
+  }
+}
+
+\note{
+  For the symbol size, if the method is \code{size}, we use perceptual scaling (Tanimura et al. 2006).  
+}
+
+\references{
+  Tanimura, S. and Kuroiwa, C. and Mizota, T. 2006. Proportional symbol
+  mapping in R. \emph{Journal of Statistical Software}. \bold{15}, 1--7
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.S2}}
+  \code{\link{s.value}}
+}
+
+\examples{
+showClass("S2.value")
+}
+
+\keyword{classes}
diff --git a/man/T.cont-class.Rd b/man/T.cont-class.Rd
new file mode 100644
index 0000000..dc5b9ce
--- /dev/null
+++ b/man/T.cont-class.Rd
@@ -0,0 +1,89 @@
+\name{T.cont-class}
+\docType{class}
+
+\alias{T.cont}
+\alias{T.cont-class}
+\alias{panel,T.cont-method}
+
+\title{Class \code{T.cont}}
+
+\description{
+  A class for the representation of a contingency table object with statistical information (mean and regression lines).
+}
+
+\section{Objects from the Class}{
+  \code{T.cont} objects can be created by calls of the form \code{new("T.cont", ...)}.
+  
+  The regular usage in this package is to use the \code{table.value} function with a \code{table} object.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}:}{a list containing data or data's name. \itemize{
+      \item{\code{dftab}: a contingency table object in the form of a data frame, a name or a matching call}
+      \item{\code{coordsx}: an integer or a vector indicating the columns of \code{dftab} kept}
+      \item{\code{coordsy}: an integer or a vector indicating the rows of \code{dftab} kept}
+      \item{\code{labelsx}: the columns' labels}
+      \item{\code{labelsy}: the rows' labels}
+      \item{"\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{T.value} class.
+      The specific slots for \code{T.cont} objects are: \itemize{
+        \item{\code{meanX}: a logical to represent columns' means by points.}
+        \item{\code{meanY}: a logical to represent rows' means by points.}
+        \item{\code{ablineX}: a logical to represent columns' regression lines.}
+        \item{\code{ablineY}: a logical to represent columns' regression lines.}
+    }}
+  
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{T.value}}, directly.\cr
+  Class \code{\linkS4class{ADEg.T}}, by class \code{T.value}, distance 2.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{T.value}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{T.value}, distance 4.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{T.value}, distance 4.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"T.value"}, \code{"ADEg.T"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{T.cont} are: 
+  \describe{
+    \item{panel}{\code{signature(object = "T.cont")}: 
+      draws mean points and regression lines.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.T}}
+  \code{\linkS4class{T.value}}
+  \code{\link{table.value}}
+}
+
+\examples{
+showClass("T.cont")
+}
+
+\keyword{classes}
diff --git a/man/T.image-class.Rd b/man/T.image-class.Rd
new file mode 100644
index 0000000..8ba94cb
--- /dev/null
+++ b/man/T.image-class.Rd
@@ -0,0 +1,94 @@
+\name{T.image-class}
+\docType{class}
+
+\alias{T.image}
+\alias{T.image-class}
+\alias{prepare,T.image-method}
+\alias{panel,T.image-method}
+
+\title{Class \code{T.image}}
+
+\description{
+  A class for the representation of a matrix or table object in which values have different colors.
+}
+
+\section{Objects from the Class}{
+  \code{T.image} objects can be created by calls of the form \code{new("T.image", ...)}.
+  
+  The regular usage in this package is to use the \code{table.image} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dftab}: the displayed values which can be \code{table}, \code{dist} or \code{matrix}
+        in the form of a data frame, a name or a matching call}
+      \item{\code{coordsx}: an integer or a vector indicating the columns of \code{dftab} kept}
+      \item{\code{coordsy}: an integer or a vector indicating the rows of \code{dftab} kept}
+      \item{\code{labelsx}: columns labels}
+      \item{\code{labelsy}: rows labels}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+    
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.T} class.
+      The specific slots for \code{T.image} objects are: \itemize{
+      \item{\code{breaks}: a vector of values to split \code{dftab}. If \code{NULL}, \code{pretty(dftab, nclass)} is used.}
+      \item{\code{nclass}: an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
+      \item{\code{col}: a \code{NULL} value, a color or a colors vector used for the cells.}
+    }}
+
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters:
+      \itemize{
+        \item{\code{breaks.update}: a logical indicating if the legend breaks is updating.}
+    }}
+
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.T}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.T}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.T}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.T}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.T"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{T.image} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "T.image")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.T}) and modifies some graphical parameters used by default and calculates limits and grid.}
+    
+    \item{panel}{\code{signature(object = "T.image")}: 
+      draws raster image.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.T}}
+  \code{\link{table.image}}
+}
+
+\examples{
+showClass("T.image")
+}
+
+\keyword{classes}
diff --git a/man/T.value-class.Rd b/man/T.value-class.Rd
new file mode 100644
index 0000000..bec60d2
--- /dev/null
+++ b/man/T.value-class.Rd
@@ -0,0 +1,109 @@
+\name{T.value-class}
+\docType{class}
+
+\alias{T.value}
+\alias{T.value-class}
+\alias{prepare,T.value-method}
+\alias{panel,T.value-method}
+
+\title{Class \code{T.value}}
+
+\description{
+  A class for the representation of a matrix, a data frame, or a distance matrix using symbols, varying in size or color.
+}
+
+\section{Objects from the Class}{
+  \code{T.value} objects can be created by calls of the form \code{new("T.value", ...)}.
+  
+  The regular usage in this package is to use the \code{table.value} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}:}{a list containing data or data's name. \itemize{
+      \item{\code{dftab}: the displayed values which can be \code{table}, \code{dist} or \code{matrix}
+        in the form of a data frame, a name or a matching call}
+      \item{\code{coordsx}: an integer or a vector indicating the columns of \code{dftab} kept}
+      \item{\code{coordsy}: an integer or a vector indicating the rows of \code{dftab} kept}
+      \item{\code{labelsx}: the columns' labels}
+      \item{\code{labelsy}: the rows' labels}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.T} class.
+      The specific slots for \code{T.value} objects are: \itemize{
+      \item{\code{breaks}: a vector of values to split \code{dftab}. If \code{NULL}, \code{pretty(dftab, nclass)} is used.}
+      \item{\code{nclass}: an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
+      \item{\code{col}: a \code{NULL} value, a color or a colors vector to color symbols.}
+      \item{\code{method}: the method of representation for \code{dftab} (color shading or proportional size).}
+      \item{\code{symbol}: the type of symbol (square or circle).}
+      \item{\code{center}: a center value for method \code{size}.}
+      \item{\code{centerpar}: a logical or a list to represent center value using elements in the 
+        \code{adegpar("ppoints")} list.}
+    }}
+
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters:
+      \itemize{
+        \item{\code{breaks.update}: a logical indicating if the legend breaks is updating.}
+    }}
+
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.T}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.T}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.T}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.T}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.T"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{T.value} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "T.value")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.T}) and modifies some graphical parameters used by default and calculates limits and grid.}
+    
+    \item{panel}{\code{signature(object = "T.value")}: 
+      draws symbols.}
+  }
+}
+
+\note{
+  For the symbol size, if the method is \code{size}, we use perceptual scaling (Tanimura et al. 2006) .  
+}
+
+\references{
+  Tanimura, S. and Kuroiwa, C. and Mizota, T. 2006 Proportional symbol
+  mapping in R \emph{Journal of Statistical Software} \bold{15}, 1--7 
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}    
+  \code{\linkS4class{ADEg.T}}
+  \code{\linkS4class{T.cont}}
+  \code{\link{table.value}}
+}
+
+\examples{
+showClass("T.value")
+}
+
+\keyword{classes}
diff --git a/man/Tr.class-class.Rd b/man/Tr.class-class.Rd
new file mode 100644
index 0000000..a67ddb1
--- /dev/null
+++ b/man/Tr.class-class.Rd
@@ -0,0 +1,103 @@
+\name{Tr.class-class}
+\docType{class}
+
+\alias{Tr.class}
+\alias{Tr.class-class}
+\alias{prepare,Tr.class-method}
+\alias{panel,Tr.class-method}
+
+\title{Class \code{Tr.class}}
+
+\description{
+  A class for group representation in triangular plot.
+}
+
+\section{Objects from the Class}{
+  \code{Tr.class} objects can be created by calls of the form \code{new("Tr.class", ...)}.
+  
+  The regular usage in this package is to use the \code{triangle.class} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxyz}: the displayed values in the form of a data frame with three columns, a name or a matching call.}
+      \item{\code{fac}: a factor partitionning the rows of \code{dfxyz}.}
+      \item{\code{wt}: a vector of weights for \code{fac}.}
+      \item{\code{labels}: a vector containing the class' labels.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+  
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.Tr} class.
+      The specific slots for \code{Tr.class} objects are: \itemize{
+        \item{\code{ellipseSize}: a positive number for ellipse size.}
+        \item{\code{starSize}: a number between 0 and 1 for star size.}
+        \item{\code{chullSize}: \code{NULL} or a vector of numbers between 0 and 1 for the convex hulls.}
+        \item{\code{col}: a \code{NULL} value, a color or a colors vector to color points, ellipses, labels, lines and polygons.}
+        \item{\code{max3d} and \code{min3d}: vectors of three values for triangular maximal and minimal limits.}
+        \item{\code{adjust}: a logical to adjust the device with the limits of the smaller equilateral triangle containing the values.}
+    }}
+    
+    \item{\code{stats}}{a list of internal preliminary calculations. 
+      The specific slots for \code{S2.class} objects are: \itemize{
+        \item{\code{means}: a matrix containing the weighted mean calculated for each \code{fac} value.}
+        \item{\code{mean2d}: a matrix containing the weighted mean calculated for each \code{fac} value on two-dimension.}
+        \item{\code{covvar}: a list containing the weighted variance-covariance matrices calculated for each \code{fac} value.}
+        \item{\code{covvar2d}: a list containing the weighted variance-covariance matrices calculated for each \code{fac} value on two-dimension.}
+    }}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters:
+      \itemize{
+        \item{\code{ellipses}: ellipses' coordinates.}
+        \item{\code{chullcoord}: convex hulls' coordinates.}
+    }}
+
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.Tr}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.Tr}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.Tr}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.Tr}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.Tr"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{Tr.class} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "Tr.class")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.Tr}), modifies some graphical parameters used by 
+      default and calculates ellipses, convex hulls and centroids.}
+      
+    \item{panel}{\code{signature(object = "Tr.class")}: 
+      draws arrows, labels and points.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}
+  \code{\linkS4class{ADEg.Tr}}
+  \code{\link{triangle.class}}
+}
+
+\examples{
+showClass("Tr.class")
+}
+
+\keyword{classes}
diff --git a/man/Tr.label-class.Rd b/man/Tr.label-class.Rd
new file mode 100644
index 0000000..61e75fc
--- /dev/null
+++ b/man/Tr.label-class.Rd
@@ -0,0 +1,94 @@
+\name{Tr.label-class}
+\docType{class}
+
+\alias{Tr.label}
+\alias{Tr.label-class}
+\alias{prepare,Tr.label-method}
+\alias{panel,Tr.label-method}
+
+\title{Class \code{Tr.label}}
+
+\description{
+  A class for creating and drawing triangular plot with point label.
+}
+
+\section{Objects from the Class}{
+  \code{Tr.label} objects can be created by calls of the form \code{new("Tr.label", ...)}.
+  
+  The regular usage in this package is to use the \code{triangle.label} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxyz}: the displayed values in the form of a three columns data frame, a name or a matching call.}
+      \item{\code{labels}: a character vector containing labels for points.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+  
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.Tr} class.
+      The specific slots for \code{Tr.class} objects are: \itemize{
+        \item{\code{addmean}: a logical to plot the mean.}
+        \item{\code{addaxes}: a logical to draw the principal axes.}
+        \item{\code{meanpar}: a list to represent mean points using \code{pch}, \code{cex} and \code{col}.}
+        \item{\code{axespar}: a list to represent axes lines using \code{col}, \code{lwd} and \code{lty}.}
+        \item{\code{max3d} and \code{min3d}: vectors of three values for triangular maximal and minimal limits.}
+        \item{\code{adjust}: a logical to adjust the device with the limits of the smaller equilateral triangle containing the values.}
+    }}
+
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters:
+      \itemize{
+        \item{\code{cornerp}: coordinates of the triangle extremities.}
+    }}
+
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.Tr}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.Tr}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.Tr}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.Tr}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.Tr"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{Tr.label} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "Tr.label")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.Tr}), modifies some graphical parameters used 
+      by default and defines the mean point and the axes.}
+      
+    \item{panel}{\code{signature(object = "Tr.label")}: 
+      draws lines, labels and points.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}
+  \code{\linkS4class{ADEg.Tr}}
+  \code{\link{triangle.label}}
+}
+
+\examples{
+showClass("Tr.label")
+}
+
+\keyword{classes}
diff --git a/man/Tr.match-class.Rd b/man/Tr.match-class.Rd
new file mode 100644
index 0000000..8f748bc
--- /dev/null
+++ b/man/Tr.match-class.Rd
@@ -0,0 +1,86 @@
+\name{Tr.match-class}
+\docType{class}
+
+\alias{Tr.match}
+\alias{Tr.match-class}
+\alias{prepare,Tr.match-method}
+\alias{panel,Tr.match-method}
+
+\title{Class \code{Tr.match}}
+
+\description{
+  A class for the creation and display of paired coordinates in a triangular plot.
+}
+
+\section{Objects from the Class}{
+  \code{Tr.match} objects can be created by calls of the form \code{new("Tr.match", ...)}.
+  
+  The regular usage in this package is to use the \code{triangle.match} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxyz}: the displayed values in the form of a three columns data frame, a name or a matching call.}
+      \item{\code{labels}: a vector of character strings containing the matches' labels.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.Tr} class.
+      The specific slots for \code{Tr.match} objects are: \itemize{
+        \item{\code{max3d} and \code{min3d}: vectors of three values for triangular maximal and minimal limits.}
+        \item{\code{adjust}: a logical to adjust the device with the limits of the smaller equilateral triangle containing the values}
+    }}
+
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.Tr}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.Tr}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.Tr}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.Tr}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.Tr"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{Tr.match} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "Tr.match")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.Tr}) and modifies some graphical parameters used by default.}
+      
+    \item{panel}{\code{signature(object = "Tr.match")}: 
+      draws arrows, labels and points.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}
+  \code{\linkS4class{ADEg.Tr}}
+  \code{\link{triangle.match}}
+}
+
+\examples{
+showClass("Tr.match")
+}
+
+\keyword{classes}
diff --git a/man/Tr.traject-class.Rd b/man/Tr.traject-class.Rd
new file mode 100644
index 0000000..0282425
--- /dev/null
+++ b/man/Tr.traject-class.Rd
@@ -0,0 +1,90 @@
+\name{Tr.traject-class}
+\docType{class}
+
+\alias{Tr.traject}
+\alias{Tr.traject-class}
+\alias{prepare,Tr.traject-method}
+\alias{panel,Tr.traject-method}
+
+\title{Class \code{Tr.traject}}
+
+\description{
+  A class for the creation and display of triangular plot with trajectories linking the points.
+}
+
+\section{Objects from the Class}{
+  \code{Tr.traject} objects can be created by calls of the form \code{new("Tr.traject", ...)}.
+  
+  The regular usage in this package is to use the \code{triangle.traject} function.
+}
+
+\section{Slots}{
+  \describe{
+    \item{\code{data}}{a list containing data or data's name. \itemize{
+      \item{\code{dfxyz}: the displayed values in the form of a three columns data frame, a name or a matching call.}
+      \item{\code{fac}: a factor (or a matrix of factors) splitting the rows of \code{dfxyz}.}
+      \item{\code{labels}: a vector of character strings containing the trajectories' labels.}
+      \item{\code{frame}: a positive or null integer. It is the number of the frame containing the data (used 
+        with \code{sys.frame(..., env = data$frame)}). Only if the data are not stored (i.e. \code{data$storeData = FALSE}).}
+      \item{\code{storeData}: a logical indicating if the data should be stored in the returned object. 
+        If \code{FALSE}, only the names of the data arguments are stored.}
+    }}
+
+    \item{\code{trellis.par}}{a list of parameters for \code{lattice} call. 
+      It will be passed directly to \code{par.settings} arguments of the \code{lattice} function.}
+  
+    \item{\code{adeg.par}}{a list of graphical parameters, corresponding to the ones 
+      given by \code{adegpar()} function.}
+      
+    \item{\code{lattice.call}}{a list to create the \code{trellis} object.}
+
+    \item{\code{g.args}}{a list containing some method parameters linked with the created object of \code{ADEg.Tr} class.
+      The specific slots for \code{Tr.traject} objects are: \itemize{
+        \item{\code{max3d} and \code{min3d}: vectors of three values for triangular maximal and minimal limits.}
+        \item{\code{adjust}: a logical to adjust the device with the limits of the smaller equilateral triangle containing the values}
+        \item{\code{order}: a vector containing the drawing order of the trajectories. A vector of length equal to factor.}
+        \item{\code{col}: a \code{NULL} value, a color or a colors vector to color points, labels and lines.}
+        
+    }}
+
+    \item{\code{stats}}{a list of internal preliminary calculations}
+    
+    \item{\code{s.misc}}{a list of some others internal parameters}
+    
+    \item{\code{Call}}{an object of class \code{call}}
+  }
+}
+
+\section{Extends}{
+  Class \code{\linkS4class{ADEg.Tr}}, directly.\cr
+  Class \code{\linkS4class{ADEg}}, by class \code{ADEg.Tr}, distance 2.\cr
+  Class \code{\linkS4class{ADEgORtrellis}}, by class \code{ADEg.Tr}, distance 3.\cr
+  Class \code{\linkS4class{ADEgORADEgSORtrellis}}, by class \code{ADEg.Tr}, distance 3.
+}
+
+\section{Methods}{
+  The methods of the father classes \code{"ADEg.Tr"} and \code{"ADEg"} can be used by inheritance.
+  The specific methods for \code{Tr.traject} are: 
+  \describe{
+    \item{prepare}{\code{signature(object = "Tr.traject")}: 
+      calls the parent method (\code{prepare} for \code{ADEg.Tr}) and modifies some graphical parameters used by default.}
+      
+    \item{panel}{\code{signature(object = "Tr.traject")}: 
+      draws arrows, labels and points.}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}
+  \code{\linkS4class{ADEg.Tr}}
+  \code{\link{triangle.traject}}
+}
+
+\examples{
+showClass("Tr.traject")
+}
+
+\keyword{classes}
diff --git a/man/add.ADEg.Rd b/man/add.ADEg.Rd
new file mode 100644
index 0000000..4a180d9
--- /dev/null
+++ b/man/add.ADEg.Rd
@@ -0,0 +1,53 @@
+\name{add.ADEg}
+
+\alias{add.ADEg}
+\alias{add.ADEg-methods}
+
+\title{Superpose an new \code{ADEg} graph to the previous ones plotted}
+
+\description{
+  Adds an \code{ADEg} to the current \code{ADEg} or \code{ADEgS} plot. 
+}
+
+\usage{
+add.ADEg(object)
+}
+
+\arguments{
+  \item{object}{an \code{ADEg} object}
+}
+
+\details{
+  This function uses the last plotted \code{ADEg} or \code{ADEgS} object.\cr
+  It calls \code{\link{superpose}}.
+}
+
+\value{
+  an \code{ADEgS} object
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\link{superpose}}
+  \code{\linkS4class{ADEg}}
+  \code{\linkS4class{ADEgS}}
+}
+
+\examples{
+df1 <- cbind(rnorm(24), rnorm(24))
+df2 <- cbind(rnorm(24), rnorm(24))
+g1 <- s.label(df1, ppoints.col = "blue")
+g2 <- s.label(df2, ppoints.col = "red", plot = FALSE)
+add.ADEg(g2)
+
+data(jv73, package = "ade4")
+pca1 <- ade4::dudi.pca(jv73$morpho, scannf = FALSE)
+g5 <- s.label(pca1$li, plabels.optim = TRUE)
+g6 <- s.class(pca1$li, jv73$fac.riv, starSize = 0, ellipseSize = 0, chullSize = 1, 
+  ppolygons.alpha = 0.4, col = rainbow(12), ppoints.cex = 0, plot = FALSE)
+add.ADEg(g6)
+}
+
+\keyword{aplot}
diff --git a/man/addhist.Rd b/man/addhist.Rd
new file mode 100644
index 0000000..ee97a6e
--- /dev/null
+++ b/man/addhist.Rd
@@ -0,0 +1,96 @@
+\name{addhist}
+
+\alias{addhist}
+\alias{addhist-methods}
+\alias{addhist,ADEg.S2-method}
+
+\title{
+  Adds histograms and density lines against a bi-dimensional graphics.
+}
+
+\description{
+  Adds the two marginal histograms and density lines of each axis against an \code{ADEg.S2} object.  
+}
+
+\usage{
+addhist(object, bandwidth, gridsize = 60, kernel = "normal", cbreaks = 2, 
+  storeData = TRUE, plot = TRUE, pos = -1, ...)
+}
+
+\arguments{
+  \item{object}{an \code{ADEg.S2} object
+  }
+  \item{bandwidth}{used for the calculations of the density lines 
+    (see the \code{bkde} function of the \code{KernSmooth} package).
+  }
+  \item{gridsize}{used for the calculations of the density lines 
+    (see the \code{bkde} function of the \code{KernSmooth} package).
+  }
+  \item{kernel}{used for the calculations of the density lines 
+    (see the \code{bkde} function of the \code{KernSmooth} package).
+  }
+  \item{cbreaks}{number of cells for the histograms per interval 
+    of the grid of the bi-dimensional graphics.
+  }
+  \item{plot}{a logical indicating if the graphics is displayed
+  }
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored
+  }
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}
+  }
+  \item{\dots}{Additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})
+  }
+}
+
+\details{
+  Density is calculated using the function \code{bkde} of the \code{KernSmooth} package.
+}
+
+\value{
+  An \code{ADEgS} object, a list of four graphical objects,
+  one \code{ADEg.S2} and three \code{trellis} (from \code{lattice}).
+  Their names are:
+  \item{\code{object}}{the \code{ADEg.S2} object}
+  \item{\code{densX}}{top histogram, a \code{trellis} object}
+  \item{\code{densY}}{right histogram, a \code{trellis} object}
+  \item{\code{link}}{corner graphics linking the two histograms, a \code{trellis} object}
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\note{
+  Into the dots arguments, the usual parameters for the \code{s.label}
+  can be given with the \code{object} key.
+  
+  Trellis parameters are used for the three remaining graphics.
+  \code{plot.polygon} handles the histogram aspect, \code{add.line} the
+  graduations lines and \code{plot.line} the density lines.
+  
+  Finally, for the \code{link} graphic, labels aspect can be changed
+  using a \code{plabels} list, as for an \code{S2.label} object.
+}
+
+\seealso{
+  \code{\linkS4class{ADEg.S2}}
+  \code{\linkS4class{ADEgS}}
+}
+
+\examples{
+data(rpjdl, package = "ade4")
+coa1 <- ade4::dudi.coa(rpjdl$fau, scannf = FALSE, nf = 4)
+labli <- s.label(coa1$li)
+g1 <- addhist(labli)
+g2 <- addhist(labli, plabels.cex = 0, cbreaks = 3)
+labco <- s.label(coa1$co)
+g3 <- addhist(labco, plabels.cex = 0, cbreaks = 3)
+update(g3, pbackground.col = "grey85")
+}
+
+\keyword{aplot}
diff --git a/man/addtext.Rd b/man/addtext.Rd
new file mode 100644
index 0000000..053346f
--- /dev/null
+++ b/man/addtext.Rd
@@ -0,0 +1,61 @@
+\name{addtext}
+
+\alias{addtext}
+\alias{addtext-methods}
+\alias{addtext,ADEgORtrellis-method}
+\alias{addtext,ADEgS-method}
+
+\title{
+  Adds labels on graphics.
+}
+
+\description{
+  Adds a \code{trellis} object containing one or several labels on one or several graphical objects.
+}
+
+\usage{
+addtext(object, xcoord, ycoord, label, plot = TRUE, ...)
+}
+
+\arguments{
+  \item{object}{an object of class \code{ADEg}, \code{ADEgS} or \code{trellis}
+  }
+  \item{xcoord}{an integer (or a vector) indicating where \code{label} is(are) plotted on the x-axis
+  }
+  \item{ycoord}{an integer (or a vector) indicating where \code{label} is(are) plotted on the y-axis
+  }
+  \item{label}{a character string (or a vector) containing the label(s) displayed on \code{object}
+  }
+  \item{plot}{a logical indicating if the graphics is displayed
+  }
+  \item{\dots}{Other arguments. Additional graphical parameters (see the \code{plabels} list in
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}}. If \code{object} is an \code{ADEgS}, the argument \code{which} identify which \code{ADEg} is/are used for superposition)
+  }
+}
+
+\value{
+   An object of class \code{"ADEgS"}.
+}
+
+\author{Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}
+  \code{\linkS4class{ADEgS}}
+}
+
+\examples{
+data(dunedata, package = "ade4")
+afc1 <- ade4::dudi.coa(dunedata$veg, scannf = FALSE)
+g1 <- table.value(dunedata$veg, symbol = "circle", ppoints.cex = 0.5, plot = FALSE)
+addtext(g1, 1, 20, "A", plabels.srt = 45)
+
+xy <- cbind.data.frame(x = runif(200, -1, 1), y = runif(200, -1, 1))
+posi <- factor(xy$x > 0) : factor(xy$y > 0)
+g2 <- s.class(xy, fac = posi, facets = posi, pellipses.col = 1:4, plabels.cex = 0, 
+  plegend.drawKey = FALSE, psub.cex = 0, plot = FALSE)
+addtext(g2, c(0.5, 0.5, -0.5, -0.5), c(0.5, -0.5), levels(posi), plabels.cex = 2, plabels.col = 1:4)
+}
+
+\keyword{aplot}
diff --git a/man/adeg.panel.Spatial.Rd b/man/adeg.panel.Spatial.Rd
new file mode 100644
index 0000000..ca3a85a
--- /dev/null
+++ b/man/adeg.panel.Spatial.Rd
@@ -0,0 +1,92 @@
+\name{adeg.panel.Spatial}
+\alias{adeg.panel.Spatial}
+
+\title{Panel function for adding spatial objects.}
+
+\description{
+  Panel function adapted from the \code{Sp} package for displaying all kind of spatial
+  objects handled by \code{Sp} (for classes inherited from the superclass \code{Spatial})
+  into a \code{trellis} graphic (\code{lattice} package).
+}
+
+\usage{
+adeg.panel.Spatial(SpObject, sp.layout = NULL, col = 1, border = 1, lwd = 1, 
+  lty = 1, alpha = 0.8, cex = 1, pch = 20, n = length(col), spIndex = 1, ...)
+}
+
+\arguments{
+  \item{SpObject}{an object of class \code{"SpatialPoints"}, \code{"SpatialPointsDataFrame"},\cr
+    \code{"SpatialPixels"}, \code{"SpatialPixelsDataFrame"}, \code{"SpatialGrid"},\cr
+    \code{"SpatialGridDataFrame"}, \code{"SpatialLines"}, \code{"SpatialLinesDataFrame"},\cr
+    \code{"SpatialPolygons"} or \code{"SpatialPolygonsDataFrame"}}
+    
+  \item{sp.layout}{a list of layout items. See \code{spplot} for more information}
+  
+  \item{col}{background color (fill) of \code{Spobject}}
+  
+  \item{border}{border color}
+
+  \item{lwd}{line width (border)}
+
+  \item{lty}{line type (border)}
+
+  \item{alpha}{background transparency of \code{Spobject}}
+  
+  \item{cex}{point size}
+  
+  \item{pch}{point type}
+
+  \item{n}{if \code{SpObject} contains data, the  _desired_ number
+    of intervals splitting the data (using \code{pretty}).}
+    
+  \item{spIndex}{if the \code{SpObject} contains a data frame, its values
+    are represented with a color code. Only the \code{spIndex} data frame
+    is represented}
+    
+  \item{\dots}{for coherence with panel functions} 
+}
+
+\value{
+  Draws the Spatial object and layout.
+}
+
+\references{
+  Package \code{Sp}. Author: Edzer Pebesma, Roger Bivand, Barry Rowlingson and Virgilo Gomez-Rubio.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\note{
+  If \code{SpObject} contains several maps, only the first one is selected. 
+  Also for objects containing more data (for classes \code{data.frame} with a slot \code{data}), this information is also shown. 
+  To do so, various colors can be used (according to the col arguments).
+  
+  For more information about the use of panel functions, please see the \code{lattice} package developed by Deepayan Sarkar.
+}
+
+\examples{
+
+if(require(maptools, quiet = TRUE) & require(lattice, quiet = TRUE)) {
+
+nc <- readShapePoly(system.file("shapes/sids.shp", package = "maptools")[1], 
+  proj4string = CRS("+proj=longlat +datum=NAD27"))
+xy <- coordinates(nc)
+arrow <- list("SpatialPolygonsRescale", layout.north.arrow(), 
+  offset = c(-76, 34.2), scale = 0.5)
+
+xyplot(xy[, 2] ~ xy[, 1], aspect = "iso", panel = function(...){
+  adeg.panel.Spatial(SpObject = nc, sp.layout = list(arrow), 
+  col = colorRampPalette(c("yellow", "blue"))(52), border =
+  "transparent")})
+}
+}
+
+\seealso{
+  \code{\link[sp]{spplot}}
+  \code{\link[sp]{sp.lines}}
+  \code{\link[sp]{sp.polygons}}
+  \code{\link[sp]{sp.grid}}
+}
+
+\keyword{aplot}
diff --git a/man/adeg.panel.hist.Rd b/man/adeg.panel.hist.Rd
new file mode 100644
index 0000000..8ed74a7
--- /dev/null
+++ b/man/adeg.panel.hist.Rd
@@ -0,0 +1,53 @@
+\name{adeg.panel.hist}
+\alias{adeg.panel.hist}
+
+\title{Panel function for adding histograms.}
+
+\description{
+  Panel function for displaying histograms into a \code{trellis} graphic (\code{lattice}
+  package) and level lines.
+}
+
+\usage{
+adeg.panel.hist(histValues, horizontal = TRUE, densi, drawLines, params = list(), 
+  identifier = "histogramADEg")
+}
+
+\arguments{
+  \item{histValues}{an object of class histogram. See \code{\link[graphics]{hist}}.}
+  \item{horizontal}{a logical indicating if the plot is horizontal}
+  \item{densi}{a list returns by the \code{\link[KernSmooth]{bkde}} containing the coordinates of the binned 
+    kernel density estimate of the probability density of the data}
+  \item{drawLines}{a vector containing the level values}
+  \item{params}{graphical parameters : \code{plot.polygon}, \code{add.line} and \code{plot.line} (\code{lattice}) }
+  \item{identifier}{A character string that is prepended to the name of the grob that is created.}
+}
+
+\value{
+  Displays the histogram and level lines.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\link[KernSmooth]{bkde}} and \code{\link[graphics]{hist}}
+}
+
+\note{
+  For more information about the use of panel functions, please see the \code{lattice} package developed by Deepayan Sarkar.
+}
+
+\examples{
+if(require(KernSmooth, quiet = TRUE) & require(lattice, quiet = TRUE)) {
+
+  z <- round(rnorm(100, 30, 5))
+  h <- hist(z, plot = FALSE)
+  d <- bkde(z, kernel = "normal", gridsize = 60)
+  l <- c(10, 20, 30, 40)
+  xyplot(1:50 ~ 1:50, histValues = h, densi = d, drawLines = l, 
+    panel = function(drawLines, histValues, densi){
+      adeg.panel.hist(histValues = histValues, drawLines = drawLines, densi = densi)})
+}
+}
+\keyword{aplot}
\ No newline at end of file
diff --git a/man/adeg.panel.join.Rd b/man/adeg.panel.join.Rd
new file mode 100644
index 0000000..4c07419
--- /dev/null
+++ b/man/adeg.panel.join.Rd
@@ -0,0 +1,38 @@
+\name{adeg.panel.join}
+\alias{adeg.panel.join}
+
+\title{Panel function for joining lines.}
+
+\description{
+  Panel function for drawing lines as part of a circle centred in (0, 0) into a \code{trellis} graphic (\code{lattice}
+  package).
+}
+
+\usage{
+adeg.panel.join(drawLines, params = list())
+}
+
+\arguments{
+  \item{drawLines}{a vector containing the level values used as radius of the circle}
+  \item{params}{graphical parameters : \code{plabels} and \code{add.line} (\code{lattice})}
+}
+
+\value{
+  Displays level lines and their values.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\note{
+  For more information about the use of panel functions, please see the \code{lattice} package developed by Deepayan Sarkar.
+}
+
+\examples{
+if(require(lattice, quiet = TRUE)) {
+  xyplot(0:20 ~ 0:20, drawLines = c(5, 10, 15), params = list(plabels.cex = 2), 
+    panel = function(drawLines, params){
+      adeg.panel.join(drawLines = drawLines, params = params)})
+}}
+
+\keyword{aplot}
\ No newline at end of file
diff --git a/man/adeg.panel.label.Rd b/man/adeg.panel.label.Rd
new file mode 100644
index 0000000..b69dd14
--- /dev/null
+++ b/man/adeg.panel.label.Rd
@@ -0,0 +1,73 @@
+\name{adeg.panel.label}
+\alias{adeg.panel.label}
+
+\title{Panel function for adding labels.}
+
+\description{
+  Panel function for drawing labels into a \code{trellis} graphic (\code{lattice}
+  package) with or without boxes around labels.
+}
+
+\usage{
+adeg.panel.label(x, y, labels, plabels, pos = NULL)
+}
+
+\arguments{
+  \item{x}{a numeric vector, x-coordinates for the labels}
+  
+  \item{y}{a numeric vector,  y-coordinates for the labels}
+  
+  \item{labels}{a vector of character string, the labels}
+  
+  \item{plabels}{
+    a list of parameters as an extract of \code{adegpar("plabels")}, used for labels' drawing. 
+    Each value can be a vector and will be recycled if necessary:
+    \itemize{
+      \item{\code{alpha}, \code{cex}, \code{col}: drawing parameters for the text}
+      \item{\code{srt}: orientation of the labels, \code{horizontal}, \code{vertical} or an angle indication (in degrees). 
+        Boxes are not rotated. If the orientation is not near to \code{horizontal}/\code{vertical} (0/90), it is best not to draw the boxes}
+      \item{\code{optim}: logical. If TRUE, uses an algorithm trying to avoid labels' overlapping and outside limits}
+      \item{\code{boxes}: concerns the label's boxes. a list: \itemize{
+        \item{\code{draw}: logical. If TRUE, labels are framed}
+        \item{\code{alpha}, \code{border}, \code{col}, \code{lwd}, \code{lty}: rule transparency, border lines and background color}
+  }}}}
+  
+  \item{pos}{a position specifier for the text, used in panel.text.
+    Values of \code{1}, \code{2}, \code{3} and \code{4} respectively indicate positions below, to the left of, 
+    above and to the right of the specified coordinates.}
+}
+
+\value{
+  Draws the labels.
+}
+
+\references{
+  The algorithm used for labels positions optimization is inspired by the \code{pointLabel} 
+  function of the \code{maptools} package developed by Tom Short.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{\link[maptools]{pointLabel}}
+
+\note{
+  For more information about the use of panel functions, please see the \code{lattice} package developed by Deepayan Sarkar.
+}
+
+\examples{
+if(require(lattice, quiet = TRUE)) {
+param <- adegpar("plabels")[[1]]
+xyplot(1:10 ~ 1:10, panel = function(x, y, ...){
+  adeg.panel.label(x, y, LETTERS[1:10], plabels = param)})
+}
+
+if(require(lattice, quiet = TRUE)) {
+param$boxes$draw <- FALSE
+param$col <- "blue"
+xyplot(1:10 ~ 1:10, panel = function(x, y, ...){
+  adeg.panel.label(x, y, LETTERS[1:10], plabels = param)})
+}
+}
+
+\keyword{aplot}
diff --git a/man/adeg.panel.nb.Rd b/man/adeg.panel.nb.Rd
new file mode 100644
index 0000000..b0f2067
--- /dev/null
+++ b/man/adeg.panel.nb.Rd
@@ -0,0 +1,84 @@
+\name{adeg.panel.nb}
+\alias{adeg.panel.nb}
+\alias{adeg.panel.edges}
+
+\title{Panel functions for adding graphs.}
+
+\description{
+  Panel function for representing a graph into a \code{trellis} graphic (\code{lattice} package).\cr
+  Two types of graph objects can be used: \code{nb} or \code{listw} object (\code{spdep} package) or simple edges informations.\cr
+  Directions associated with the edges are not displayed.\cr
+}
+
+\usage{
+adeg.panel.nb(nbobject, coords, col.edge = "black", lwd = 1, lty = 1, pch = 20, 
+  cex = 1, col.node = "black", alpha = 1)
+
+adeg.panel.edges(edges, coords, col.edge = "black", lwd = 1, lty = 1, pch = 20, 
+  cex = 1, col.node = "black", alpha = 1)
+}
+
+\arguments{
+  \item{nbobject}{a object of class \code{nb} or \code{listw}}
+  
+  \item{edges}{a two columns matrix, representing the edges between the
+    nodes. For a row i, x[i, 1] and x[i, 2] are linked, x[i, 1] and x[i, 2] being vertices number.}
+    
+  \item{coords}{a two columns matrix containing vertices' coordinates}
+  
+  \item{col.edge}{edges' color(s)}
+  
+  \item{lwd}{line width (edges). Can be a vector}
+  
+  \item{lty}{line type (edges). Can be a vector}
+  
+  \item{pch}{vertices' representation type (symbols). Can be a vector}
+  
+  \item{cex}{symbols' size(s) (vertices). Can be a vector}
+  
+  \item{col.node}{vertices' color(s). Can be a vector}
+  
+  \item{alpha}{symbols' transparency}
+}
+
+\value{
+  Displays the neighboring graph.
+}
+
+\references{
+  Package \code{spdep}. Author: Roger Bivand
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\note{
+  For more information about the use of panel functions, please see the \code{lattice} package developed by Deepayan Sarkar.
+}
+
+\examples{
+if(require(maptools, quiet = TRUE) & require(lattice, quiet = TRUE) 
+  & require(spdep, quiet = TRUE)) {
+
+  columbus <- readShapePoly(system.file("etc/shapes/columbus.shp", package = "spdep")[1])
+  coords <- coordinates(columbus)
+  col.gal.nb <- read.gal(system.file("etc/weights/columbus.gal", package = "spdep")[1])
+  nbobject <- col.gal.nb
+  xyplot(coords[, 2] ~ coords[, 1],
+    panel = function(...){adeg.panel.nb(col.gal.nb, coords, col.edge = c("blue", "red"))})
+}
+
+if(require(maptools, quiet = TRUE) & require(lattice, quiet = TRUE) 
+  & require(spdep, quiet = TRUE)) {
+  edges <- matrix(c(1, 2, 3, 2, 4, 1, 3, 4), byrow = TRUE, ncol = 2)
+  coords <- matrix(c(0, 1, 1, 0, 0, -1, -1, 0), byrow = TRUE, ncol = 2)
+  xyplot(coords[,2] ~ coords[,1],
+    panel = function(...){adeg.panel.edges(edges, coords, lty = 1:4, cex = 5)})
+}
+}
+
+\seealso{
+  \code{\link[spdep]{plot.nb}}
+}
+
+\keyword{aplot}
diff --git a/man/adeg.panel.values.Rd b/man/adeg.panel.values.Rd
new file mode 100644
index 0000000..bbc15d4
--- /dev/null
+++ b/man/adeg.panel.values.Rd
@@ -0,0 +1,84 @@
+\name{adeg.panel.values}
+\alias{adeg.panel.values}
+
+\title{Panel function drawing a third variable into a two-dimensional scatterplot}
+
+\description{
+  Panel function for drawing coordinates with variable representation.
+  The values can be represented through symbols with proportional size or various colors.
+}
+
+\usage{
+adeg.panel.values(x, y, z, method, symbol, ppoints, breaks, centerpar = NULL, 
+  center = 0)
+}
+
+\arguments{
+  \item{x}{a numeric vector, x-coordinates for the symbols}
+  
+  \item{y}{a numeric vector,  y-coordinates for the symbols}
+  
+  \item{z}{a numeric vector, the third variable with one value per coordinates (x, y)}
+  
+  \item{method}{a character string equal to \code{color} or \code{size}.\cr
+    If \code{color}, a palette of color is used for the symbols (one color per interval defined by \code{breaks}).\cr
+    If \code{size}, symbols' area is proportional to the value. Area is 0 for values equals to \code{center}. 
+    Two colors are used, one for values smaller than center and the other for values larger than center.}
+    
+  \item{symbol}{a character string equal to \code{square} or \code{circle}.}
+  
+  \item{ppoints}{a list of parameters as an extract of \code{adegpar("ppoints")}, used for points' drawing.
+    \itemize{
+      \item{\code{alpha}: transparency of points}
+      \item{\code{cex}: size of points}
+      \item{\code{col}: border color of points}
+      \item{\code{pch}: symbol to use}
+      \item{\code{fill}: filling color}
+  }}
+  
+  \item{breaks}{a vector, the breaks used for splitting \code{z} if \code{method} is \code{color}}
+
+  \item{centerpar}{a list to represent center value using elements in the \code{adegpar("ppoints")} list or \code{NULL} value.
+    If the method is \code{size}, z-values equals to \code{center} have a size of zero. 
+    If \code{centerpar} is not \code{NULL}, those z-values are shown as points with the \code{centerpar} drawing parameters.}
+    
+  \item{center}{a center value for method \code{size}}
+}
+
+\value{
+  Draws the points.
+}
+
+\references{
+  Tanimura, S. and Kuroiwa, C. and Mizota, T. 2006 Proportional symbol
+  mapping in R \emph{Journal of Statistical Software} \bold{15}, 1--7
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\note{
+  For more information about the use of panel functions, please see the \code{lattice} package developed by Deepayan Sarkar.
+  
+  For the symbols size, the method is \code{size} uses perceptual scaling (Tanimura et al. 2006). 
+}
+
+\examples{
+if(require(lattice, quiet = TRUE)) {
+param <- adegpar("ppoints")[[1]]
+param$col <- adegpar("ppalette")[[1L]]$quanti(2)
+z <- rnorm(10)
+xyplot(1:10 ~ 1:10, panel = function(x, y, ...){
+  adeg.panel.values(x, y, z, method = "size", symbol = "square", ppoints =
+  param, breaks = pretty(z, 4))})
+}
+
+if(require(lattice, quiet = TRUE)) {
+param$col <- adegpar()$ppalette$quali((length(pretty(z, 2)) - 1))
+xyplot(1:10 ~ 1:10, panel = function(x, y, ...){
+  adeg.panel.values(x, y, z, method = "color", symbol = "circle", 
+                    ppoints = param, breaks = pretty(z, 2))}) 
+}
+}
+\keyword{aplot}
+
diff --git a/man/adegpar.Rd b/man/adegpar.Rd
new file mode 100644
index 0000000..65a82ed
--- /dev/null
+++ b/man/adegpar.Rd
@@ -0,0 +1,236 @@
+\name{adegpar}
+\alias{adegpar}
+
+\title{Handling ADEg graphical parameters}
+
+\description{
+  \code{adegpar} can be used to set or query graphical parameters used in \code{ADEg} object display.
+  
+  It is inspired by the \code{par} function of \code{graphics} package. 
+}
+
+\usage{
+adegpar(...)
+}
+
+\arguments{
+  \item{\dots}{
+    If it is empty, the return value is a named list containing all the current settings.
+    
+    If it is a string of characters, the corresponding sub-list of parameters is return as information.
+    
+    If it is a list containing keys and values, the corresponding changes in current settings are made.
+  }
+}
+
+\details{
+  The graphical parameters control apparency of the graphic.
+  Calls can be made using either a list of list (e.g. \code{plabels = list(col = "red")}) or a list grouping both keys with "." (e.g. \code{plabels.col = "red"}).
+  
+  Parameters are re-used if needed in all \code{ADEg} object.
+  If set globally, meaning using \code{adegpar}, all created objects afterwards will be affected.
+}
+
+\value{
+  Several parameters are used to create complete plot and accessible through \code{adegpar}. 
+  \describe{
+    \item{\code{p1d}:}{parameters for one-dimension graphic, object of class inherited from \code{"ADEg.S1"} or \code{"ADEg.C1"} \itemize{
+      \item{\code{horizontal}: a logical indicating if the plot is horizontal}
+      \item{\code{reverse}: a logical indicating if the bottom of the plot is at the bottom (for \code{horizontal} as \code{TRUE}) 
+        or at the left of the device (for \code{horizontal} as \code{FALSE}). If FALSE, the graphical display bottom is at the top 
+        (for \code{horizontal} as \code{TRUE}) or at the right of the device (for \code{horizontal} as \code{FALSE}).}
+      \item{\code{rug}: a list dedicated to tick marks \itemize{
+        \item{\code{draw}: a logical indicating if the rugs are drawn}
+        \item{\code{tck}: size of the rug (ticks) in proportion from the reference line and the origin of the device}
+        \item{\code{margin}: where to draw the reference line}
+        \item{\code{line}: a logical indicating if the reference line is drawn using \code{porigin} arguments}
+      }}
+    }}
+    
+    \item{\code{parrows}:}{arrows' parameters. see \code{panel.arrows} for more information \itemize{
+      \item{\code{angle}: angle from the shaft of the arrow to the edge of the arrow head}
+      \item{\code{ends}: kind of arrows to be drawn. Can be \code{first}, \code{last} or \code{both}}
+      \item{\code{length}: length of the edges of the arrow head}
+    }}
+    
+    \item{\code{paxes}:}{axis' parameters. Mostly inspired by \code{xyplot} function of \code{lattice} package \itemize{
+      \item{\code{aspectratio}: a character string to control physical aspect ratio of the graphic (drawing panel more specifically).
+        \code{iso} for isometric scales, \code{fill} for drawing as big as possible or \code{xy} for banking rule}
+      \item{\code{draw}: a logical indicating if axis (tick marks and labels) are drawn around the graphic}
+      \item{\code{x}: a list used for the creation of x-axis in the \code{trellis} object. See \code{xyplot} for more information \itemize{
+        \item{\code{draw}: a logical indicating if x-axis (tick marks and labels) are drawn around the graphic}
+      }}
+      \item{\code{y}: the same list as for \code{x} with \code{draw} parameters}
+    }}
+    
+    \item{\code{pbackground}:}{background's parameters \itemize{
+      \item{\code{col}: background color}
+      \item{\code{box}: a logical indicating if a box is drawn surrounding the plot}
+    }}
+    
+    \item{\code{pellipses}:}{ellipses' drawing parameters \itemize{
+      \item{\code{alpha}: a value between 0 and 1 controlling ellipses' background transparency}
+      \item{\code{axes}: a list dedicated to ellipses' axis \itemize{
+        \item{\code{draw}: a logical indicating whether ellipses' axis are drawn}
+        \item{\code{col}: ellipses' axis color}
+        \item{\code{lty}: line type of ellipses' axis}
+        \item{\code{lwd}: line width of ellipses' axis}
+      }}
+      \item{\code{border}: ellipses's border color}
+      \item{\code{lty}: line type of ellipses' border}
+      \item{\code{lwd}: line width of ellipses' border}
+      \item{\code{col}: ellipses' background color}
+    }}
+    
+    \item{\code{pgrid}:}{grid's drawing parameters \itemize{
+    	\item{\code{draw}: a logical indicating if grid is drawn in the background}
+    	\item{\code{col}: grid's line color}
+    	\item{\code{lty}: line type of grid line}
+    	\item{\code{lwd}: line width of grid line}
+    	\item{\code{nint}: an integer indicating the number of grid intervals expected}
+    	\item{\code{text}: a list dedicated to grid legend text\itemize{
+        \item{\code{cex}: text size of grid legend}
+        \item{\code{col}: text color of grid legend}
+        \item{\code{pos}: a character string (\code{topright}, \code{topleft}, \code{bottomleft}, \code{bottomright}) or a vector of length 2 
+          indicating text position of grid legend. If it is a vector, the default unit is \code{npc} (normalized parent coordinates).}
+      }}
+    }}
+    
+    \item{\code{plabels}:}{labels' drawing parameters \itemize{
+      \item{\code{alpha}: a value between 0 and 1 controlling label transparency}
+      \item{\code{cex}: labels' text size}
+      \item{\code{col}: labels' text color}
+      \item{\code{srt}: labels' text orientation. It can be \code{horizontal}, \code{vertical} or an angle indication in degrees}
+      \item{\code{optim}: a logical indicating if an algorithm is used to avoid labels' overlapping or outside limits}
+      \item{\code{boxes}: label's boxes parameters \itemize{
+        \item{\code{draw}: a logical indicating if labels are framed}
+        \item{\code{alpha}: a value between 0 and 1 controlling labels' boxes transparency}
+        \item{\code{border}: boxes' border color}
+        \item{\code{col}: boxes' background color}
+        \item{\code{lty}: line type of boxes' border}
+        \item{\code{lwd}: line width of boxes' border}
+      }}
+    }}
+    
+    \item{\code{plegend}:}{legend's drawing parameters (used for object of class inherited from \code{T.value} and \code{S2.value}) \itemize{
+        \item{\code{drawKey}: a logical indicating if the legend should
+        be drawn. Legend can be provided by the \code{key} argument or
+        is automatically generated for \code{*.class} and \code{*.value}
+        functions}
+    	\item{\code{drawColorKey}: a logical indicating if the color
+        legend should be drawn (only for \code{*.image} functions)}
+    	\item{\code{size}: size of the legend}
+
+    }}
+    
+    \item{\code{plines}:}{lines' drawing parameters \itemize{
+      \item{\code{col}: lines color}
+      \item{\code{lty}: lines type}
+      \item{\code{lwd}: lines width}
+    }}
+    
+    \item{\code{pnb}:}{drawing parameters for neighbourhood graph \itemize{
+      \item{\code{edge}: edge's drawing parameters \itemize{
+        \item{\code{col}: edge color}
+        \item{\code{lty}: line type of edge}
+        \item{\code{lwd}: line width of edge}
+      }}
+      \item{\code{node}: node's drawing parameters \itemize{
+        \item{\code{pch}: node's symbol type}
+        \item{\code{cex}: node's symbol size}
+        \item{\code{col}: node's symbol color}
+        \item{\code{alpha}: a value between 0 and 1 controlling node's symbol transparency}
+      }}
+    }}
+    
+    \item{\code{porigin}:}{drawing parameters for origin's lines. See \code{panel.lines} for more information \itemize{
+    	\item{\code{draw}: a logical indicating if vertical and horizontal lines are drawn to indicate origin}
+    	\item{\code{include}: a logical indicating if origin is included in the drawing limits}
+    	\item{\code{origin}: a two-length vector indicating origin coordinates}
+    	\item{\code{alpha}: a value between 0 and 1 controlling origin's lines transparency}
+    	\item{\code{col}: color of origin's lines}
+    	\item{\code{lty}: origin's line type}
+    	\item{\code{lwd}: origin's line width}
+    }}
+    
+    \item{\code{ppalette}:}{a function taking one integer in argument indicating the number of expecting colors (for example using \code{colorRampPalette}) \itemize{
+      \item{\code{quanti}: \code{adegpar()$ppalette$quanti(n)} returns n colors shaded grey to white}
+      \item{\code{quali}: \code{adegpar()$ppalette$quali(n, name)} returns \code{n} differentiated colors. \code{name} argument is passed to the \code{brewer.pal} function 
+        of the \code{RColorBrewer} package and must be \code{Accent}, \code{Dark2}, \code{Paired}, \code{Pastel1}, \code{Pastel2}, \code{Set1} (the default value), \code{Set2} or \code{Set3}.
+        When \code{n} is equal to 2, values for 'white' and 'black' colors are returned and can be not quite visible on the display.}
+    }}
+    
+    \item{\code{ppoints}:}{points' drawing paameters \itemize{
+      \item{\code{alpha}: a value between 0 and 1 controlling points transparency}
+      \item{\code{cex}: points size}
+      \item{\code{col}: points color}
+      \item{\code{pch}: points type}
+      \item{\code{fill}: points' background color (only for filled points type)}
+    }}
+    
+    \item{\code{ppolygons}:}{polygons' drawing parameters (used for example to draw convex hull for
+      \code{S2.class} or Gaussian curves for \code{C1.gauss} objects). See \code{lpolygon} for more information. \itemize{
+      \item{\code{border}: polygon's border color}
+      \item{\code{col}: polygon's background color}
+      \item{\code{lty}: line type of polygon border}
+      \item{\code{lwd}: line width of polygon border}
+      \item{\code{alpha}: a value between 0 and 1 controlling polygons' background transparency}
+    }}
+    
+    \item{\code{pSp}:}{drawing parameters for spatial object \itemize{
+      \item{\code{col}: spatial object's background color}
+      \item{\code{border}: spatial object's border color}
+      \item{\code{lty}: line type of spatial object border}
+      \item{\code{lwd}: line width of spatial object border}
+      \item{\code{alpha}: a value between 0 and 1 controlling spatial object transparency}
+    }}
+    
+    \item{\code{psub}:}{subtitle's drawing parameters \itemize{
+    	\item{\code{cex}: text size of subtitle}
+    	\item{\code{col}: text color of subtitle}
+    	\item{\code{position}: a character string (\code{topright}, \code{topleft}, \code{bottomleft}, \code{bottomright}) or a vector of length 2 
+          indicating text position of subtitle. If it is a vector, the default unit is \code{npc} (normalized parent coordinates).}
+    	\item{\code{text}: the character string to display}
+    }}
+    
+    \item{\code{ptable}:}{for table graphic, object of class inherited from \code{ADEg.T} \itemize{
+      \item{\code{x}: x-axis parameters \itemize{ 
+        \item{\code{srt}: text rotation}
+        \item{\code{pos}: position of the axis. It can be \code{top} or \code{bottom}. Otherwise axis and labels' axis are not drawn}
+        \item{\code{tck}: ticks size}
+        \item{\code{adj}: justification of labels}
+      }}
+      \item{\code{y}: same as \code{x} list, but for y-axis \itemize{
+        \item{\code{str}, \code{tck}, \code{adj}}
+        \item{\code{pos}: position of the axis. It can be \code{left} or \code{right}. Otherwise axis and labels' axis are not drawn}
+      }}
+      \item{\code{margin}: margin surrounding the drawing panel. The numbers indicate the \code{bottom}, \code{left}, \code{top} and \code{right} margins.
+        Results are obtained passing \code{margin} to padding argument in \code{lattice}. Please see 
+        \code{layout.heights} and \code{layout.widths} parameters in \code{lattice} package for more information}
+    }}
+}}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}
+  \code{\link{par}}
+}
+
+\examples{
+oldparamadeg <- adegpar()
+    
+X <- data.frame(x = runif(50, -1, 2), y = runif(50, -1, 2))
+s.label(X)
+names(adegpar())
+adegpar("paxes.draw", "psub.cex")
+adegpar()$pback$col
+adegpar("paxes.draw" = TRUE, "psu.ce" = 3, "pback.col" = "grey85")
+s.label(X)
+
+adegpar(oldparamadeg)
+}
+
+\keyword{list}
+\keyword{color}
diff --git a/man/adegraphics-internal.Rd b/man/adegraphics-internal.Rd
new file mode 100644
index 0000000..9be888f
--- /dev/null
+++ b/man/adegraphics-internal.Rd
@@ -0,0 +1,29 @@
+\name{internals}
+
+\alias{ADEgORtrellis}
+\alias{ADEgORtrellis-class}
+\alias{ADEgORADEgSORtrellis}
+\alias{ADEgORADEgSORtrellis-class}
+
+\alias{axis.L}
+\alias{setlatticecall}
+\alias{setlatticecall-methods}
+\alias{setvalueskey}
+
+\alias{printSuperpose}
+\alias{printSuperpose-methods}
+
+\alias{as.raster.pixmapGrey}
+\alias{as.raster.pixmapRGB}
+\alias{panel.symbols.grid}
+
+\title{For internal use only}
+
+\description{
+  Internal classes, methods and functions. Not for users.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\keyword{internal}
\ No newline at end of file
diff --git a/man/adegraphics-package.Rd b/man/adegraphics-package.Rd
new file mode 100644
index 0000000..3c0ee73
--- /dev/null
+++ b/man/adegraphics-package.Rd
@@ -0,0 +1,81 @@
+\name{adegraphics-package}
+\alias{adegraphics-package}
+\alias{adegraphics}
+\docType{package}
+
+\title{Graphical objects for ade4 functions (and more)}
+
+\description{
+  This package was created to replace graphics functionalities of the
+  \code{ade4} package and to offer customizable representations of data
+  and result analysis.
+  
+  Graphics are objects of S4 class, which can be displayed but also stored for
+  latter modifications.
+  Those modifications can be graphical changes, but also superposition
+  or juxtaposition of various graphical objects (creating an other type of object).
+  Each object will contain graphical parameters and instructions for the
+  display (calls, positions, etc.) and the data set used.
+  Sometimes data is heavy, due to its size for example. Two storing
+  systems exist:
+  \itemize{
+    \item{full storage: data is assigned to an object's slot.}
+    \item{names and position: data names (as a string, obtained using
+      \code{deparse(substitute)}) and their frame position (using
+      \code{sys.nframe()}) are stored. Then the full data can be
+      retrieve with those two informations (and only if the data objects
+      are still in the environment)}
+  }
+
+  This new system is based on the \code{lattice} package and \code{grid} graphics.
+}
+
+\details{
+  \tabular{ll}{
+    Package: \tab adegraphics\cr
+    Type: \tab Package\cr
+    Version: \tab 1.0-5\cr
+    Date: \tab 2016-03-02\cr
+    License: \tab GPL (>=2)\cr
+    Depends: \tab ade4, grDevices, grid, KernSmooth, lattice, methods, RColorBrewer, sp
+  }
+  
+  A lot of classes were implemented.
+  Two superclass structures the architecture in class.
+  Simple and complex graphics are distinguished in the former version:
+  \itemize{
+    \item{\code{ADEg} class provides simple graphics using one kind of data
+      (most of a time, only a data frame) and one representation method
+      (points, labels, arrows...)}
+    \item{\code{ADEgS} class provides complex graphics making juxtaposition, 
+      superposition and/or insertion of several simple graphics.}
+  }
+  5 subclasses inherits from the superclass abstract \code{ADEg}:
+  \itemize{
+    \item{\code{ADEg.S1}: one-dimensional plot}
+    \item{\code{ADEg.S2}: bi-dimensional plot}
+    \item{\code{ADEg.C1}: one-dimensional data plotted in 2-D}
+    \item{\code{ADEg.T}: table plot}
+    \item{\code{ADEg.Tr}: triangle plot}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\references{
+  See \code{ade4} website: <URL: http://pbil.univ-lyon1.fr/ADE-4/>
+}
+
+\keyword{package}
+
+\seealso{
+  \code{\link[lattice:lattice-package]{lattice}}
+  \code{\linkS4class{ADEg}}
+  \code{\linkS4class{ADEgS}}
+}
+
+\examples{
+showClass("ADEg")
+showClass("ADEgS")
+}
diff --git a/man/cbindADEg.Rd b/man/cbindADEg.Rd
new file mode 100644
index 0000000..20675ac
--- /dev/null
+++ b/man/cbindADEg.Rd
@@ -0,0 +1,50 @@
+\name{cbindADEg}
+
+\alias{cbindADEg}
+\alias{rbindADEg}
+\alias{cbindADEg-methods}
+\alias{rbindADEg-methods}
+\alias{cbindADEg,ADEgORADEgSORtrellis,ADEgORADEgSORtrellis-method}
+\alias{rbindADEg,ADEgORADEgSORtrellis,ADEgORADEgSORtrellis-method}
+
+\title{Combine \code{ADEg} objects by columns or rows}
+
+\description{
+  Take a sequence of \code{ADEg}, \code{ADEgS} or \code{trellis} arguments and combine by columns or rows, respectively. 
+}
+
+\usage{
+cbindADEg(g1, g2, ..., plot = FALSE)
+rbindADEg(g1, g2, ..., plot = FALSE)
+}
+
+\arguments{
+  \item{g1}{an object of class \code{ADEg}, \code{ADEgS} or \code{trellis}}
+  \item{g2}{an object of class \code{ADEg}, \code{ADEgS} or \code{trellis}}
+  \item{...}{other objects of class \code{ADEg}, \code{ADEgS} or \code{trellis}}
+  \item{plot}{a logical indicating if the graphics is displayed}
+}
+
+\value{
+  an \code{ADEgS} object
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}
+  \code{\linkS4class{ADEgS}}
+  \code{\link{ADEgS}}
+}
+
+\examples{
+data(jv73, package = "ade4")
+pca1 <- ade4::dudi.pca(jv73$morpho, scannf = FALSE)
+g1 <- s.label(pca1$li, plabels.optim = TRUE, plot = FALSE)
+g2 <- s.class(pca1$li, jv73$fac.riv, starSize = 0, ellipseSize = 0, chullSize = 1, 
+  ppolygons.alpha = 0.4, col = rainbow(12), ppoints.cex = 0, plot = FALSE)
+g3 <- rbindADEg(cbindADEg(g1, g2), superpose(g1, g2), plot = TRUE)
+}
+
+\keyword{hplot}
diff --git a/man/changelatticetheme.Rd b/man/changelatticetheme.Rd
new file mode 100644
index 0000000..5224cfe
--- /dev/null
+++ b/man/changelatticetheme.Rd
@@ -0,0 +1,45 @@
+\name{changelatticetheme}
+\alias{changelatticetheme}
+
+\title{
+  Change the \code{lattice} theme used for \code{adegraphics}  
+}
+
+\description{
+  This function allows to modify the default theme existing for \code{adegraphics} objects.
+  The created theme also affects previously created objects.
+}
+
+\usage{
+changelatticetheme(...)
+}
+
+\arguments{
+  \item{\dots}{\code{lattice} parameters, the same used in \code{trellis.par.set} and provided by 
+    \code{trellis.par.get}. If empty, reset the theme to the \code{adegraphics} one.}
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\note{
+  The \code{adegraphics} theme removes all margins, sets a transparent background and grey regions.
+
+  A further development will be the creation of various themes for \code{adegraphics}.
+}
+
+\seealso{
+  \code{\link[lattice]{trellis.par.get}}
+  \code{\link[lattice]{trellis.par.set}}
+  \code{\link[lattice]{show.settings}}
+}
+
+\examples{
+if(require(lattice, quiet = TRUE)) {
+show.settings()
+changelatticetheme(list(superpose.symbol = list(pch = c(21, 22, 35), cex = 1)))
+show.settings()
+show.settings()[1]
+}
+}
+\keyword{iplot}
diff --git a/man/getcall-methods.Rd b/man/getcall-methods.Rd
new file mode 100644
index 0000000..48b8cbb
--- /dev/null
+++ b/man/getcall-methods.Rd
@@ -0,0 +1,26 @@
+\name{getcall-methods}
+\docType{methods}
+
+\alias{getcall-methods}
+\alias{getcall}
+
+\title{Method for \code{ADEg} and \code{ADEgS} objects}
+
+\description{
+  \code{getcall} returns the call used to create the object.
+}
+
+\section{Methods}{
+  \describe{
+    \item{\code{signature(object = "ADEg")}}{
+      returns the slot \code{Call} of the object \code{ADEg}}
+    \item{\code{signature(object = "ADEgS")}}{
+      returns the slot \code{Call} of the object \code{ADEgS}}
+  }
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\keyword{methods}
+
diff --git a/man/insert.Rd b/man/insert.Rd
new file mode 100644
index 0000000..d1d6576
--- /dev/null
+++ b/man/insert.Rd
@@ -0,0 +1,90 @@
+\name{insert}
+
+\alias{insert}
+\alias{insert-methods}
+
+\alias{insert,ADEgORtrellis,missing-method}
+\alias{insert,ADEgS,missing-method}
+\alias{insert,ADEgORtrellis,ADEg-method}
+\alias{insert,ADEgS,ADEg-method}
+\alias{insert,ADEgORtrellis,ADEgS-method}
+\alias{insert,ADEgS,ADEgS-method}
+
+\title{Insert a graphic into an existing one}
+
+\description{
+  This function inserts a first graphic into a previously created and/or a displayed one.
+}
+
+\usage{
+insert(graphics, oldgraphics, posi = c("bottomleft", "bottomright", "topleft", 
+  "topright"), ratio = 0.2, inset = 0.0, plot = TRUE, which, dispatch = FALSE)
+}
+
+\arguments{
+  \item{graphics}{an object of class \code{ADEg}, \code{ADEgS} or \code{trellis}}
+  
+  \item{oldgraphics}{an object of class \code{ADEg}, \code{ADEgS} or \code{missing}. If \code{oldgraphics} is \code{missing},
+    \code{graphics} is added on the current device.}
+  
+  \item{posi}{a character value or a two-length numeric vector (in normalized parent coordinates \code{npc} from 0 to 1) indicating 
+    the position of \code{olgraphics} added into \code{graphics}}
+  
+  \item{ratio}{a numeric value from 0 to 1 indicating the size of \code{olgraphics} regarding the plot region}
+  
+  \item{inset}{the inset from which the graph is drawn regarding the plot region. 
+    It can be a two-length vector giving the inset in x and y. If atomic, same inset is used in x and y.}
+  
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{which}{a numeric value or a vector of values only used if \code{oldgraphics} is an \code{ADEgS} object, 
+    indicating the which-th sub-graphic of \code{oldgraphics} where \code{graphics} is added.}
+  
+  \item{dispatch}{a logical only used if both \code{graphics} and \code{oldgraphics} are \code{ADEgS} objects with same length, 
+    indicating if \code{graphics} is added one by one int \code{oldgraphics}. It is used when both \code{graphics} and \code{oldgraphics} 
+    are created with \code{facets} option.}
+}
+
+\value{
+  An object of class \code{"ADEgS"}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg}}
+  \code{\linkS4class{ADEgS}}
+}
+
+\examples{
+data(deug, package = "ade4")
+dd1 <- ade4::dudi.pca(deug$tab, scannf = FALSE, nf = 4)
+g1 <- s.label(dfxy = dd1$li, labels = rownames(dd1$li), plabels = list(cex = 0.75), plot = FALSE)
+g2 <- s1d.barchart(score = dd1$eig, plot = FALSE, 
+  ppolygons = list(col = c(rep("black", 2), rep("grey", 2), rep("white", 5))), 
+  p1d = list(horizontal = FALSE), psub = list(position = "topright", text = "Eigenvalues"), 
+  pgrid = list(draw = FALSE), pbackground = list(box = TRUE), xlim = c(0.5, 9.5))
+g1
+g3 <- insert(g2, plot = FALSE)
+
+mat <- g3 at positions
+mat[2, ] <- c(0.8, 0, 1, 0.2)
+update(g3, positions = mat, plot = FALSE)
+print(g3) ## square == NULL
+print(g3, square = TRUE)
+print(g3, square = FALSE)
+
+
+g4 <- insert(g2, g1, posi = "topleft")
+
+data(jv73, package = "ade4")
+pca1 <- ade4::dudi.pca(jv73$morpho, scannf = FALSE)
+g5 <- s.value(jv73$xy, pca1$li[, 1:2], porigin.include = FALSE)
+g6 <- s.corcircle(pca1$co, pbackground.box = FALSE)
+g7 <- insert(g6, g5, posi = c(0.3, 0.4, 0.5, 0.6))
+}
+
+\keyword{hplot}
+\keyword{aplot}
+\keyword{methods}
diff --git a/man/layout2position.Rd b/man/layout2position.Rd
new file mode 100644
index 0000000..fc31339
--- /dev/null
+++ b/man/layout2position.Rd
@@ -0,0 +1,49 @@
+\name{layout2position}
+\alias{layout2position}
+
+\title{Transform a layout matrix into a position one}
+
+\description{
+  This function transforms layout's informations into a position matrix useful for
+  \code{ADEgS} and for \code{lattice} graphics.
+}
+
+\usage{
+layout2position(mat, widths = rep(1, NCOL(mat)), heights = rep(1, NROW(mat)), ng, 
+square = FALSE)
+}
+
+\arguments{
+  \item{mat}{a matrix indicating the location of figures to display
+    (each value must be 0 or a positive integer) or a two-length vector indicating the number of rows 
+    and columns in the corresponding layout.}
+    
+  \item{widths}{a vector of relative values for the columns' widths on the device. Their sum must be equal to the number of columns.}
+    
+  \item{heights}{a vector of relative values for the rows' heights on the device. Their sum must be equal to the number of rows.}
+    
+  \item{ng}{a value for the number of positions needed (i.e. the number of graphics to plot)}
+  
+  \item{square}{a logical indicating if the graphics is an isometric plot}
+}
+
+\value{
+  A four-columns matrix indicating the coordinates (in normalized parent coordinates \code{npc}) 
+  of the top-right and bottom-left hand corners of each displayed figure on the device.
+}
+
+\note{
+  This function is strongly inspired by the \code{layout} function in \code{graphics} package.
+}
+  
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\link{layout}}
+}
+
+\examples{
+layout2position(mat = rbind(c(0, 0, 1), c(2, 2, 1)))
+layout2position(mat = cbind(c(0, 0, 1), c(2, 2, 1)), widths = c(0.5, 1.5))
+}
diff --git a/man/panel-methods.Rd b/man/panel-methods.Rd
new file mode 100644
index 0000000..9214cc9
--- /dev/null
+++ b/man/panel-methods.Rd
@@ -0,0 +1,87 @@
+\name{panel-methods}
+\docType{methods}
+
+\alias{panel-methods}
+\alias{panel}
+
+\title{Methods \code{panel} for \code{ADEg} objects}
+
+\description{
+  The method \code{panel} displays all specific graphical components.
+}
+
+\section{Methods}{
+  \describe{
+    \item{\code{signature(object = "C1.barchart")}}{
+      draws bar charts and labels}
+    \item{\code{signature(object = "C1.curve")}}{
+      draws points and curves}
+    \item{\code{signature(object = "C1.curves")}}{
+      draws multiple points and curves}
+    \item{\code{signature(object = "C1.density")}}{
+      draws density curves}
+    \item{\code{signature(object = "C1.dotplot")}}{
+      draws segments and dots}
+    \item{\code{signature(object = "C1.gauss")}}{
+      draws Gauss curves and level names of each curve}
+    \item{\code{signature(object = "C1.hist")}}{
+      draws rectangles}
+    \item{\code{signature(object = "C1.interval")}}{ 
+      draws segments or polygons}
+    
+    \item{\code{signature(object = "S1.boxplot")}}{
+      draws box-and-wiskers diagrams, mean points and labels}
+    \item{\code{signature(object = "S1.class")}}{
+      draws labels and lines matching with score values}
+    \item{\code{signature(object = "S1.distri")}}{
+      draws mean points and segments with matching labels}
+    \item{\code{signature(object = "S1.label")}}{
+      draws labels and its links with score points}
+    \item{\code{signature(object = "S1.match")}}{
+      draws score points and matching segments and labels}
+    
+    \item{\code{signature(object = "S2.arrow")}}{
+      draws points, arrows and labels}
+    \item{\code{signature(object = "S2.class")}}{
+      draws ellipses, convex hulls, stars, labels and points}
+    \item{\code{signature(object = "S2.corcircle")}}{
+      draws arrows, labels and axes}
+    \item{\code{signature(object = "S2.density")}}{
+      draws densities and external points}
+    \item{\code{signature(object = "S2.distri")}}{
+      draws ellipses, stars, labels and points}
+    \item{\code{signature(object = "S2.image")}}{
+      draws raster image}
+    \item{\code{signature(object = "S2.label")}}{
+      draws points and labels}
+    \item{\code{signature(object = "S2.logo")}}{
+      displays the logos}
+    \item{\code{signature(object = "S2.match")}}{
+      draws arrows and labels}
+    \item{\code{signature(object = "S2.traject")}}{
+      draws points, arrows and labels}
+    \item{\code{signature(object = "S2.value")}}{
+      draws symbols}
+    
+    \item{\code{signature(object = "T.cont")}}{
+      draws mean points and regression lines}
+    \item{\code{signature(object = "T.image")}}{
+      draws raster image}
+    \item{\code{signature(object = "T.value")}}{
+      draws symbols}
+    
+    \item{\code{signature(object = "Tr.class")}}{
+      draws arrows, labels and points}
+    \item{\code{signature(object = "Tr.label")}}{
+      draws lines, labels and points}
+    \item{\code{signature(object = "Tr.match")}}{
+      draws arrows, labels and points}
+    \item{\code{signature(object = "Tr.traject")}}{
+      draws arrows, labels and points}
+}}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\keyword{methods}
+
diff --git a/man/plot.Rd b/man/plot.Rd
new file mode 100644
index 0000000..39e5983
--- /dev/null
+++ b/man/plot.Rd
@@ -0,0 +1,220 @@
+\name{plot}
+
+\alias{kplot}
+\alias{kplot.foucart}
+\alias{kplot.mcoa}
+\alias{kplot.mfa}
+\alias{kplot.mbpcaiv}
+\alias{kplot.pta}
+\alias{kplot.sepan}
+\alias{kplotsepan.coa}
+\alias{kplot.statis}
+\alias{plot}
+\alias{plot.acm}
+\alias{plot.betcoi}
+\alias{plot.betrlq}
+\alias{plot.betdpcoa}
+\alias{plot.betwitdpcoa}
+\alias{plot.between}
+\alias{plot.coinertia}
+\alias{plot.discrimin}
+\alias{plot.dpcoa}
+\alias{plot.fca}
+\alias{plot.foucart}
+\alias{plot.krandboot}
+\alias{plot.krandxval}
+\alias{plot.mcoa}
+\alias{plot.mfa}
+\alias{plot.multiblock}
+\alias{plot.multispati}
+\alias{plot.niche}
+\alias{plot.pcaiv}
+\alias{plot.procuste}
+\alias{plot.randboot}
+\alias{plot.randxval}
+\alias{plot.rlq}
+\alias{plot.pta}
+\alias{plot.sepan}
+\alias{plot.statis}
+\alias{plot.witcoi}
+\alias{plot.witdpcoa}
+\alias{plot.within}
+\alias{plot.witrlq}
+\alias{scatter}
+\alias{scatter.coa}
+\alias{scatter.dudi}
+\alias{scatter.nipals}
+\alias{scatter.pco}
+\alias{score}
+\alias{score.acm}
+\alias{score.mix}
+\alias{score.pca}
+\alias{screeplot}
+\alias{screeplot.dudi}
+\alias{biplot}
+\alias{biplot.dudi}
+
+\title{Methods to display the outputs of an analysis performed with \code{ade4}}
+
+\description{
+  S3 methods to display the outputs of an analysis performed with \code{ade4}
+}
+
+\usage{
+\method{kplot}{foucart}(object, xax = 1, yax = 2, which.tab = 1:length(object$blo), pos = -1, 
+  storeData = TRUE, plot = TRUE, \dots)
+\method{kplot}{mcoa}(object, xax = 1, yax = 2, which.tab = 1:nrow(object$cov2), 
+  option = c("points", "axis", "columns"), pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{kplot}{mfa}(object, xax = 1, yax = 2, which.tab = 1:length(object$blo), traject = FALSE, 
+  permute = FALSE, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{kplot}{mbpcaiv}(object, xax = 1, yax = 2, which.tab =
+1:length(object$blo), pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{kplot}{pta}(object, xax = 1, yax = 2, which.tab = 1:nrow(object$RV), which.graph = 1:4, 
+  pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{kplot}{sepan}(object, xax = 1, yax = 2, which.tab = 1:length(object$blo), permute = FALSE, 
+  traject = FALSE, posieig = "bottomleft", pos = -1, storeData = TRUE, plot = TRUE, \dots)
+kplotsepan.coa(object, xax = 1, yax = 2, which.tab = 1:length(object$blo), 
+  permute = FALSE, posieig = "bottomleft", pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{kplot}{statis}(object, xax = 1, yax = 2, which.tab = 1:length(object$tab.names), traject = FALSE, 
+  arrow = TRUE, class = NULL, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+
+\method{plot}{acm}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{betcoi}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{betdpcoa}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{betwitdpcoa}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{betrlq}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{between}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{coinertia}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{discrimin}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{dpcoa}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{fca}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{foucart}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE,
+plot = TRUE, \dots)
+\method{plot}{krandboot}(x, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{krandxval}(x, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{mcoa}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{mfa}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE,
+plot = TRUE, \dots)
+\method{plot}{multiblock}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{multispati}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{niche}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{pcaiv}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{pta}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{procuste}(x, xax = 1, yax = 2, pos = -1, storeData =
+TRUE, plot = TRUE, \dots)
+\method{plot}{randboot}(x, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{randxval}(x, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{rlq}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{sepan}(x, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{statis}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{witcoi}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{witdpcoa}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{within}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{plot}{witrlq}(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+
+\method{scatter}{dudi}(x, xax = 1, yax = 2, permute = FALSE, posieig = "topleft", prop = FALSE, 
+  density.plot = ifelse(permute, ncol(x$tab) > 1000, nrow(x$tab) > 1000), plot = TRUE, 
+  storeData = TRUE, pos = -1, \dots)
+\method{scatter}{coa}(x, xax = 1, yax = 2, method = 1:3, posieig = "topleft", pos = -1, 
+  storeData = TRUE, plot = TRUE, \dots)
+\method{scatter}{pco}(x, xax = 1, yax = 2, posieig = "topleft", pos = -1, storeData = TRUE, 
+  plot = TRUE, \dots)
+\method{scatter}{nipals}(x, xax = 1, yax = 2, posieig = "topleft", pos = -1, storeData = TRUE, 
+  plot = TRUE, \dots)
+
+\method{score}{acm}(x, xax = 1, which.var = NULL, type = c("points", "boxplot"), pos = -1, 
+  storeData = TRUE, plot = TRUE, \dots)
+\method{score}{mix}(x, xax = 1, which.var = NULL, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+\method{score}{pca}(x, xax = 1, which.var = NULL, pos = -1, storeData = TRUE, plot = TRUE, \dots)
+
+\method{screeplot}{dudi}(x, col.kept = "grey", col = "white", pos = -1, plot = TRUE, \dots)
+
+\method{biplot}{dudi}(x, pos = -1, plot = TRUE, \dots)
+}
+
+\arguments{
+  \item{object, x}{objects used to select a method}
+  
+  \item{xax}{an integer (or a vector) indicating which column(s) of {object} or \code{x} is(are) plotted on the x-axis}
+  
+  \item{yax}{an integer (or a vector) indicating which column(s) of {object} or \code{x} is(are) plotted on the y-axis}
+  
+  \item{which.tab}{a numeric vector (used in \code{kplot.*}) containing the numbers of the tables used for the analysis}
+  
+  \item{option}{a string of characters (only used in \code{kplot.mfa}) indicating the drawing option:
+    \code{points} plot of the projected scattergram onto the co-inertia axes,
+    \code{axis} projections of inertia axes onto the co-inertia axes,
+    \code{columns} projections of variables onto the synthetic variables planes.}
+  
+  \item{which.graph}{an integer between 1 and 4 (only used in \code{kplot.pta}) indicating the drawing option.
+    For each table of \code{which.tab}, are drawn:
+    \code{1} the projections of the principal axes,
+    \code{2} the projections of the rows,
+    \code{3} the projections of the columns,
+    \code{4} the projections of the principal components onto the planes of the compromise.}
+  
+  \item{permute}{a logical value (used in \code{kplot.sepan}, \code{kplotsepan.coa} and \code{scatter.dudi}).
+    If \code{FALSE}, the rows are plotted by points or density surface and the columns by arrows. If \code{TRUE}, it is the opposite.}
+    
+  \item{traject}{a logical value (used in \code{kplot.sepan} and \code{kplot.statis}) 
+    indicating whether the trajectories between rows should be drawn in a natural order}
+  
+  \item{posieig}{a character value or a two-length numeric vector (in normalized parent coordinates \code{npc} from 0 to 1) 
+    or \code{none} value indicating the position of the eigenvalues bar plot (used in \code{kplot.sepan}, \code{kplotsepan.coa} and \code{scatter.*}).}
+
+  \item{arrow}{a logical value (only used in \code{kplot.statis}) indicating whether the column factorial diagrams should be plotted}
+  
+  \item{class}{if not NULL, a factor of length equal to the number of the total columns of the K-tables (only used in \code{kplot.statis})}
+  
+  \item{prop}{a logical value (only used in \code{scatter.dudi}) indicating if the size of the arrows' labels is proportional to the analysis score.}
+  
+  \item{density.plot}{a logical value  (only used in \code{scatter.dudi})indicating if the points are displayed as density surface (using \code{s.density}).}
+
+  \item{method}{an integer between 1 and 3 (only used in \code{scatter.coa}) indicating the drawing option. Are drawn:
+    \code{1} rows and columns with the coordinates of lambda variance,
+    \code{2} rows variance 1 and columns by averaging,
+    \code{3} columns variance 1 and rows by averaging.}
+  
+  \item{which.var}{the numbers of the kept columns for the analysis, otherwise all columns (used in \code{score.*})}
+  
+  \item{type}{a string of characters (only used in \code{score.acm}) indicating if points (\code{points}) or boxplot (\code{boxplot}) are used to represent levels of factors} 
+    
+  \item{col.kept}{one color value to color the kept axes in the barchart (used in \code{screeplot.dudi})}
+
+  \item{col}{one color value to color the axes in the barchart (used in \code{screeplot.dudi})}
+  
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{
+  Returns an \code{ADEg} or an \code{ADEgS} object.
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\references{
+  See \code{ade4} website: <URL: http://pbil.univ-lyon1.fr/ADE-4/>
+}
+
+\examples{
+cat("To run the example on 'topic'\n")
+cat("Type in your R console: example(topic, package = 'ade4') \n")
+}
+
+\keyword{hplot}
+\keyword{methods}
+\keyword{multivariate}
diff --git a/man/plotEig.Rd b/man/plotEig.Rd
new file mode 100644
index 0000000..3166a8f
--- /dev/null
+++ b/man/plotEig.Rd
@@ -0,0 +1,80 @@
+\name{plotEig}
+
+\alias{plotEig}
+
+\title{
+  Plot a barchart of eigen values
+}
+
+\description{
+  This function represents a simplified barchart adapted to display eigen values. 
+  The bar color depends on whether the axis is displayed, kept or not.
+}
+
+\usage{
+plotEig(eigvalue, nf, xax = 1, yax = 2, col.plot = "black", col.kept = "grey", 
+  col = "white", facets = NULL, plot = TRUE, storeData = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{eigvalue}{a numeric vector of eigenvalues}
+  
+  \item{nf}{the number of retained factors, NULL if not provided}
+  
+  \item{xax}{an integer indicating which factor is plotted on the x-axis}
+  
+  \item{yax}{an integer indicating which factor is plotted on the y-axis}
+
+  \item{col.plot}{a color value to fill the bar corresponding to the displayed factors}
+  
+  \item{col.kept}{a color value to fill the bar corresponding to the kept by not displayed factors}
+    
+  \item{col}{a color value to fill the bar corresponding to the other factors}
+  
+  \item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{C1.barchart}).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\details{
+  Graphical parameters for bars are available in \code{ppolygons} of \code{adegpar}.
+  Some appropriated graphical parameters in \code{p1d} are also available.
+}
+
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{C1.barchart}}
+  \code{\linkS4class{ADEg.C1}}
+}
+
+\examples{
+  data(microsatt, package = "ade4")
+  w <- ade4::dudi.coa(data.frame(t(microsatt$tab)), scann = FALSE, nf = 3)
+  g1 <- s.label(w$co, plot = FALSE)
+  g2 <- plotEig(w$eig, w$nf, psub = list(text = "Eigenvalues"), pbackground = list(box = TRUE), 
+    plot = FALSE)
+  G <- insert(g2, g1, posi = "bottomright", ratio = 0.25)
+}
+
+\keyword{aplot}
diff --git a/man/prepare-methods.Rd b/man/prepare-methods.Rd
new file mode 100644
index 0000000..8c970a9
--- /dev/null
+++ b/man/prepare-methods.Rd
@@ -0,0 +1,96 @@
+\name{prepare-methods}
+\docType{methods}
+
+\alias{prepare-methods}
+\alias{prepare}
+
+\title{Methods \code{prepare} for \code{ADEg} objects}
+
+\description{
+  The method \code{prepare} performs the first calculus needed for the display.
+}
+
+\section{Methods}{
+  \describe{
+    \item{\code{signature(object = "ADEg.C1")}}{
+      performs the calculations before display the object (e.g. limits, grid and axis calculations)}
+    \item{\code{signature(object = "C1.barchart")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default}
+    \item{\code{signature(object = "C1.curve")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default}
+    \item{\code{signature(object = "C1.density")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.C1}), modifies some graphical parameters used by default and 
+      calculates the density curves according to the numeric score and the values' categories}
+    \item{\code{signature(object = "C1.dotplot")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default}
+    \item{\code{signature(object = "C1.gauss")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.C1}), modifies some graphical parameters used by default and 
+      calculates the Gauss curves according to the numeric score and the values' categories (using weighted mean and standard deviation)}
+    \item{\code{signature(object = "C1.hist")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.C1}), modifies some graphical parameters used by default 
+      and calculates the boundaries and the height of cells}
+    \item{\code{signature(object = "C1.interval")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.C1}) and modifies some graphical parameters used by default}  
+    
+    \item{\code{signature(object = "ADEg.S1")}}{
+      performs the calculations before display the object (e.g. limits, grid and axis calculations)}
+    \item{\code{signature(object = "S1.boxplot")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default}
+    \item{\code{signature(object = "S1.class")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default}
+    \item{\code{signature(object = "S1.distri")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S1}), modifies some graphical parameters used by default and calculates weighted mean and standard deviation}
+    \item{\code{signature(object = "S1.label")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default}
+    \item{\code{signature(object = "S1.match")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S1}) and modifies some graphical parameters used by default}
+    
+    \item{\code{signature(object = "ADEg.S2")}}{
+      performs the calculations before display the object (e.g. limits, grid and axis calculations)}
+    \item{\code{signature(object = "S2.arrow")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates limits}
+    \item{\code{signature(object = "S2.class")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates ellipses, convex hulls and centroids}
+    \item{\code{signature(object = "S2.corcircle")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and prepares the drawn grid}
+    \item{\code{signature(object = "S2.density")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates densities}
+    \item{\code{signature(object = "S2.distri")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates ellipses and centroids}
+    \item{\code{signature(object = "S2.image")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates grid expansion and limits}
+    \item{\code{signature(object = "S2.label")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default}
+    \item{\code{signature(object = "S2.logo")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default}
+    \item{\code{signature(object = "S2.match")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default}
+    \item{\code{signature(object = "S2.traject")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S2}) and modifies some graphical parameters used by default}
+    \item{\code{signature(object = "S2.value")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.S2}), modifies some graphical parameters used by default and calculates limits}
+    
+    \item{\code{signature(object = "ADEg.T")}}{
+      performs the calculations before display the object (e.g. limits, grid and axis calculations)}
+    \item{\code{signature(object = "T.image")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.T}) and modifies some graphical parameters used by default and calculates limits and grid}
+    \item{\code{signature(object = "T.value")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.T}) and modifies some graphical parameters used by default and calculates limits and grid}
+    
+    \item{\code{signature(object = "ADEg.Tr")}}{
+      performs the calculations before display the object (e.g. limits, grid and axis calculations)}
+    \item{\code{signature(object = "Tr.class")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.Tr}), modifies some graphical parameters used by default and calculated ellipses, convex hulls and centroids}
+    \item{\code{signature(object = "Tr.label")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.Tr}) and modifies some graphical parameters used by default}
+    \item{\code{signature(object = "Tr.match")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.Tr}), modifies some graphical parameters used by default and defines the mean point and the axis}
+    \item{\code{signature(object = "Tr.traject")}}{
+      calls the parent method (\code{prepare} for \code{ADEg.Tr}) and modifies some graphical parameters used by default}
+}}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\keyword{methods}
+
diff --git a/man/s.Spatial.Rd b/man/s.Spatial.Rd
new file mode 100644
index 0000000..e7753a9
--- /dev/null
+++ b/man/s.Spatial.Rd
@@ -0,0 +1,73 @@
+\name{s.Spatial}
+\alias{s.Spatial}
+
+\title{Mapping of a Spatial* object}
+
+\description{This function represents a background map linked with data or not.
+}
+
+\usage{
+s.Spatial(spObj, col = TRUE, nclass = 5, scale = TRUE, plot = TRUE, 
+  storeData = TRUE, pos = -1, ...)
+}
+
+\arguments{
+  \item{spObj}{an object deriving from class \code{Spatial} (package \code{sp})}
+  
+  \item{col}{a logical or a color to fill the background color of \code{spObj}}
+  
+  \item{nclass}{if \code{spObj} contains data, the desired number
+    of intervals splitting the data (using \code{pretty})}
+  
+  \item{scale}{a \code{logical} indicating if numeric variables
+    should be scaled}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{  
+  An object of class \code{ADEg} (subclass \code{S2.label}) or \code{ADEgS} (if \code{spObj} contains more than one column ).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S2.label}}
+  \code{\link[sp]{spplot}}
+  \code{\link[sp]{sp.lines}}
+  \code{\link[sp]{sp.polygons}}
+  \code{\link[sp]{sp.grid}}
+}
+
+
+\examples{
+data(elec88, package = "ade4")
+## mapping whithout data
+g1 <- s.Spatial(elec88$Spatial)
+
+\dontrun{
+  if(require(sp, quiet = TRUE)) {
+    ## mapping whith data
+    obj <- SpatialPolygonsDataFrame(Sr = elec88$Spatial, data = elec88$tab)
+    g2 <- s.Spatial(obj)
+    g3 <- s.Spatial(obj, nclass = 2, col = c("red", "blue"))
+  }
+}
+}
+
+\keyword{hplot}
+
diff --git a/man/s.arrow.Rd b/man/s.arrow.Rd
new file mode 100644
index 0000000..0c8e697
--- /dev/null
+++ b/man/s.arrow.Rd
@@ -0,0 +1,80 @@
+\name{s.arrow}
+\alias{s.arrow}
+
+\title{2-D scatter plot with arrows}
+
+\description{
+  This function represents a two dimensional scatter plot with arrows linking points to the origin.
+}
+
+\usage{
+s.arrow(dfxy, xax = 1, yax = 2, labels = row.names(as.data.frame(dfxy)), 
+  facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxy}{a data frame used to produce the plot}
+    
+  \item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
+  
+  \item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
+  
+  \item{labels}{a character vector containing labels for arrows}
+  
+  \item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  An other origin for arrows can be specified using an \code{adegpar} parameters: \code{porigin}.
+  Graphical parameters for points and arrows are available in \code{parrows} and \code{ppoints} of \code{adegpar}.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S2.arrow}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or vectors for \code{xax}/\code{yax} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S2.arrow}}
+  \code{\linkS4class{ADEg.S2}}
+}
+
+\examples{
+data(doubs, package = "ade4") 
+dudi1 <- ade4::dudi.pca(doubs$env, scale = TRUE, scannf = FALSE, nf = 3)
+dudi2 <- ade4::dudi.pca(doubs$fish, scale = TRUE, scannf = FALSE, nf = 2)
+coin1 <- ade4::coinertia(dudi1, dudi2, scannf = FALSE, nf = 2)
+g11 <- s.arrow(coin1$l1, plabels.cex = 0.87, plot = FALSE)
+g12 <- s.arrow(coin1$c1, plabels.cex = 1, plabels.col = "red", plot = FALSE)
+g1 <- superpose(g12, g11, plot = TRUE)
+
+xy <- cbind(rnorm(50), rnorm(50))
+g2 <- s.arrow(xy, plabels.cex = 0.9, plines = list(lwd = 1.5), parrows.angle = 20)
+update(g2, plines = list(col = rainbow(5)))
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/s.class.Rd b/man/s.class.Rd
new file mode 100644
index 0000000..f2d9c27
--- /dev/null
+++ b/man/s.class.Rd
@@ -0,0 +1,114 @@
+\name{s.class}
+\alias{s.class}
+
+\title{2-D scatter plot with a partition in classes (levels of a factor)}
+
+\description{
+  This function represents a two dimensional scatter plot grouping points to the same class.
+  Classes are represented by ellipses, stars and/or convex hulls.
+}
+
+\usage{
+s.class(dfxy, fac, xax = 1, yax = 2, wt = rep(1, NROW(fac)), labels = levels(fac),
+  ellipseSize = 1.5, starSize = 1, chullSize = NULL, col = NULL, facets = NULL,
+  plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxy}{a data frame used to produce the plot}
+  
+  \item{fac}{a factor (or a matrix of factors) splitting the rows of \code{dfxy}}
+  
+  \item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
+  
+  \item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
+
+  \item{wt}{a vector of weights for \code{fac}}
+  
+  \item{labels}{a character vector containing the class' labels}
+  
+  \item{ellipseSize}{a positive number for ellipse size}
+  
+  \item{starSize}{a number between 0 and 1 for the size of the stars segments joining the stars' center 
+    (centroids) and the matching points}
+    
+  \item{chullSize}{\code{NULL} or a vector of numbers between 0 and 1 for the fraction of points included in the convex hull}
+  
+  \item{col}{a color or a colors vector to color points, ellipses, labels, lines and polygons}
+  
+  \item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  Graphical parameters for ellipses, stars and convex hulls are available in \code{pellipses}, \code{plines} and \code{ppolygons} of \code{adegpar}.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S2.class}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or multidimensional \code{fac} or vectors for \code{xax}/\code{yax} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S2.class}}
+  \code{\linkS4class{ADEg.S2}}
+}
+
+\examples{
+xy <- cbind.data.frame(x = runif(200, -1, 1), y = runif(200, -1, 1))
+posi <- factor(xy$x > 0) : factor(xy$y > 0)
+coul <- c("black", "red", "green", "blue")
+s.class(xy, fac = posi, col = coul, psub.text = "example s.class", pellipses.col = coul)
+
+s.class(xy, fac = posi, ppoints.cex = 1.5, ellipseSize = 0, starSize = 0,
+  ppolygons = list(border = 4:1, col = 1:4, lty = 1:4, lwd = 2, alpha = 0.4),
+  chullSize = c(1, 0.5))
+
+s.class(xy, fac = posi, facets = posi, ppoints.cex = 1.5, ellipseSize = 0, starSize = 0,
+  ppolygons = list(border = 4:1, col = 1:4, lty = 1:4, lwd = 2, alpha = 0.4),
+  chullSize = c(1, 0.5))
+  
+\dontrun{ 
+s.class(xy, fac = posi, col = coul, psub.text = "example s.class", pellipses.col = coul, 
+  plabels.cex = 0, key = list(space = "left"))
+   
+data(banque, package = "ade4")
+dudi1 <- ade4::dudi.acm(banque, scannf = FALSE)
+col <- rainbow(length(levels(banque[, 20])))
+g1 <- s.label(dudi1$li, psub = list(text = "Factorial map from ACM", cex = 1.5, 
+  position = "topleft"), plot = FALSE)
+g2 <- s.class(dudi1$li, banque[, 20], psub = list(text = names(banque)[20], cex = 1.5, 
+  position = "bottomright"), ellipseSize = 0, starSize = 0.5, pgrid.text.cex = 0, plot = FALSE)
+g3 <- s.class(dudi1$li, banque[, 20], starSize = 0, ellipseSize = 2, pgrid.text.cex = 0, 
+  plabels.cex = 1.5, plot = FALSE)
+g4 <- s.class(dudi1$li, banque[, 20], psub = list(text = names(banque)[20], 
+  position = "topright"), pgrid.text.cex = 0, col = col, pellipses.lwd = 1.5, plot = FALSE)
+G1 <- ADEgS(c(g1, g2, g3, g4), layout = c(2, 2))
+G2 <- s.class(dudi1$li, banque, psub = list(position = "topleft"), pgrid.text.cex = 0, 
+  starSize = 0, ppoints.cex = 0)
+}
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/s.corcircle.Rd b/man/s.corcircle.Rd
new file mode 100644
index 0000000..4ae2aa9
--- /dev/null
+++ b/man/s.corcircle.Rd
@@ -0,0 +1,70 @@
+\name{s.corcircle}
+\alias{s.corcircle}
+
+\title{Correlation circle}
+
+\description{
+  This function produces a correlation circle.
+}
+
+\usage{
+s.corcircle(dfxy, xax = 1, yax = 2, labels = row.names(as.data.frame(dfxy)), 
+  fullcircle = TRUE, facets = NULL, plot = TRUE, storeData = TRUE, 
+  add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxy}{a data frame used to produce the plot}
+  
+  \item{labels}{a vector containing the points' labels}
+  
+  \item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
+  
+  \item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
+
+  \item{fullcircle}{a logical to include the complete circle (limits are then c(-1, 1))}
+  
+  \item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S2.corcircle}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or vectors for \code{xax}/\code{yax} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S2.corcircle}}
+  \code{\linkS4class{ADEg.S2}}
+}
+
+\examples{
+data (olympic, package = "ade4")
+dudi1 <- ade4::dudi.pca(olympic$tab, scannf = FALSE)
+g1 <- s.corcircle(dudi1$co)
+g2 <- s.corcircle(dudi1$co, fullcircle = FALSE, pback.col = "grey")
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/s.density.Rd b/man/s.density.Rd
new file mode 100644
index 0000000..d275015
--- /dev/null
+++ b/man/s.density.Rd
@@ -0,0 +1,89 @@
+\name{s.density}
+\alias{s.density}
+
+\title{2-D scatter plot with kernel density estimation}
+
+\description{
+  This function represents a two dimensional scatter plot of points distribution.
+  Densities' representation is based on the \code{levelplot} graphic in \code{lattice}
+  (density's surface, filled with colors and/or contour lines).
+}
+
+\usage{
+s.density(dfxy, xax = 1, yax = 2, bandwidth = NULL, gridsize = c(450L, 450L), 
+  nrpoints = 300, threshold = 0.1, col = NULL, contour = FALSE, region = !contour, 
+  nclass = 8, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxy}{a data frame used to produce the plot}
+  
+  \item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
+  
+  \item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
+
+  \item{bandwidth}{bandwidth for density calculations which is passed in parameters in the \code{bkde2D} function of the \code{KernSmooth} package}
+  
+  \item{gridsize}{grid dimension}
+    
+  \item{nrpoints}{number of points on the density image}
+  
+  \item{threshold}{a value between 0 and 1 to draw densities greater than this threshold. No density is visible whether it is equal to 1}
+    
+  \item{col}{a color or a colors vector to color densities}
+  
+  \item{contour}{a logical to draw contour lines}
+  
+  \item{region}{a logical to fill grid regions with \code{col}}
+  
+  \item{nclass}{number of class for density}
+  
+  \item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  Density calculation is made using the \code{kde2d} function of the \code{KernSmooth} package.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S2.density}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or vectors for \code{xax}/\code{yax} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S2.density}}
+  \code{\linkS4class{ADEg.S2}}
+}
+  
+\examples{
+xx2 <- c(rnorm(50000, 1, 1), rnorm(50000, -1, 1))
+yy2 <- c(rnorm(50000, -1, 0.5), rnorm(50000, 1, 0.5))
+s.density(cbind(xx2, yy2), paxes.draw = TRUE, gridsize = c(200, 200), region = TRUE, 
+  contour = TRUE, plabels.cex = 0, threshold = 0.05, nclass = 3, 
+  col = colorRampPalette(c("lightgrey", "black"))(100))
+}
+
+\keyword{hplot}
+\keyword{aplot}
diff --git a/man/s.distri.Rd b/man/s.distri.Rd
new file mode 100644
index 0000000..63b53c8
--- /dev/null
+++ b/man/s.distri.Rd
@@ -0,0 +1,80 @@
+\name{s.distri}
+\alias{s.distri}
+
+\title{2-D scatter plot with means/standard deviations computed using an external table of weights}
+
+\description{
+  This function represents a two dimensional scatter plot of a frequency distribution.
+  Class are defined by ellipses and/or stars.
+}
+
+\usage{
+s.distri(dfxy, dfdistri, xax = 1, yax = 2, starSize = 1, 
+  ellipseSize = 1.5, col = NULL, facets = NULL, plot = TRUE, 
+  storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxy}{a data frame used to produce the plot}
+  
+  \item{dfdistri}{a data frame containing the mass distribution in columns}
+    
+  \item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
+  
+  \item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
+
+  \item{starSize}{\code{NULL} or number between 0 and 1 for the size of the stars segments joining the stars' center 
+    (centroids) and the matching points}
+
+  \item{ellipseSize}{\code{NULL} or number between 0 and 1 for ellipse size}
+
+  \item{col}{a color or a colors vector to color points, ellipses, labels, lines and polygons}
+
+  \item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S2.distri}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or vectors for \code{xax}/\code{yax} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S2.distri}}
+  \code{\linkS4class{ADEg.S2}}
+}
+
+\examples{
+data(rpjdl, package = "ade4")
+xy <- ade4::dudi.coa(rpjdl$fau, scan = FALSE)$li
+j <- c(1, 5, 8, 20, 21, 23, 26, 33, 36, 44, 47, 49)
+dfdistri <- rpjdl$fau[, j]
+coli <- colorRampPalette(c("blue", "red", "orange"))(49)[j]
+
+s.distri(xy, dfdistri, ellipseSize = 1, starSize = 0, porigin.include = FALSE, 
+  pellipses = list(col = coli, alpha = 0.3), plabels.cex = 0)
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/s.image.Rd b/man/s.image.Rd
new file mode 100644
index 0000000..050a52a
--- /dev/null
+++ b/man/s.image.Rd
@@ -0,0 +1,116 @@
+\name{s.image}
+\alias{s.image}
+
+\title{2-D scatter plot with loess estimation of an additional numeric score (levelplot)}
+
+\description{
+  This function represents a two dimensional scatter plot with a continuous convex colored surface
+  and/or contour lines representing a third variable.
+}
+
+\usage{
+s.image(dfxy, z, xax = 1, yax = 2, span = 0.5, gridsize = c(80L, 80L), 
+  contour = TRUE, region = TRUE, outsideLimits = NULL, breaks = NULL,
+  nclass = 8, col = NULL, facets = NULL, 
+  plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxy}{a data frame used to produce the plot}
+  
+  \item{z}{a vector (or a matrix) of values on the \code{dfxy} rows}
+  
+  \item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
+  
+  \item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
+
+  \item{span}{a value to control the degree of smoothing}
+  
+  \item{gridsize}{a 1 or 2-length vector indicating the cell numbers (horizontally and vertically) of the grid for the colored surface}
+  
+  \item{contour}{a logical to draw contour lines}
+  
+  \item{region}{a logical to fill inter-contour regions}
+
+  \item{breaks}{a vector of values to split \code{z}. If \code{NULL}, \code{pretty(z, nclass)} is used.}
+  
+  \item{nclass}{an integer for the number of desired intervals, ignored
+    if \code{breaks} is not missing.}
+  
+  \item{outsideLimits}{specific limits for the surface as a set of polygons. It must be an \code{SpatialPolygons} object. Hole are authorized.}
+  
+  \item{col}{a color or a colors vector used for the colored cells}
+
+  \item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S2.image}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or multidimensional \code{z} or vectors for \code{xax}/\code{yax} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S2.image}}
+  \code{\linkS4class{ADEg.S2}}
+}
+
+\examples{
+df1 <- data.frame(expand.grid(-3:3, -3:3))
+names(df1) <- c("x", "y")
+z1 <- (1 / sqrt(2)) * exp(-(df1$x ^ 2 + df1$y ^ 2) / 2)
+g1 <- s.image(df1, z1)
+
+# add a continuous color bar as legend
+# update(g1, plegend.drawColorKey = TRUE)
+
+g2 <- s.image(df1, z1, gridsize = 50)
+
+g3 <- s.image(df1, z1, gridsize = 100)
+## g4 <- s.image(df1, z1, gridsize = 1000, plot = FALSE)
+
+\dontrun{
+  if(require(splancs, quiet = TRUE) & require(sp, quiet = TRUE)) {
+    Sr1 <- Polygon(cbind(c(0, 1, 2, 1, 2, 0, -2, -1, -2, -1, 0), 
+      c(2.5, 1.5, 2, 0, -2, -1, -2, 0, 2, 1.5, 2.5)))
+    Sr2 <- Polygon(cbind(c(-0.5, 0.5, 0.5, -0.5, -0.5), c(0, 0, 1 ,1, 0)), hole = TRUE)
+    Srs2 <- Polygons(list(Sr1, Sr2), ID = "star and hole")
+    SPp <- SpatialPolygons(list(Srs2))
+    df2 <- cbind(c(rnorm(2000, 1, 0.25), rnorm(3000, -1, 1.5)), c(rnorm(2000, 1, 0.5), 
+      rnorm(3000, -1, 3)))
+    z2 <- c(rnorm(2000, 12, 1), rnorm(3000, 1, 2))
+    g5 <- s.image(df2, z2, outsideLimits = SPp, grid = 200, xlim = c(-2.5, 2.5), 
+      ylim = c(-2, 3), ppalette.quanti = colorRampPalette(c(grey(0.1), grey(0.9))))
+  
+    data(t3012, package = "ade4")  
+    g6 <- s.image(t3012$xy, ade4::scalewt(t3012$temp), porigin.include = FALSE)
+    g7 <- s.image(t3012$xy, ade4::scalewt(t3012$temp), outsideLimits = t3012$Spatial, 
+      Sp = t3012$Spatial)
+  }
+}
+}
+  
+\keyword{aplot}
+\keyword{hplot}
+ 
diff --git a/man/s.label.Rd b/man/s.label.Rd
new file mode 100644
index 0000000..8a31772
--- /dev/null
+++ b/man/s.label.Rd
@@ -0,0 +1,80 @@
+\name{s.label}
+\alias{s.label}
+
+\title{2-D scatter plot with labels}
+
+\description{
+  This function represents a two dimensional scatter plot associating labels with points.
+}
+
+\usage{
+s.label(dfxy, labels = rownames(dfxy), xax = 1, yax = 2,
+  facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, 
+  pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxy}{a data frame used to produce the plot}
+  
+  \item{labels}{a vector of character strings for the points' labels}
+  
+  \item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
+  
+  \item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
+
+  \item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S2.label}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or vectors for \code{xax}/\code{yax} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S2.label}}
+  \code{\linkS4class{ADEg.S2}}
+}
+
+\examples{
+x0 <- runif(50, -2, 2)
+y0 <- runif(50, -2, 2)
+z <- x0 ^ 2 + y0 ^ 2
+g1 <- s.label(data.frame(x0, y0), label = as.character(z < 1), paxes.draw = TRUE, 
+  axis.text = list(col = "grey"))
+  
+data(mafragh, package = "ade4")
+g2 <- s.label(mafragh$xy, nb = mafragh$nb, paxes.draw = FALSE)
+
+data(irishdata, package = "ade4")
+g3 <- s.label(irishdata$xy.utm, Sp = irishdata$Spatial.contour)   
+## update irishdata$xy.utm call to irishdata$xy
+
+\dontrun{data(atlas, package = "ade4")
+  g4 <- s.label(atlas$xy, lab = atlas$names.district, Sp = atlas$Spatial.contour)
+  g5 <- s.label(atlas$xy, lab = atlas$names.district, Sp = atlas$Spatial)
+}
+}
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/s.logo.Rd b/man/s.logo.Rd
new file mode 100644
index 0000000..46ebd65
--- /dev/null
+++ b/man/s.logo.Rd
@@ -0,0 +1,79 @@
+\name{s.logo}
+\alias{s.logo}
+
+\title{2-D scatter plot with logos (bitmap objects)}
+
+\description{
+  This function represents a two dimensional scatter plot associating logos with points.
+}
+
+\usage{
+s.logo(dfxy, logos, xax = 1, yax = 2, facets = NULL, 
+  plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxy}{a data frame used to produce the plot}
+
+  \item{logos}{a list containing the picture to use for each point}
+  
+  \item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
+  
+  \item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
+
+  \item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S2.logo}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or vectors for \code{xax}/\code{yax} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S2.logo}}
+  \code{\linkS4class{ADEg.S2}}
+}
+
+\examples{
+data(ggtortoises, package = "ade4")
+g1 <- s.logo(ggtortoises$pop, 
+  ggtortoises$ico[as.character(ggtortoises$pop$carap)], 
+  pori.incl = FALSE, ppoints.cex = 0.5)
+g1 <- s.label(ggtortoises$pop, add = TRUE, plabels.boxes.alpha = 0)
+
+g2 <- s.logo(ggtortoises$pop, 
+  ggtortoises$ico[as.character(ggtortoises$pop$carap)], 
+  Sp = ggtortoises$Spatial, pback.col = "lightblue", pSp.col = "white", 
+  pgrid.draw = FALSE, ppoints.cex = 0.5)
+g2 <- s.label(ggtortoises$misc, pgrid.draw = FALSE, 
+  porigin.include = FALSE, paxes.draw = FALSE, add = TRUE)
+
+data(capitales, package = "ade4")
+g3 <- s.logo(capitales$xy[sort(rownames(capitales$xy)), ], capitales$logo, 
+  Sp = capitales$Spatial, pback.col = "lightblue", pSp.col = "white", 
+  pgrid.draw = FALSE)
+}
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/s.match.Rd b/man/s.match.Rd
new file mode 100644
index 0000000..1050321
--- /dev/null
+++ b/man/s.match.Rd
@@ -0,0 +1,78 @@
+\name{s.match}
+\alias{s.match}
+
+\title{2-D scatter plot of the matching between two sets of coordinates}
+
+\description{
+  This function represents a two dimensional scatter plot linking paired coordinates.
+}
+
+\usage{
+s.match(dfxy1, dfxy2, xax = 1, yax = 2, labels =
+  row.names(as.data.frame(dfxy1)), arrows = TRUE, 
+  facets = NULL, plot = TRUE, storeData = TRUE, 
+  add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxy1}{a data frame, the first system of coordinates, used to produce the plot}
+
+  \item{dfxy2}{a data frame, the second system of coordinates, with as many rows as \code{dfxy1}, used to produce the plot.}
+
+  \item{labels}{a vector of character strings containing the matches' labels}
+  
+  \item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
+  
+  \item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
+
+  \item{arrows}{a logical to draw arrows}
+  
+  \item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S2.match}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or vectors for \code{xax}/\code{yax} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S2.match}}
+  \code{\linkS4class{ADEg.S2}}
+}
+
+\examples{
+X <- data.frame(x = runif(50, -1, 2), y = runif(50, -1, 2))
+Y <- X + rnorm(100, sd = 0.3)
+g1 <- s.match(X, Y, arr = TRUE, ppoints.cex = 2, ppoints.col = c("blue", "green"))
+
+data(doubs, package = "ade4")
+dudi1 <- ade4::dudi.pca(doubs$env, scale = TRUE, scannf = FALSE, nf = 3)
+dudi2 <- ade4::dudi.pca(doubs$fish, scale = FALSE, scannf = FALSE, nf = 2)
+coin1 <- ade4::coinertia(dudi1, dudi2, scannf = FALSE, nf = 2)
+g2 <- s.match(dfxy1 = coin1$mX, dfxy2 = coin1$mY)
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/s.traject.Rd b/man/s.traject.Rd
new file mode 100644
index 0000000..725fcd1
--- /dev/null
+++ b/man/s.traject.Rd
@@ -0,0 +1,88 @@
+\name{s.traject}
+\alias{s.traject}
+
+\title{2-D scatter plot with trajectories}
+
+\description{
+  This function represents a two dimensional scatter plot with trajectories.
+}
+
+\usage{
+s.traject(dfxy, fac = gl(1, nrow(dfxy)), order, labels = levels(fac), 
+  xax = 1, yax = 2, col = NULL, facets = NULL, plot = TRUE, 
+  storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxy}{a data frame used to produce the plot}
+  
+  \item{fac}{a factor (or a matrix of factors) splitting the rows of \code{dfxy}}
+  
+  \item{order}{a vector containing the drawing order of the trajectories. A vector of length equal to factor.}
+  
+  \item{labels}{a vector of character strings containing the trajectories' labels}
+  
+  \item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
+  
+  \item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
+
+  \item{col}{a color or a colors vector to color points, labels and lines}
+  
+  \item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  The \code{fac} factor is used to display several trajectories: each level of \code{fac} is a specific trajectory. 
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S2.traject}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or multidimensional \code{fac} or vectors for \code{xax}/\code{yax} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S2.traject}}
+  \code{\linkS4class{ADEg.S2}}
+}
+
+\examples{
+rw <- function(a) {
+  x <- 0
+  for(i in 1:49) x <- c(x, x[length(x)] + runif(1, -1, 1))
+  x
+}
+x1 <- unlist(lapply(1:5, rw), use.names = FALSE)
+y1 <- unlist(lapply(1:5, rw), use.names = FALSE)
+z1 <- gl(5, 50)
+g1 <- s.traject(data.frame(x1, y1), z1, ppoints.pch = 19:23, plines.col = rainbow(5))
+
+x2 <- unlist(lapply(1:2, rw), use.names = FALSE)
+y2 <- unlist(lapply(1:2, rw), use.names = FALSE)
+z2 <- gl(2, 50)
+g2 <- s.traject(data.frame(x2, y2), z2, ppoints.pch = 21:20, plines.col = 1:2)
+}
+
+\keyword{hplot}
+\keyword{aplot}
diff --git a/man/s.value.Rd b/man/s.value.Rd
new file mode 100644
index 0000000..c23ca25
--- /dev/null
+++ b/man/s.value.Rd
@@ -0,0 +1,112 @@
+\name{s.value}
+\alias{s.value}
+
+\title{2-D scatter plot with proportional symbols (bubble plot)}
+
+\description{
+  This function represents a two dimensional scatter plot with a third value represented by symbols.
+}
+
+\usage{
+s.value(dfxy, z, breaks = NULL, xax = 1, yax = 2, method = c("size",
+"color"), symbol = c("square", "circle", "diamond", "uptriangle", "downtriangle"),
+col = NULL, nclass = 4, center = 0, centerpar = NULL, facets = NULL,
+plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxy}{a data frame used to produce the plot}
+
+  \item{z}{a vector (or a matrix) with as many values as rows in \code{dfxy}}
+
+  \item{breaks}{a vector containing the breaks used for splitting \code{z} value. If \code{NULL}, \code{pretty(z, n)} is used.}
+  
+  \item{xax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the x-axis}
+  
+  \item{yax}{an integer (or a vector) indicating which column(s) of \code{dfxy} is(are) plotted on the y-axis}
+
+  \item{method}{\code{color} or \code{size} value for represent \code{z}.   
+    If \code{color}, a palette of color is used for the symbols (one color per interval).
+    If \code{size}, symbols of proportional area are used. Area is 0 for values
+    equals to center (default 0). Two colors are used, for values less than center and larger than center.}
+    
+  \item{symbol}{value for symbol type}
+  
+  \item{col}{a color or a colors vector to color symbols.
+    If \code{method} is \code{size}, a 2-length vector of color is expected. 
+    If \code{method} is \code{color}, it must have as many colors as the number of class.}
+    
+  
+  \item{nclass}{an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
+  
+  \item{center}{a center value for method \code{size}}
+  
+  \item{centerpar}{a logical or a list to represent center value using elements in the 
+    \code{adegpar("ppoints")} list}
+  
+  \item{facets}{a factor splitting the rows of \code{dfxy} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if 
+    \code{storeData} is \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S2.value}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or multidimensional \code{z} or vectors for \code{xax}/\code{yax} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\note{
+  For the symbol size, if the method is \code{size}, we use perceptual scaling (Tanimura et al. 2006) .  
+}
+
+\references{
+  Tanimura, S. and Kuroiwa, C. and Mizota, T. 2006 Proportional symbol
+  mapping in R \emph{Journal of Statistical Software} \bold{15}, 1--7
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S2.value}}
+  \code{\linkS4class{ADEg.S2}}
+}
+
+\examples{ 
+data(rpjdl, package = "ade4")
+fau.coa <- ade4::dudi.coa(rpjdl$fau, scan = FALSE, nf = 3)
+g1 <- s.value(fau.coa$li, fau.coa$li[,3])
+update(g1, key = list(space = "right", columns = 1))
+g2 <- s.value(fau.coa$li, fau.coa$li[,3], method = "color", plegend.size = 0.8)
+g3 <- s.value(fau.coa$li, fau.coa$li[,3], plegend.size = 0.8, symbol = "square",
+   method = "color",  col = colorRampPalette(c("yellow", "blue"))(6))
+g4 <- s.value(fau.coa$li, fau.coa$li[,3], plot = FALSE)
+g5 <- s.value(fau.coa$li, fau.coa$li[, 3], center = 0, method = "size", 
+  symbol = "circle", col = c("yellow", "red"), plot = FALSE)
+g6 <- ADEgS(c(g4, g5), positions = layout2position(matrix(c(1, 2), 1, 2)), 
+  add = matrix(0, ncol = 2, nrow = 2))  
+   
+data(irishdata, package = "ade4")
+irq0 <- data.frame(scale(irishdata$tab, scale = TRUE))
+g7 <- s.value(irishdata$xy.utm, irq0, Sp = irishdata$Spatial.contour, paxes.draw = FALSE, 
+  pgrid.draw = FALSE, pSp.alpha = 0.4)
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/s1d.barchart.Rd b/man/s1d.barchart.Rd
new file mode 100644
index 0000000..23d0c39
--- /dev/null
+++ b/man/s1d.barchart.Rd
@@ -0,0 +1,68 @@
+\name{s1d.barchart}
+\alias{s1d.barchart}
+
+\title{1-D plot of a numeric score by bars}
+
+\description{
+  This function represents a score using a chart with rectangular bars for which length is proportional to this score.
+}
+
+\usage{
+s1d.barchart(score, labels = NULL, facets = NULL, plot = TRUE, 
+  storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{score}{a numeric vector (or a data frame) used to produce the plot}
+  
+  \item{labels}{the labels' names drawn on the top of bars}
+  
+  \item{facets}{a factor splitting \code{score} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  Graphical parameters for bars are available in \code{ppolygons} of \code{adegpar}.
+  Some appropriated graphical parameters in \code{p1d} are also available.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{C1.barchart}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or data frame for \code{score} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{C1.barchart}}
+  \code{\linkS4class{ADEg.C1}}
+}
+
+\examples{
+data(rpjdl, package = "ade4")
+rpjdl.coa <- ade4::dudi.coa(rpjdl$fau, scannf = FALSE, nf = 4)
+s1d.barchart(rpjdl.coa$eig, p1d.horizontal = FALSE, ppolygons.col = "grey")
+}
+
+\keyword{aplot}
+\keyword{hplot}
+
diff --git a/man/s1d.boxplot.Rd b/man/s1d.boxplot.Rd
new file mode 100644
index 0000000..8cd3725
--- /dev/null
+++ b/man/s1d.boxplot.Rd
@@ -0,0 +1,74 @@
+\name{s1d.boxplot}
+\alias{s1d.boxplot}
+
+\title{1-D box plot of a numeric score partitioned in classes (levels of a factor)}
+
+\description{
+  This function represents the link between a variable and a set of qualitative variables using box-and-whisker plots.
+}
+
+\usage{
+s1d.boxplot(score, fac = gl(1, NROW(score)), at = 1:nlevels(fac), col = NULL, 
+  facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{score}{a numeric vector (or a data frame) used to produce the plot}
+  
+  \item{fac}{a factor (or a matrix of factors) to split \code{score}}
+  
+  \item{at}{a numeric vector used as an index}
+  
+  \item{col}{a color or a colors vector for points, labels, lines and polygons according to their factor level. 
+    Colors are recycled whether there are not one color by factor level.}
+  
+  \item{facets}{a factor splitting \code{score} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  Graphical parameters for rugs are available in \code{plines} of \code{adegpar} and the ones for boxes in \code{ppolygons}.
+  Some appropriated graphical parameters in \code{p1d} are also available.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S1.boxplot}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or data frame for \code{score} or data frame for \code{fac} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S1.boxplot}}
+  \code{\linkS4class{ADEg.S1}}
+}
+
+\examples{
+data(banque, package = "ade4")
+banque.acm <- ade4::dudi.acm(banque, scan = FALSE, nf = 4)
+s1d.boxplot(banque.acm$l1[, 1], banque[, 2], psub.text = names(banque)[2], 
+  psub.position = "topleft", col = c("red", "blue", "green", "purple", "orange"))
+s1d.boxplot(banque.acm$l1[,1], banque[, 1:6], psub.position = "topleft")
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/s1d.class.Rd b/man/s1d.class.Rd
new file mode 100644
index 0000000..8951b38
--- /dev/null
+++ b/man/s1d.class.Rd
@@ -0,0 +1,90 @@
+\name{s1d.class}
+\alias{s1d.class}
+
+\title{1-D plot of a numeric score partitioned in classes (levels of a factor)}
+
+
+\description{
+  This function represents the link between scores values and their matching labeled classes.
+}
+
+\usage{
+s1d.class(score, fac, wt = rep(1, NROW(fac)), labels = levels(fac), at = 0.5, 
+  poslabel = c("regular", "value"), col = NULL, facets = NULL, plot = TRUE, 
+  storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{score}{a numeric vector (or a data frame) used to produce the plot}
+  
+  \item{fac}{a factor (or a matrix of factors) to split \code{score}}
+  
+  \item{wt}{a vector of weights for \code{score}}
+  
+  \item{labels}{the labels' names drawn for each class}
+  
+  \item{at}{a numeric vector used as an index}
+  
+  \item{poslabel}{the label position of each class (each level of \code{fac}), it can be \code{regular} or \code{value}. 
+    If \code{regular}, labels are evenly spaced. 
+    If \code{value}, labels are placed on the weighted mean of their class.}
+  
+  \item{col}{a color or a colors vector for points, labels and lines according to their factor level. 
+    Colors are recycled whether there are not one color by factor level.}
+  
+  \item{facets}{a factor splitting \code{score} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if 
+    \code{storeData} is \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  The weighted means of class are available in the object slot \code{stats} using \code{object at stats$means}.
+  Graphical parameters for rugs are available in \code{plines} of \code{adegpar}.
+  Some appropriated graphical parameters in \code{p1d} are also available.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S1.class}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or data frame for \code{score} or data frame for \code{fac} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S1.class}}
+  \code{\linkS4class{ADEg.S1}}
+}
+
+\examples{
+data(meau, package = "ade4")
+envpca <- ade4::dudi.pca(meau$env, scannf = FALSE)
+
+g1 <- s1d.class(envpca$li[, 1], meau$design$season, poslabel = "value", col = 1:4, plot = FALSE)
+g2 <- s1d.class(envpca$li[, 1], meau$design$season, poslabel = "regular", col = 1:6, 
+  p1d.reverse = TRUE, plot = FALSE)
+ADEgS(c(g1, g2), layout = c(2, 1))
+
+g3 <- s1d.class(envpca$li[, 1], meau$design$season, poslabel = "value", col = 1:4, 
+  plabels.cex = 0, key = list(space = "bottom"))
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/s1d.curve.Rd b/man/s1d.curve.Rd
new file mode 100644
index 0000000..4dcf256
--- /dev/null
+++ b/man/s1d.curve.Rd
@@ -0,0 +1,72 @@
+\name{s1d.curve}
+\alias{s1d.curve}
+
+\title{1-D plot of a numeric score linked by curves}
+
+\description{
+  This function represents a score using points linked by curves.
+}
+
+\usage{
+s1d.curve(score, at = 1:NROW(score), facets = NULL, plot = TRUE, 
+  storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{score}{a numeric vector (or a data frame) used to produce the plot}
+  
+  \item{at}{a numeric vector used as an index}
+  
+  \item{facets}{a factor splitting \code{score} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  Graphical parameters for lines and points are available in \code{plines} and in \code{ppoints} of \code{adegpar}.
+  Some appropriated graphical parameters in \code{p1d} are also available.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{C1.curve}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or data frame for \code{score} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{C1.curve}}
+  \code{\linkS4class{ADEg.C1}}
+}
+
+\examples{
+data(rpjdl, package = "ade4")
+rpjdl.coa <- ade4::dudi.coa(rpjdl$fau, scannf = FALSE, nf = 4)
+s1d.curve(rpjdl.coa$eig)
+
+set.seed(40)
+score1 <- rnorm(10)
+s1d.curve(score1)
+}
+
+\keyword{aplot}
+\keyword{hplot}
+
diff --git a/man/s1d.curves.Rd b/man/s1d.curves.Rd
new file mode 100644
index 0000000..516e1c7
--- /dev/null
+++ b/man/s1d.curves.Rd
@@ -0,0 +1,68 @@
+\name{s1d.curves}
+\alias{s1d.curves}
+
+\title{1-D plot of multiple scores linked by curves}
+
+\description{
+  This function represents multiple scores using points linked by curves.
+}
+
+\usage{
+s1d.curves(score, at = 1:NROW(score), facets = NULL, plot = TRUE, 
+  storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{score}{a numeric matrix (or a data frame) used to produce the plot}
+  
+  \item{at}{a numeric vector used as an index}
+  
+  \item{facets}{a factor splitting \code{score} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  Graphical parameters for lines and points are available in \code{plines} and in \code{ppoints} of \code{adegpar}.
+  Some appropriated graphical parameters in \code{p1d} are also available.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{C1.curves}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{C1.curves}}
+  \code{\linkS4class{ADEg.C1}}
+}
+
+\examples{
+
+scores <- matrix(1:50, nrow = 10)
+s1d.curves(scores)
+}
+
+\keyword{aplot}
+\keyword{hplot}
+
diff --git a/man/s1d.density.Rd b/man/s1d.density.Rd
new file mode 100644
index 0000000..c68f812
--- /dev/null
+++ b/man/s1d.density.Rd
@@ -0,0 +1,82 @@
+\name{s1d.density}
+\alias{s1d.density}
+
+\title{1-D plot of a numeric score by density curves}
+
+\description{
+  This function represents a score with a density curve for each level of a factor.
+}
+
+\usage{
+s1d.density(score, fac = gl(1, NROW(score)), kernel = c("normal", "box", 
+  "epanech", "biweight", "triweight"), bandwidth = NULL, gridsize = 450, 
+  col = TRUE, fill = TRUE, facets = NULL, plot = TRUE, storeData = TRUE,
+  add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{score}{a numeric vector (or a data frame) used to produce the plot}
+  
+  \item{fac}{a factor (or a matrix of factors) to split \code{score}}
+  
+  \item{kernel}{the smoothing kernel used, see \code{\link[KernSmooth]{bkde}}}
+  
+  \item{bandwidth}{the kernel bandwidth smoothing parameter}
+  
+  \item{gridsize}{the number of equally spaced points at which to estimate the density}
+  
+  \item{col}{a logical, a color or a colors vector for labels, rugs, lines and polygons according to their factor level. 
+    Colors are recycled whether there are not one color by factor level.}
+    
+  \item{fill}{a logical to yield the polygons density curves filled}
+  
+  \item{facets}{a factor splitting \code{score} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  \code{kernel}, \code{bandwidth} and \code{gridsize} are passed as parameters to \code{\link[KernSmooth]{bkde}} function of the \code{KernSmooth} package.
+  
+  Graphical parameters for rugs are available in \code{plines} of \code{adegpar} and the ones for density curves filled in \code{ppolygons}.
+  Some appropriated graphical parameters in \code{p1d} are also available.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{C1.density}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or data frame for \code{score} or data frame for \code{fac} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{C1.density}}
+  \code{\linkS4class{ADEg.C1}}
+}
+
+\examples{
+score <- c(rnorm(1000, mean = -0.5, sd = 0.5), rnorm(1000, mean = 1))
+fac <- rep(c("A", "B"), each = 1000)
+s1d.density(score, fac, col = c(2, 4), p1d.reverse = TRUE)
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/s1d.distri.Rd b/man/s1d.distri.Rd
new file mode 100644
index 0000000..71f77c5
--- /dev/null
+++ b/man/s1d.distri.Rd
@@ -0,0 +1,98 @@
+\name{s1d.distri}
+\alias{s1d.distri}
+
+\title{1-D plot of a numeric score by means/standard deviations computed
+using an external table of weights}
+
+\description{
+  This function represents a set of distributions on a numeric score using a mean-standard deviation display
+}
+
+\usage{
+s1d.distri(score, dfdistri, labels = colnames(dfdistri), at = 1:NCOL(dfdistri), 
+  yrank = TRUE, sdSize = 1, facets = NULL, plot = TRUE, 
+  storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{score}{a numeric vector (or a data frame) used to produce the plot}
+  
+  \item{dfdistri}{a data frame containing the mass distribution in which each column is a class}
+  
+  \item{yrank}{a logical to draw the distributions sorted by means ascending order}
+  
+  \item{labels}{the labels' names drawn for each distribution}
+  
+  \item{at}{a numeric vector used as an index}
+  
+  \item{sdSize}{a numeric for the size of the standard deviation segments}
+  
+  \item{facets}{a factor splitting \code{score} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  Graphical parameters for rugs are available in \code{plines} of \code{adegpar}.
+  Some appropriated graphical parameters in \code{p1d} are also available.
+  The weighted means and standard deviations of class are available in the object slot \code{stats} using \code{object at stats$means} and \code{object at stats$sds}.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S1.distri}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or data frame for \code{score} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S1.distri}}
+  \code{\linkS4class{ADEg.S1}}
+}
+
+\examples{
+w <- seq(-1, 1, le = 200)
+distri <- data.frame(lapply(1:50, 
+  function(x) sample(200:1) * ((w >= (- x / 50)) & (w <= x / 50))))
+names(distri) <- paste("w", 1:50, sep = "")
+g11 <- s1d.distri(w, distri, yrank = TRUE, sdS = 1.5, plot = FALSE)
+g12 <- s1d.distri(w, distri, yrank = FALSE, sdS = 1.5, plot = FALSE)
+G1 <- ADEgS(c(g11, g12), layout = c(1, 2))
+
+data(rpjdl, package = "ade4")
+coa1 <- ade4::dudi.coa(rpjdl$fau, scannf = FALSE)
+G2 <- s1d.distri(coa1$li[,1], rpjdl$fau, labels = rpjdl$frlab, 
+  plabels = list(cex = 0.8, boxes = list(draw = FALSE)))
+
+\dontrun{
+g31 <- s1d.distri(coa1$l1[,1], rpjdl$fau, plabels = list(cex = 0.8, boxes = list(draw = FALSE)), 
+  plot = FALSE)
+nsc1 <- ade4::dudi.nsc(rpjdl$fau, scannf = FALSE)
+g32 <- s1d.distri(nsc1$l1[,1], rpjdl$fau, plabels = list(cex = 0.8, boxes = list(draw = FALSE)), 
+  plot = FALSE)
+g33 <- s.label(coa1$l1, plot = FALSE)
+g34 <- s.label(nsc1$l1, plot = FALSE)
+G3 <- ADEgS(c(g31, g32, g33, g34), layout = c(2, 2))
+} 
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/s1d.dotplot.Rd b/man/s1d.dotplot.Rd
new file mode 100644
index 0000000..187fbdb
--- /dev/null
+++ b/man/s1d.dotplot.Rd
@@ -0,0 +1,72 @@
+\name{s1d.dotplot}
+\alias{s1d.dotplot}
+
+\title{1-D plot of a numeric score by dots}
+
+\description{
+  This function represents a score using dots.
+}
+
+\usage{
+s1d.dotplot(score, at = 1:NROW(score), facets = NULL, plot = TRUE, 
+  storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{score}{a numeric vector (or a data frame) used to produce the plot}
+  
+  \item{at}{a numeric vector used as an index}
+  
+  \item{facets}{a factor splitting \code{score} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  Graphical parameters for segments and dots are available in \code{plines} and in \code{ppoints} of \code{adegpar}.
+  Some appropriated graphical parameters in \code{p1d} are also available.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{C1.dotplot}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or data frame for \code{score} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{C1.dotplot}}
+  \code{\linkS4class{ADEg.C1}}
+}
+
+\examples{
+data(rpjdl, package = "ade4")
+rpjdl.coa <- ade4::dudi.coa(rpjdl$fau, scannf = FALSE, nf = 4)
+s1d.dotplot(rpjdl.coa$eig)
+
+set.seed(40)
+score1 <- rnorm(10)
+s1d.dotplot(score1)
+}
+
+\keyword{aplot}
+\keyword{hplot}
+
diff --git a/man/s1d.gauss.Rd b/man/s1d.gauss.Rd
new file mode 100644
index 0000000..febc167
--- /dev/null
+++ b/man/s1d.gauss.Rd
@@ -0,0 +1,82 @@
+\name{s1d.gauss}
+\alias{s1d.gauss}
+
+\title{1-D plot of a numeric score by Gaussian curves}
+
+\description{
+  This function represents a score with a Gauss curve for each level of a factor.
+}
+
+\usage{
+s1d.gauss(score, fac = gl(1, NROW(score)), wt = rep(1,
+  NROW(score)), steps = 200, col = TRUE, fill = TRUE,
+  facets = NULL, plot = TRUE, storeData = TRUE, add =
+  FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{score}{a numeric vector (or a data frame) used to produce the plot}
+  
+  \item{fac}{a factor (or a matrix of factors) to split \code{score}}
+  
+  \item{wt}{a vector of weights for \code{score}}
+  
+  \item{steps}{a value for the number of segments used to draw the Gauss curves}
+  
+  \item{col}{a logical, a color or a colors vector for labels, rugs, lines and polygons according to their factor level. 
+    Colors are recycled whether there are not one color by factor level.}
+    
+  \item{fill}{a logical to yield the polygons Gauss curves filled}
+  
+  \item{facets}{a factor splitting \code{score} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  Graphical parameters for rugs are available in \code{plines} of \code{adegpar} and the ones for Gauss curves filled in \code{ppolygons}.
+  Some appropriated graphical parameters in \code{p1d} are also available.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{C1.gauss}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or data frame for \code{score} or data frame for \code{fac} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{C1.gauss}}
+  \code{\linkS4class{ADEg.C1}}
+}
+
+\examples{
+data(meau, package= "ade4")
+envpca <- ade4::dudi.pca(meau$env, scannf = FALSE)
+dffac <- cbind.data.frame(meau$design$season, meau$design$site)
+g1 <- s1d.gauss(envpca$li[, 1], fac = dffac, fill = TRUE, col = 1:6)
+update(g1, steps = 10)
+g2 <- s1d.gauss(envpca$li[, 1], dffac[, 2], ppoly.col = 1:4, paxes.draw = TRUE, ylim = c(0, 2), 
+  fill = TRUE, p1d.hori = FALSE)
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/s1d.hist.Rd b/man/s1d.hist.Rd
new file mode 100644
index 0000000..535737a
--- /dev/null
+++ b/man/s1d.hist.Rd
@@ -0,0 +1,76 @@
+\name{s1d.hist}
+\alias{s1d.hist}
+
+\title{1-D plot of a numeric score by bars}
+
+\description{
+  This function represents a score using a chart with rectangular bars.
+}
+
+\usage{
+s1d.hist(score, breaks = NULL, nclass = round(log2(length(score)) + 1), 
+  type = c("count", "density", "percent"), right = TRUE, facets = NULL, 
+  plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{score}{a numeric vector (or a data frame) used to produce the plot}
+  
+  \item{breaks}{a vector of values to split \code{score}. If \code{NULL}, \code{pretty(score, nclass)} is used.}
+  
+  \item{nclass}{an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
+  
+  \item{type}{a value among \code{count}, \code{density}, \code{percent} to indicate the unit of the cell height.}
+  
+  \item{right}{a logical indicating if the histogram cells are right-closed (left open) intervals.}
+  
+  \item{facets}{a factor splitting \code{score} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  Graphical parameters for polygons are available in \code{ppolygons} of \code{adegpar}.
+  Some appropriated graphical parameters in \code{p1d} are also available.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{C1.hist}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or data frame for \code{score} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{C1.hist}}
+  \code{\linkS4class{ADEg.C1}}
+  \code{\link[graphics]{hist}}
+}
+
+\examples{
+set.seed(40)
+score1 <- rnorm(1000)
+s1d.hist(score1)
+}
+
+\keyword{aplot}
+\keyword{hplot}
+
diff --git a/man/s1d.interval.Rd b/man/s1d.interval.Rd
new file mode 100644
index 0000000..8a61e37
--- /dev/null
+++ b/man/s1d.interval.Rd
@@ -0,0 +1,75 @@
+\name{s1d.interval}
+\alias{s1d.interval}
+
+\title{1-D plot of the interval between two numeric scores}
+
+\description{
+  This function represents the interval between two scores using either segments or filled areas.
+}
+
+\usage{
+s1d.interval(score1, score2, at = 1:NROW(score1), method = c("bars", "area"), 
+  facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{score1}{a numeric vector (or a data frame) used to produce the plot}
+  
+  \item{score2}{a numeric vector with as many values as values (or rows) in \code{score1}}
+  
+  \item{at}{a numeric vector used as an index}
+  
+  \item{method}{a value, \code{bars} or \code{area}, to represent either segments or areasbetween scores.}
+  
+  \item{facets}{a factor splitting \code{score} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  Graphical parameters for polygons, lines and segment boundaries are available in respectively 
+  \code{ppolygons}, \code{plines} and \code{parrows} of \code{adegpar}.
+  Some appropriated graphical parameters in \code{p1d} are also available.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{C1.interval}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or data frame for \code{score} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{C1.interval}}
+  \code{\linkS4class{ADEg.C1}}
+}
+
+\examples{
+set.seed(40)
+sc1 <- rnorm(10)
+sc2 <- rnorm(10)
+s1d.interval(sc1, sc2, method = "bars")
+s1d.interval(sc1, sc2, method = "area")
+}
+
+\keyword{aplot}
+\keyword{hplot}
+
diff --git a/man/s1d.label.Rd b/man/s1d.label.Rd
new file mode 100644
index 0000000..6e8efb1
--- /dev/null
+++ b/man/s1d.label.Rd
@@ -0,0 +1,76 @@
+\name{s1d.label}
+\alias{s1d.label}
+
+\title{1-D plot of a numeric score with labels}
+
+\description{
+  This function represents a numeric labeled score
+}
+
+\usage{
+s1d.label(score, labels = 1:NROW(score), at = 0.5, poslabel = c("regular",
+  "value"), facets = NULL, plot = TRUE, storeData =
+  TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{score}{a numeric vector (or a data frame) used to produce the plot}
+  
+  \item{labels}{the labels' names drawn for each \code{score} value}
+  
+  \item{at}{a numeric vector used as an index}
+  
+  \item{poslabel}{the label position of each class (each level of \code{fac}), it can be \code{regular} or \code{value}. 
+    If \code{regular}, labels are evenly spaced. 
+    If \code{value}, labels are placed on the weighted mean of their class.}
+  
+  \item{facets}{a factor splitting \code{score} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  Graphical parameters for rugs are available in \code{plines} of \code{adegpar}.
+  Some appropriated graphical parameters in \code{p1d} are also available.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S1.label}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or data frame for \code{score} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S1.label}}
+  \code{\linkS4class{ADEg.S1}}
+}
+
+\examples{
+data(meau, package = "ade4")
+envpca <- ade4::dudi.pca(meau$env, scannf = FALSE)
+g1 <- s1d.label(envpca$l1[, 1], row.names(envpca$l1), plot = FALSE)
+g2 <- s1d.label(envpca$co[, 1], row.names(envpca$co), p1d.reverse = TRUE, plot = FALSE)
+G <- ADEgS(c(g1, g2), layout = c(2, 1))      
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/s1d.match.Rd b/man/s1d.match.Rd
new file mode 100644
index 0000000..da21073
--- /dev/null
+++ b/man/s1d.match.Rd
@@ -0,0 +1,70 @@
+\name{s1d.match}
+\alias{s1d.match}
+
+\title{1-D plot of the matching between two numeric scores}
+
+\description{
+  This function represents paired scores with evenly spaced labels.
+}
+
+\usage{
+s1d.match(score1, score2, labels = 1:NROW(score1), at = 0.5, 
+  facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, 
+  pos = -1, ...)
+}
+
+\arguments{
+  \item{score1}{a numeric vector (or a data frame) used to produce the plot}
+  
+  \item{score2}{a numeric vector used to produce the plot with as many values as values (or rows) in \code{score1}}
+  
+  \item{labels}{the labels' names drawn for each \code{score1} value}
+  
+  \item{at}{a numeric vector used as an index}
+  
+  \item{facets}{a factor splitting \code{score1} so that subsets    % facets uniquement sur score1. quid de score2 
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  Graphical parameters for rugs are available in \code{plines} of \code{adegpar}.
+  Some appropriated graphical parameters in \code{p1d} are also available.
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{S1.match}) or \code{ADEgS} (if \code{add} is \code{TRUE} and/or 
+  if facets or data frame for \code{score} or data frame for \code{fac} are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{S1.match}}
+  \code{\linkS4class{ADEg.S1}}
+}
+
+\examples{
+s1d.match(-5:5, 2 * (-5:5))
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/setlimits1D.Rd b/man/setlimits1D.Rd
new file mode 100644
index 0000000..d2253af
--- /dev/null
+++ b/man/setlimits1D.Rd
@@ -0,0 +1,47 @@
+\name{setlimits1D}
+
+\alias{setlimits1D}
+\alias{setlimits2D}
+
+\title{
+Computes limits for 1D and 2D displays.
+}
+
+\description{
+Computes limits for 1D and 2D displays adding 10\% of margins around the extreme values.
+}
+
+\usage{
+setlimits1D(mini, maxi, origin, includeOr)
+setlimits2D(minX, maxX, minY, maxY, origin = c(0, 0), aspect.ratio = "iso", includeOr)
+}
+
+\arguments{
+  \item{mini}{the smallest value of a unidimensional dataset}
+  \item{maxi}{the largest value of a unidimensional dataset}
+  \item{minX}{the smallest value of the first dimension of a bidimensional dataset}
+  \item{maxX}{the largest value of the first dimension of a bidimensional dataset}
+  \item{minY}{the smallest value of the second dimension of a bidimensional dataset}
+  \item{maxY}{the largest value of the second dimension of a bidimensional dataset}
+  \item{origin}{a value (in \code{setlimits1D}) or a two-length vector (in \code{setlimits2D}) indicating origin coordinate(s)}
+  \item{aspect.ratio}{a character string to control physical aspect ratio of the graphic.
+        \code{iso} for isometric scales, \code{fill} for drawing as big as possible or \code{xy} for banking rule}
+  \item{includeOr}{a boolean value indicating whether the origin is included in the graphics window}
+}
+
+\value{
+  \code{setlimits1D} return a two-length vector containing the limits of the graphics window on one axis
+  \code{sortparamADEgS} return a two-length list. The first element, named \code{xlim}, is a two-length vector 
+  containing the limits of the graphics window on the first axis. The second, named \code{ylim}, is the limits on 
+  the second axis.
+  }
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\examples{
+setlimits1D(mini = -2, maxi = 2, origin = 0, includeOr = TRUE)
+setlimits2D(minX = -2, maxX = 2, minY = -3, maxY = 4, origin = c(0, 0), includeOr = TRUE)
+}
+
+\keyword{aplot}
diff --git a/man/sortparamADEg.Rd b/man/sortparamADEg.Rd
new file mode 100644
index 0000000..37e9f1e
--- /dev/null
+++ b/man/sortparamADEg.Rd
@@ -0,0 +1,57 @@
+\name{sortparamADEg}
+
+\alias{sortparamADEg}
+\alias{sortparamADEgS}
+
+\title{
+Sort a sequence of graphical parameters
+}
+
+\description{
+Sort a sequence of graphical parameters in several lists.
+}
+
+\usage{
+sortparamADEg(...)
+sortparamADEgS(..., graphsnames, nbsubgraphs = rep(1, length(graphsnames)))
+}
+
+\arguments{
+  \item{...}{a sequence of graphical parameters}
+  
+  \item{graphsnames}{a sequence containing the name of each simple graph of the ADEgS}
+  
+  \item{nbsubgraphs}{a sequence containing the number of sub-graphs in each graph named in \code{graphsnames}}
+      
+}
+
+\value{
+  \code{sortparamADEg} return a list of four lists named \code{adepar}, \code{trellis}, \code{g.args} and \code{rest}.
+  \code{sortparamADEgS} return a list of as many lists as the length of \code{graphsnames}, i.e., as the number of 
+  sub-graphs of the ADEgS. The names of the lists are \code{graphsnames} and each sub-list is the result of the 
+  \code{sortparamADEg} function aplly on each sub-graph.
+  }
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\examples{
+
+l1 <- sortparamADEg(xlab = "x-axis label", ylab = "y-axis label", plabels.cex = 1.5, 
+  porigin.include = FALSE)
+length(l1)
+names(l1)
+  
+l2 <- sortparamADEgS(xlab = "x-axis label", eig.main = "Eigenvalues", row.ppoints.col = "red",
+  porigin.include = FALSE, graphsnames = c("row", "col", "eig"))
+names(l2)
+names(l2$row)
+
+l3 <- sortparamADEgS(xlab = "x-axis label", eig.main = "Eigenvalues", row.ppoints.col = "pink",
+  porigin.include = FALSE, graphsnames = c("row", "col", "eig"), nbsubgraphs = c(1, 2, 1))
+names(l3)
+length(l3$row)
+length(l3$col)
+}
+
+\keyword{aplot}
diff --git a/man/superpose.Rd b/man/superpose.Rd
new file mode 100644
index 0000000..97e83bc
--- /dev/null
+++ b/man/superpose.Rd
@@ -0,0 +1,106 @@
+\name{superpose}
+
+\alias{superpose}
+\alias{superpose-methods}
+\alias{superpose,ADEgORtrellis,ADEgORtrellis,ANY,ANY-method}
+\alias{superpose,ADEgS,ADEgORtrellis,numeric,logical-method}
+\alias{superpose,ADEgS,ADEgORtrellis,numeric,ANY-method}
+\alias{superpose,ADEgS,ADEgORtrellis,missing,ANY-method}
+\alias{superpose,ADEgS,ADEgS,missing,ANY-method}
+
+\alias{+-methods}
+\alias{\S4method{+}{ADEg}}
+\alias{+,ADEg,ADEg-method}
+\alias{+,ADEg,ADEgS-method}
+\alias{+,ADEgS,ADEg-method}
+
+\title{Superpose two graphics}
+
+\description{
+  This function superposes two graphics and extends the graphical constraints of a first graphic to a second one.
+}
+
+\usage{
+superpose(g1, g2, which, plot = FALSE)
+\S4method{+}{ADEg}(e1, e2)
+}
+
+\arguments{
+  \item{g1}{an object of class \code{ADEg}, \code{ADEgS} or \code{trellis}}
+  
+  \item{g2}{an object of class \code{ADEg}, \code{ADEgS} or \code{trellis} superposed on \code{g1}}
+  
+  \item{e1}{an object of class \code{ADEg} or \code{ADEgS}}
+  
+  \item{e2}{an object of class \code{ADEg} or \code{ADEgS} superposed on \code{e1}}
+  
+  \item{which}{if \code{g1} is an \code{ADEgS}, which \code{ADEg} is used as the base of superposition 
+  (\code{g2} is superposed on \code{g1[[which]]})}
+  
+  \item{plot}{a logical indicating if the graphics is displayed}
+}
+
+
+\details{
+  The created \code{ADEgS} object is a layout of two graphical objects. 
+  Each of the two objects superposed still have its graphical parameters in the created layout.
+  However, the \code{ADEgS} displayed favour the graphical parameters of the object below : 
+  displayed limits, grid, legend and axes are those of \code{g1} (respectively \code{e1}) and \code{g2} 
+  (respectively \code{e2}) has transparent background and labels' boxes.
+  
+  The \code{superpose} method is defined for: \itemize{
+    \item{\code{signature(g1 = "ADEgS", g2 = "ADEg", which = "numeric",	plot = "logical")}}
+    \item{\code{signature(g1 = "ADEgS", g2 = "ADEg", which = "numeric", plot = "ANY")}}
+    \item{\code{signature(g1 = "ADEgS", g2 = "ADEg", which = "missing",	plot = "ANY")}: 
+      If \code{which} is \code{missing}, the last \code{ADEg} of \code{g1 at ADEglist} is used as the base of superposition. In that case, \code{which = length(g1)}}
+    \item{\code{signature(g1 = "ADEgORtrellis", g2 = "ADEgORtrellis", which = "ANY", plot = "ANY")}: 
+      If \code{g1} is an \code{ADEg} object, no \code{which} is needed.}
+    \item{\code{signature(g1 = "ADEgS", g2 = "ADEgS", which = "missing", plot = "ANY")}}
+  }
+  
+  The \code{+} method is defined for: \itemize{
+    \item{\code{signature(e1 = "ADEg", e2 = "ADEg")}: superpose e2 on e1}
+    \item{\code{signature(e1 = "ADEg", e2 = "ADEgS")}: superpose e2 to e1}
+    \item{\code{signature(e1 = "ADEgS", e2 = "ADEg")}: calls the \code{+} method with signature 
+      \code{(e1 = "ADEg", e2 = "ADEgS")}.}
+  }
+}
+
+\value{
+  An object of class \code{"ADEgS"}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\link{add.ADEg}}
+  \code{\linkS4class{ADEgS}}
+  \code{\linkS4class{ADEg}}
+}
+
+\examples{
+cha <- LETTERS[1:20]
+xy <- cbind.data.frame(runif(length(cha)), runif(length(cha)))
+g1 <- s.label(xy, labels = cha, ppoints.alpha = 0, pbackground.col = "grey85")
+g2 <- s.label(xy, labels = cha, plabels.cex = 0, paxes.draw = TRUE, ppoints.pch = 4, 
+  ppoints.col = "red")
+g3 <- superpose(g1, g2, plot = TRUE)
+g4 <- superpose(g2, g1, plot = TRUE)
+
+data(jv73, package = "ade4")
+pca1 <- ade4::dudi.pca(jv73$morpho, scannf = FALSE)
+g5 <- s.label(pca1$li, plabels.optim = TRUE)
+g6 <- s.class(pca1$li, jv73$fac.riv, starSize = 0, ellipseSize = 0, chullSize = 1, 
+  ppolygons.alpha = 0.4, col = rainbow(12), ppoints.cex = 0)
+g5 + g6
+
+\dontrun{g7 <- s.label(pca1$li, plabels.optim = TRUE, facets = jv73$fac.riv, plot = FALSE)
+g8 <- s.class(pca1$li, jv73$fac.riv, facets = jv73$fac.riv, starSize = 0, chullSize = 1, 
+  ellipseSize = 0, ppolygons.alpha = 0.4, col = rainbow(12), ppoints.cex = 0, plot = FALSE)
+g9 <- superpose(g7, g8, plot = TRUE)
+}
+}
+
+\keyword{hplot}
+\keyword{methods}
diff --git a/man/table.image.Rd b/man/table.image.Rd
new file mode 100644
index 0000000..a4f6815
--- /dev/null
+++ b/man/table.image.Rd
@@ -0,0 +1,83 @@
+\name{table.image}
+\alias{table.image}
+
+\title{Heat map-like representation with colored cells}
+
+\description{
+  This function represents a two dimensional table plot in which cells are colored according with their value.
+}
+
+\usage{
+table.image(dftab, coordsx = 1:ncol(as.matrix(dftab)), coordsy =
+  nrow(as.matrix(dftab)):1, labelsx, labelsy, nclass = 3,
+  breaks = NULL, col = NULL, plot = TRUE, storeData =
+  TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dftab}{a data frame, matrix, contingency table or distance matrix used to produce the plot}
+  
+  \item{coordsx}{an integer or a vector indicating the columns of \code{dftab} kept}
+  
+  \item{coordsy}{an integer or a vector indicating the rows of \code{dftab} kept}
+  
+  \item{labelsx}{columns labels}
+  
+  \item{labelsy}{rows labels}
+  
+  \item{breaks}{a vector of values to split \code{dftab}. If \code{NULL}, \code{pretty(dftab, nclass)} is used.}
+  
+  \item{nclass}{an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
+  
+  \item{col}{a color or a colors vector used for the cells}
+  
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{T.image}) or \code{ADEgS} (if \code{add} is \code{TRUE}).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{T.image}}
+  \code{\linkS4class{ADEg.T}}
+}
+
+\examples{
+tab <- as.table(matrix(rnorm(900), ncol = 30))
+g1 <- table.image(tab)
+
+# add a continuous color bar as legend
+# update(g1, plegend.drawColorKey = TRUE)
+
+g2 <- table.image(tab, n = 100, coordsx = c(30, 1:29), plegend.drawKey = FALSE)
+
+data(rpjdl, package = "ade4")
+X <- data.frame(t(rpjdl$fau))
+Y <- data.frame(t(rpjdl$mil))
+coa1 <- ade4::dudi.coa(X, scannf = FALSE)
+g3 <- table.image(Y, coordsx = rank(coa1$co[, 1]), coordsy = 1:8, nclas = 5, 
+  labelsx = "", plegend.drawKey = FALSE)
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/table.value.Rd b/man/table.value.Rd
new file mode 100644
index 0000000..7346d06
--- /dev/null
+++ b/man/table.value.Rd
@@ -0,0 +1,125 @@
+\name{table.value}
+\alias{table.value}
+
+\title{Heat map-like representation with proportional symbols}
+
+\description{
+  This function represents a two dimensional table plot with proportional or colored squares or circles for each value.
+}
+
+\usage{
+table.value(dftab, coordsx = 1:ncol(as.matrix(dftab)), coordsy =
+nrow(as.matrix(dftab)):1, labelsx, labelsy, breaks = NULL, method =
+c("size", "color"), symbol = c("square", "circle", "diamond",
+"uptriangle", "downtriangle"), col = NULL, nclass = 3, center = 0,
+centerpar = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dftab}{a data frame, matrix, contingency table or distance matrix used to produce the plot}
+  
+  \item{coordsx}{an integer or a vector indicating the columns of \code{dftab} kept}
+  
+  \item{coordsy}{an integer or a vector indicating the rows of \code{dftab} kept}
+
+  \item{labelsx}{columns labels}
+  
+  \item{labelsy}{rows labels}
+
+  \item{breaks}{a vector of values to split \code{dftab}. If \code{NULL}, \code{pretty(dftab, nclass)} is used.}
+  
+  \item{method}{\code{color} or \code{size} value for represent \code{z}.   
+    If \code{color}, a palette of color is used for the symbols (one color per interval).
+    If \code{size}, symbols of proportional area are used. Area is 0 for values
+    equals to center (default 0). Two colors are used, for values less than center and larger than center.}
+  
+  \item{symbol}{value for symbol type}
+  
+  \item{col}{a color or a colors vector to color symbols.
+    If \code{method} is \code{size}, a 2-length vector of color is expected. 
+    If \code{method} is \code{color}, it must have as many colors as the number of class}
+  
+  \item{nclass}{an integer for the number of desired intervals, ignored if \code{breaks} is not missing.}
+  
+  \item{center}{a center value for method \code{size}}
+    
+  \item{centerpar}{a logical or a list to represent center value using elements in the 
+    \code{adegpar("ppoints")} list}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data should be stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{T.cont} if \code{dftab} is an \code{table} object, 
+  otherwise subclass \code{T.value}) or \code{ADEgS} (if \code{add} is \code{TRUE}).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\note{
+  For the symbol size, if the method is \code{size}, we use perceptual scaling (Tanimura et al. 2006) .  
+}
+
+\references{
+  Tanimura, S. and Kuroiwa, C. and Mizota, T. 2006 Proportional symbol
+  mapping in R \emph{Journal of Statistical Software} \bold{15}, 1--7 
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{T.value}}
+  \code{\linkS4class{T.cont}}
+  \code{\linkS4class{ADEg.T}}
+}
+
+\examples{
+## data.frame
+data(olympic, package = "ade4")
+w <- olympic$tab
+w <- data.frame(scale(w))
+wpca <- ade4::dudi.pca(w, scann = FALSE)
+g1 <- table.value(w, ppoints.cex = 0.5, axis.line = list(col = "darkblue"), 
+  axis.text = list(col = "darkgrey"))
+  
+# update the legend position
+update(g1, key = list(space = "left"))
+update(g1, key = list(columns = 1))
+
+g2 <- table.value(w, coordsy = rank(wpca$li[, 1]), ppoints.cex = 0.5, 
+  axis.line = list(col = "darkblue"), axis.text = list(col = "darkgrey"))
+g3 <- table.value(w, coordsy = wpca$li[, 1], coordsx = wpca$co[, 1], ppoints.cex = 0.5, 
+  axis.line = list(col = "darkblue"), axis.text = list(col = "darkgrey"))
+
+## distance
+data(eurodist)
+g5 <- table.value(eurodist, symbol = "circle", 
+  ptable.margin = list(bottom = 5, top = 16, left = 5, right = 16))
+
+\dontrun{
+## table
+data(rpjdl, package = "ade4")
+w <- data.frame(t(rpjdl$fau))
+wcoa <- ade4::dudi.coa(w, scann = FALSE)
+g6 <- table.value(as.table(as.matrix(w)), meanY = TRUE, coordsx = wcoa$c1[,1], 
+  coordsy = rank(wcoa$l1[,1]), ppoints.cex = 0.2, labelsx = "", col = "black")
+}
+}
+
+\keyword{aplot}
+\keyword{hplot}
diff --git a/man/triangle.class.Rd b/man/triangle.class.Rd
new file mode 100644
index 0000000..3941d11
--- /dev/null
+++ b/man/triangle.class.Rd
@@ -0,0 +1,88 @@
+\name{triangle.class}
+\alias{triangle.class}
+
+\title{Ternary plot with a partition in classes (levels of a factor)}
+
+\description{
+  This function represents a three dimensional scatter plot with a partition in classes (levels of a factor).
+}
+
+\usage{
+triangle.class(dfxyz, fac, wt = rep(1, NROW(fac)), labels = levels(fac), 
+  col = NULL, ellipseSize = 1, starSize = 1, chullSize = NULL, adjust = TRUE, 
+  min3d = NULL, max3d = NULL, showposition = TRUE, facets = NULL, plot = TRUE, 
+  storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxyz}{a three columns data frame used to produce the plot}
+  
+  \item{fac}{a factor (or a matrix of factors) splitting the rows of \code{dfxyz}}
+  
+  \item{wt}{a vector of weights for \code{fac}}
+  
+  \item{labels}{a character vector containing the class' labels}
+  
+  \item{col}{a logical, a color or a colors vector to color points, ellipses, labels, lines and polygons}
+  
+  \item{ellipseSize}{a positive number for ellipse size}
+  
+  \item{starSize}{a number between 0 and 1 for the size of the stars segments joining the stars' center 
+    (centroids) and the matching points}
+    
+  \item{chullSize}{\code{NULL} or a vector of numbers between 0 and 1 for the fraction of points included in the convex hull}
+  
+  \item{adjust}{a logical to adjust the device with the limits of the smaller equilateral triangle containing the values}
+  
+  \item{min3d}{a vector of three values for triangular minimal limits}
+  
+  \item{max3d}{a vector of three values for triangular maximal limits}
+  
+  \item{showposition}{a logical indicating whether the used triangle should be shown in the complete one}
+  
+  \item{facets}{a factor splitting the rows of \code{dfxyz} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{Tr.class}) or \code{ADEgS} (if \code{showposition} is TRUE, 
+  if \code{add} is \code{TRUE} and/or if facets are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{Tr.class}}
+  \code{\linkS4class{ADEg.Tr}}
+}
+
+\examples{
+data(euro123, package = "ade4")
+fac1 <- euro123$plan$an
+df1 <- rbind.data.frame(euro123$in78, euro123$in86, euro123$in97)
+triangle.class(df1, fac = fac1, showposition = TRUE, col = c(1, 2, 3))
+triangle.class(df1, fac = fac1, showposition = FALSE, plabels.cex = 0, col = c(1, 2, 3), 
+  key = list(space = "left"))
+}
+
+\keyword{hplot}
+\keyword{aplot}
diff --git a/man/triangle.label.Rd b/man/triangle.label.Rd
new file mode 100644
index 0000000..199dfd3
--- /dev/null
+++ b/man/triangle.label.Rd
@@ -0,0 +1,88 @@
+\name{triangle.label}
+\alias{triangle.label}
+
+\title{Ternary plot with labels}
+
+\description{
+  This function represents a three dimensional scatter plot with labels.
+}
+
+\usage{
+triangle.label(dfxyz, labels = rownames(dfxyz), adjust = TRUE, min3d = NULL, 
+  max3d = NULL, addaxes = FALSE, addmean = FALSE, meanpar = NULL, axespar = NULL, 
+  showposition = TRUE, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, 
+  pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxyz}{a three columns data frame used to produce the plot}
+  
+  \item{labels}{a character vector containing labels for points}
+  
+  \item{adjust}{a logical to adjust the device with the limits of the smaller equilateral triangle containing the values}
+  
+  \item{min3d}{a vector of three values for triangular minimal limits}
+  
+  \item{max3d}{a vector of three values for triangular maximal limits}
+  
+  \item{addaxes}{a logical to draw the principal axes}
+  
+  \item{addmean}{a logical to plot the mean}
+  
+  \item{meanpar}{a list to represent mean points using \code{pch}, \code{cex} and \code{col}}
+  
+  \item{axespar}{a list to represent axes lines using \code{col}, \code{lwd} and \code{lty}}
+  
+  \item{showposition}{a logical indicating whether the used triangle should be shown in the complete one}
+ 
+  \item{facets}{a factor splitting the rows of \code{dfxyz} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{Tr.label}) or \code{ADEgS} (if \code{showposition} is TRUE, 
+  if \code{add} is \code{TRUE} and/or if facets are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{Tr.label}}
+  \code{\linkS4class{ADEg.Tr}}
+}
+
+\examples{
+data(euro123, package = "ade4")
+df <- rbind.data.frame(euro123$in78, euro123$in86, euro123$in97)
+row.names(df) <- paste(row.names(euro123$in78), rep(c(1, 2, 3), rep(12, 3)), sep = "")
+g1 <- triangle.label(df, label = row.names(df), showposition = TRUE, plot = FALSE)
+g2 <- triangle.label(euro123$in78, plabels.cex = 0, ppoints.cex = 2, addmean = TRUE, 
+  show = FALSE, plot = FALSE)
+g3 <- triangle.label(euro123$in86, labels = row.names(euro123$in78), plabels.cex = 0.8, 
+  plot = FALSE)
+g4 <- triangle.label(rbind.data.frame(euro123$in78, euro123$in86), plabels.cex = 0.8, 
+  addaxes = TRUE, psub.te = "Principal axis", psub.cex = 1.5, psub.pos = "topright", plot = FALSE)
+G <- ADEgS(c(g1, g2, g3, g4), layout = c(2, 2))
+}
+
+\keyword{hplot}
+\keyword{aplot}
diff --git a/man/triangle.match.Rd b/man/triangle.match.Rd
new file mode 100644
index 0000000..2ec103e
--- /dev/null
+++ b/man/triangle.match.Rd
@@ -0,0 +1,72 @@
+\name{triangle.match}
+\alias{triangle.match}
+
+\title{Ternary plot of the matching between two sets of coordinates}
+
+\description{
+This function represents a three dimensional scatter plot of paired coordinates.
+}
+
+\usage{
+triangle.match(dfxyz1, dfxyz2, labels = row.names(as.data.frame(dfxyz1)), 
+  min3d = NULL, max3d = NULL, adjust = TRUE, showposition = TRUE, facets = NULL, 
+  plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxyz1}{a three columns data frame, the first system of coordinates, used to produce the plot}
+
+  \item{dfxyz2}{a three columns data frame, the second system of coordinates, with as many rows as \code{dfxyz1}, used to produce the plot.}
+
+  \item{labels}{a vector of character strings containing the matches' labels}
+
+  \item{adjust}{a logical to adjust the device with the limits of the smaller equilateral triangle containing the values}
+  
+  \item{min3d}{a vector of three values for triangular minimal limits}
+  
+  \item{max3d}{a vector of three values for triangular maximal limits}
+  
+  \item{showposition}{a logical indicating whether the used triangle should be shown in the complete one}
+  
+  \item{facets}{a factor splitting the rows of \code{dfxyz} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{Tr.match}) or \code{ADEgS} (if \code{showposition} is TRUE, 
+  if \code{add} is \code{TRUE} and/or if facets are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{Tr.match}}
+  \code{\linkS4class{ADEg.Tr}}
+}
+
+\examples{
+data(euro123, package = "ade4")
+triangle.match(euro123$in78, euro123$in86, plabels.cex = 0.8)
+}
+
+\keyword{hplot}
+\keyword{aplot}
diff --git a/man/triangle.traject.Rd b/man/triangle.traject.Rd
new file mode 100644
index 0000000..7e851a3
--- /dev/null
+++ b/man/triangle.traject.Rd
@@ -0,0 +1,89 @@
+\name{triangle.traject}
+\alias{triangle.traject}
+
+\title{Ternary plot with trajectories}
+
+\description{
+This function represents a three dimensional scatter plot with trajectories.
+}
+
+\usage{
+triangle.traject(dfxyz, fac = gl(1, nrow(dfxyz)), order, labels = levels(fac), 
+  col = NULL, adjust = TRUE, min3d = NULL, max3d = NULL, showposition = TRUE, 
+  facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
+}
+
+\arguments{
+  \item{dfxyz}{a three columns data frame, the first system of coordinates, used to produce the plot}
+
+  \item{fac}{a factor (or a matrix of factors) splitting the rows of \code{dfxyz}}
+  
+  \item{order}{a vector containing the drawing order of the trajectories. A vector of length equal to factor.}
+  
+  \item{labels}{a vector of character strings containing the trajectories' labels}
+  
+  \item{col}{a color or a colors vector to color points, labels and lines}
+
+  \item{adjust}{a logical to adjust the device with the limits of the smaller equilateral triangle containing the values}
+  
+  \item{min3d}{a vector of three values for triangular minimal limits}
+  
+  \item{max3d}{a vector of three values for triangular maximal limits}
+  
+  \item{showposition}{a logical indicating whether the used triangle should be shown in the complete one}
+  
+  \item{facets}{a factor splitting the rows of \code{dfxyz} so that subsets
+    of the data are represented on different sub-graphics}
+    
+  \item{plot}{a logical indicating if the graphics is displayed}
+  
+  \item{storeData}{a logical indicating if the data are stored in
+    the returned object. If \code{FALSE}, only the names of the data
+    arguments are stored}
+    
+  \item{add}{a logical. If \code{TRUE}, the graphic is superposed to the graphics
+    already plotted in the current device}
+    
+  \item{pos}{an integer indicating the position of the
+    environment where the data are stored, relative to the environment
+    where the function is called. Useful only if \code{storeData} is
+    \code{FALSE}}
+    
+  \item{\dots}{additional graphical parameters (see
+    \code{\link{adegpar}} and \code{\link[lattice]{trellis.par.get}})}
+}
+
+\details{
+  The \code{fac} factor is used to display several trajectories: each level of \code{fac} is a specific trajectory. 
+}
+
+\value{
+  An object of class \code{ADEg} (subclass \code{Tr.traject}) or \code{ADEgS} (if \code{showposition} is TRUE, 
+  if \code{add} is \code{TRUE} and/or if facets are used).\cr
+  The result is displayed if \code{plot} is \code{TRUE}.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{Tr.traject}}
+  \code{\linkS4class{ADEg.Tr}}
+}
+
+\examples{
+exo1 <- matrix(c(51.88, 32.55, 15.57, 44.94, 34.59, 20.47, 25.95, 39.15, 34.9,
+  37.87, 43.19, 18.94, 34.2, 43.32, 22.48, 16.13, 42.18, 41.69,
+  7.76, 70.93, 21.31, 6.22, 65.96, 27.82, 6.44, 57.06, 36.5,
+  37.24, 32.45, 30.31, 16.09, 31.22, 52.69, 6.54, 24.68, 68.78), ncol = 3, byr = TRUE)
+exo1 <- as.data.frame(exo1)
+names(exo1) <- c("agr", "ouv", "ter")
+com <- as.factor(rep(c("Gig", "Lun", "Gan", "Mat"), c(3, 3, 3, 3)))
+rec <- as.factor(rep(c("68", "75", "82"), 4))
+row.names(exo1) <- paste(com, rec, sep = "")
+tri1 <- triangle.traject(exo1, fac = com, showposition=FALSE, pgrid.draw = FALSE, 
+  col = TRUE, axis.text = list(cex = 0))
+}
+
+\keyword{hplot}
+\keyword{aplot}
diff --git a/man/zoom.Rd b/man/zoom.Rd
new file mode 100644
index 0000000..19be9e0
--- /dev/null
+++ b/man/zoom.Rd
@@ -0,0 +1,48 @@
+\name{zoom}
+
+\alias{zoom}
+\alias{zoom-methods}
+\alias{zoom,ADEg.S1,numeric,missing-method}
+\alias{zoom,ADEg.S1,numeric,numeric-method}
+\alias{zoom,ADEg.S2,numeric,missing-method}
+\alias{zoom,ADEg.S2,numeric,numeric-method}
+
+\title{Zoom in or out}
+
+\description{
+  This function performs a zoom on a \code{ADEg.S1} or \code{ADEg.S2} displayed object.
+}
+
+\usage{
+zoom(object, zoom, center)
+}
+
+\arguments{
+  \item{object}{a \code{ADEg.S1} or \code{ADEg.S2} object}
+  \item{zoom}{a numeric value to zoom in (if \code{zoom} > 1) or out (if \code{zoom} < 1)}
+  \item{center}{a numeric value (if \code{object} is a \code{ADEg.S1} object) or a two-length vector (if \code{object} is a \code{ADEg.S2} object) 
+    as a reference point to zoom (in or out). If it is \code{missing}, the displayed center point is used.}
+}
+
+\value{
+  Updated display after zoom.
+}
+
+\author{Alice Julien-Laferriere, Aurelie Siberchicot \email{aurelie.siberchicot at univ-lyon1.fr} and Stephane Dray
+}
+
+\seealso{
+  \code{\linkS4class{ADEg.S2}}
+  \code{\linkS4class{ADEg.S1}}
+}
+
+\examples{
+data(olympic, package = "ade4")
+dudi1 <- ade4::dudi.pca(olympic$tab, scan = FALSE)
+g <- s.corcircle(dudi1$co, lab = names(olympic$tab), fullcircle = TRUE, psub.text = "data:olympic")
+zoom(g, 0.5)
+zoom(g, 2, center = c(-0.4, 0.8))
+}
+
+\keyword{iplot}
+
diff --git a/tests/add.R b/tests/add.R
new file mode 100644
index 0000000..d439ab8
--- /dev/null
+++ b/tests/add.R
@@ -0,0 +1,61 @@
+library(adegraphics)
+pdf("add.pdf")
+
+data(granulo, package = "ade4")
+df <- data.frame(t(apply(granulo$tab, 1, function(x) x / sum(x))))
+pca <- ade4::dudi.pca(df, scal = FALSE, scan = FALSE)
+
+g1 <- s.arrow(ade4::dudi.pca(data.frame(df), scan = F, nf = 2)$co)
+g2 <- s.label(pca$li, plabels.cex = 0.5, plabels.col = "blue", plot = F)
+g3 <- add.ADEg(g2)
+g4 <- s.label(pca$c1, plabels.col = "red", add = T)
+g5 <- s.arrow(pca$c1, plabels.cex = 1.5)
+g6 <- ADEgS(list(g1 = g1, g5 = g5), layout = c(1, 2))
+update(g6, pback.col = "lightblue", g1.plabels.cex = 2, g5.plabels.col = "red")
+
+
+## addtext
+# on a ADEg
+addtext(g1, -1, 1, "Data Granulo", plabels.cex = 1.5, plabels.col = "red")
+addtext(g1, -1, 1, c("Data", "Granulo"), plabels.cex = 1.5, plabels.col = c("red", "blue"))
+addtext(g1, -1, 1, c("Data", "Granulo"), plabels.cex = 1.5, plabels.col = "red")
+
+addtext(g1, c(-1, -0.5), 1, "Data Granulo", plabels.cex = 1.5, plabels.col = c("red", "blue"))
+addtext(g1, c(-1, -0.5), 1, c("Data", "Granulo"), plabels.cex = 1.5, plabels.col = c("red", "blue"))
+
+addtext(g1, -1, c(1, 0.9), c("Data", "Granulo"), plabels.cex = 1.5, plabels.col = "red")
+addtext(g1, -1, c(1, 0.9), c("Data", "Granulo"), plabels.cex = c(1.5, 2), plabels.col = "red")
+
+data(dunedata, package = "ade4")
+afc1 <- ade4::dudi.coa(dunedata$veg, scannf = FALSE)
+g7 <- table.value(dunedata$veg, symbol = "circle", ppoints.cex = 0.5, plot = FALSE)
+addtext(g7, 1, 20, "A", plabels.srt = 45, plabels.boxes.draw = FALSE)
+
+# on a trellis
+library(lattice)
+g8 <- xyplot(1 ~ 1)
+addtext(g8, c(1.1, 0.9), 1.1, "trellis test", plabels.col = c("orange", "grey"))
+
+# on a ADEgS
+addtext(g6, -0.9, -0.1, "Data Granulo", plabels.cex = 1.2, which = 1)
+addtext(g6, -0.5, -0.1, "Data Granulo", plabels.cex = 1.2, which = 2)
+addtext(g6, -0.9, -0.1, "Data Granulo", plabels.cex = 1.2, which = 1:2)
+addtext(g6, c(-0.9, -0.5), c(-0.2, -0.1), "Data Granulo", plabels.cex = 1.2, which = 1:2)
+addtext(g6, c(-0.9, -0.5), c(-0.2, -0.1), "Data Granulo", plabels.cex = 1.2, which = 1:2, plabels.col = c("red", "blue"))
+
+xy2 <- cbind.data.frame(x = runif(200, -1, 1), y = runif(200, -2, 2), y2 = runif(200, -0.5, 0.5))
+fac2 <- factor(xy2$x > 0) 
+g9 <- s.class(xy2, fac = fac2, xax = 1, yax = 2:3, plot = FALSE)
+addtext(g9, 0, 0, "A", plabels.col = "red", plabels.cex = 2)
+addtext(g9, c(-2.1, -1.07), c(2, 1), c("A", "B"), plabels.col ="red", plabels.cex = 2, which = 1:2)
+addtext(g9, c(-2.1, -1.07), c(2, 1), c("A", "B"), plabels.col = c("green", "red"), plabels.cex = c(3, 2), which = 1:2)
+
+xy <- cbind.data.frame(x = runif(200, -1, 1), y = runif(200, -1, 1))
+posi <- factor(xy$x > 0) : factor(xy$y > 0)
+g10 <- s.class(xy, fac = posi, facets = posi, pellipses.col = 1:4, plabels.cex = 0, plegend.drawKey = FALSE, psub.cex = 0, plot = FALSE)
+addtext(g10, c(0.5, 0.5, -0.5, -0.5), c(0.5, -0.5), levels(posi), plabels.cex = 2, plabels.col = 1:4)
+
+# when superposition
+# addtext(g3, -0.9, -0.2, "Data Granulo", plabels.cex = 1.2, which = 1) # message d'erreur : unable to find an inherited method for function ‘printSuperpose’ for signature ‘"S2.label", "ADEgS"’
+# addtext(g3, -0.5, -0.1, "Data Granulo", plabels.cex = 1.2, which = 2)
+# addtext(g3, -0.9, -0.2, "Data Granulo", plabels.cex = 1.2, which = 1:2)
diff --git a/tests/adegraphics.R b/tests/adegraphics.R
new file mode 100644
index 0000000..581a5fc
--- /dev/null
+++ b/tests/adegraphics.R
@@ -0,0 +1,41 @@
+library(adegraphics)
+pdf("adegraphics.pdf")
+
+xy <- cbind.data.frame(runif(7), runif(7))
+g1 <- s.label(xy)
+
+data(olympic, package = "ade4")
+pca <- ade4::dudi.pca(olympic$tab, scan = FALSE)
+g2 <- s.corcircle(pca$co, lab = names(olympic$tab))
+
+g3 <- ADEgS(list(g1, g2), rbind(c(0, 0, 0.5, 1), c(0.5, 0, 1, 1)))
+g4 <- ADEgS(list(g1, g2), layout = c(1, 2)) ## the same as g3
+g4b <- ADEgS(list(g1, g2)) ## the same as g3
+g5 <- s.label(xy, plabels.cex = 0, paxes.draw = TRUE, ppoints.col = "red")
+
+g6 <- superpose(g1, g5, plot = TRUE)
+g6b <- s.density(xy)
+g7 <- superpose(s.density(xy), g5, plot = TRUE)
+ 
+g8 <- superpose(s.label(xy, plabels.boxes.col = "orange", plot = FALSE), 
+                s.label(xy, plabels.cex = 0, paxes.draw = TRUE, ppoints.col = "red", plot = FALSE), 
+                plot = TRUE)
+
+g9 <- g8[1, drop = TRUE]
+class(g9)
+g10 <- g8[1, drop = FALSE]
+class(g10)
+
+g11 <- ADEgS(list(g8, g3), positions = rbind(c(0, 0, 0.5, 1), c(0.5, 0, 1, 1)))
+
+## cbindADEgS - rbindADEgS
+g12 <- cbindADEg(g1, g2, plot = TRUE) ## the same as g3
+g13 <- cbindADEg(g8, g3, plot = TRUE) ## the same as g11
+g14 <- rbindADEg(g8, g3, plot = TRUE)
+
+data(banque, package = "ade4")
+banque.acm <- ade4::dudi.acm(banque, scann = FALSE, nf = 3)
+g15 <- score(banque.acm, which = which(banque.acm$cr[, 1] > 0.2), plot = FALSE)
+g15 <- g15[[1]]
+cbindADEg(g15[[1]], g15[[2]], plot = TRUE)   ## work on trellis object
+
diff --git a/tests/nbgraph.R b/tests/nbgraph.R
new file mode 100644
index 0000000..3e0e278
--- /dev/null
+++ b/tests/nbgraph.R
@@ -0,0 +1,15 @@
+library(adegraphics)
+library(spdep)
+library(maptools)
+library(lattice)
+pdf("nbgraph.pdf")
+
+columbus <- readShapePoly(system.file("etc/shapes/columbus.shp", package = "spdep")[1])
+coords <- coordinates(columbus)
+col.gal.nb <- read.gal(system.file("etc/weights/columbus.gal", package = "spdep")[1])
+
+nbobject <- col.gal.nb
+xyplot(coords[, 2] ~ coords[, 1],
+  		 panel = function(...) {adeg.panel.nb(col.gal.nb, coords)})
+
+g1 <- s.label(coords, nb = nbobject, porigin.include = F, plabels.cex = 0.7, ppoints.cex = 2, Sp = columbus, pSp.col = "red", pSp.alpha = 0.5)
diff --git a/tests/panelSpatial.R b/tests/panelSpatial.R
new file mode 100644
index 0000000..60cb5bf
--- /dev/null
+++ b/tests/panelSpatial.R
@@ -0,0 +1,84 @@
+library(adegraphics)
+library(maptools)
+pdf("panelSpatial.pdf")
+
+## ex1
+nc <- readShapePoly(system.file("shapes/sids.shp", package = "maptools")[1], proj4string = CRS("+proj=longlat +datum=NAD27"))
+dfxy1 <- coordinates(nc)
+g1 <- s.label(dfxy1, Sp = nc, pSp.col = colorRampPalette(c("yellow", "blue"))(52), pgrid.draw = FALSE, plabels.cex = 0)
+
+
+## ex2
+data(meuse, package = "sp")
+coordinates(meuse) <- ~ x + y
+data(meuse.grid)
+m <- SpatialPixelsDataFrame(points = meuse.grid[c("x", "y")], data = meuse.grid)
+data(meuse.riv)
+meuse.sr <- SpatialPolygons(list(Polygons(list(Polygon(meuse.riv)), "meuse.riv")))
+
+scale1 <- list("SpatialPolygonsRescale", offset = c(179900, 329600), scale = 500, fill = c("transparent", "black"), layout.scale.bar())
+text11 <- list("sp.text", c(179900, 329700), "0")
+text21 <- list("sp.text", c(180400, 329700), "500 m")
+arrow1 <- list("SpatialPolygonsRescale", offset = c(178750, 332500), scale = 400, layout.north.arrow())
+river <- list("sp.polygons", meuse.sr, fill = "lightblue")
+dfxy2 <- as.data.frame(coordinates(meuse))
+g2 <- s.value(dfxy2, z = meuse[, 1]$cadmium, sp.layout = list(scale1, text11, text21, arrow1, river), Sp = m)
+
+fac <- meuse at data$ffreq
+levels(fac)[1] <- "1 in 2 years"
+levels(fac)[2] <- "1 in 10 years"
+levels(fac)[3] <- "1 in 50 years"
+arrow2 <- list("SpatialPolygonsRescale", layout.north.arrow(), offset = c(181750, 330000), scale = 400)
+scale2 <- list("SpatialPolygonsRescale", layout.scale.bar(), offset =  c(178050, 333600), scale = 500, fill = c("transparent", "black"))
+text12 <- list("sp.text", c(178050, 333700), "0")
+text22 <- list("sp.text", c(178550, 333700), "500 m")
+g3 <- s.class(dfxy2, fac = fac, sp.layout = list(scale2, text12, text22, arrow2, river), starSize = 1, col = c(1, 2, 4), pellipses.col = c(1, 2, 4), 
+  pellipses.alpha = 0.7, plines.lty = 3, psub.text = "Flooding frequency \n near the Meuse river", psub.pos = c(0.2, 0.88), pgrid.text.cex = 0,
+  porigin.include = FALSE, Sp = meuse.sr)
+
+## ex3
+library(Guerry)
+data(gfrance85)
+
+dfxy4 <- coordinates(gfrance85)
+region.names <- data.frame(gfrance85)[, 5]
+col.region <- colors()[c(149, 254, 468, 552, 26)]
+g4 <- s.class(dfxy4, region.names, ellip = 0, star = 0, col = col.region, Sp = gfrance85, pSp.col = col.region[region.names], porig.inclu = F)
+
+
+## ex4
+library(sp)
+library(lattice)
+nc <- readShapePoly(system.file("shapes/sids.shp", package = "maptools")[1], proj4string = CRS("+proj=longlat +datum=NAD27"))
+
+sp <- SpatialPolygons(nc at polygons, nc at plotOrder)
+g5 <- xyplot(1 ~ 1, xlim = bbox(sp)[1, ], ylim = bbox(sp)[2, ], panel = function(...) {adeg.panel.Spatial(SpObject = sp, col = "black", border = "black")})
+g6 <- xyplot(1 ~ 1, xlim = bbox(sp)[1, ], ylim = bbox(sp)[2, ], panel = function(...) {adeg.panel.Spatial(nc, col = 1:14, border = "black")})
+g7 <- xyplot(1 ~ 1, xlim = bbox(sp)[1, ], ylim = bbox(sp)[2, ], aspect = "iso", panel = function(...) {sp.polygons(nc, col = "black", fill = 1:5)})
+g8 <- xyplot(1 ~ 1, xlim = bbox(sp)[1, ], ylim = bbox(sp)[2, ], panel = function(...) {adeg.panel.Spatial(SpObject = sp, col = "black", border = "blue")})
+g9 <- xyplot(1 ~ 1, xlim = bbox(sp)[1, ], ylim = bbox(sp)[2, ], panel = function(...) {adeg.panel.Spatial(SpObject = nc, col = "black", border = "blue")})
+#g10 <- s.label(cbind(-80, 35), Sp = nc)
+#g11 <- s.label(cbind(-80, 35), Sp = sp)
+
+
+## ex5
+data(jv73, package = "ade4")
+g12 <- s.label(jv73$xy, Sp = jv73$Spatial)
+g13 <- s.label(jv73$xy, Sp = jv73$Spatial, pSp.col = "red")
+
+spoints <- SpatialPoints(jv73$xy)
+g14 <- s.label(jv73$xy, Sp = spoints, plab.cex = 0, ppoin.cex = 0, pSp.col = 1)
+
+sgrid <- SpatialGrid(GridTopology(c(0, 0), c(1, 1), c(3, 5)))
+xyplot(0:5 ~ 0:3, panel = function(...) sp.grid(sgrid, col = 1:2))
+
+nc <- SpatialGridDataFrame(getGridTopology(sgrid), data = data.frame(matrix(1:15, ncol = 1)))
+xyplot(0:5 ~ 0:3, panel = function(...) sp.grid(nc, col = 1, at = pretty(rnorm(15), 2), col.region = 2:3))
+xyplot(0:5 ~ 0:3, panel = function(...) adeg.panel.Spatial(nc, col = 1:3))
+xyplot(0:5 ~ 0:3, panel = function(...) adeg.panel.Spatial(nc, col = 1:2))
+
+
+## ex6
+mysp <- SpatialPointsDataFrame(matrix(rnorm(20), 10), data.frame(matrix(rnorm(20), 10)))
+s.Spatial(mysp)
+s.Spatial(mysp, col = c("red", "blue"))
diff --git a/tests/parameter.R b/tests/parameter.R
new file mode 100644
index 0000000..e8483d1
--- /dev/null
+++ b/tests/parameter.R
@@ -0,0 +1,95 @@
+library(adegraphics)
+pdf("parameter.pdf")
+
+adegparold <- adegpar()
+b1 <- length(adegraphics:::separation(plines = list(col = "blue"), plab.bo.dra = FALSE, plab = list(orien = F))$rest) == 0
+b2 <- length(adegraphics:::separation(plines = list(col = "blue", lwd = c(1:5)), parr.end = NA, plab.boxes.dr = FALSE)$rest) == 0
+b3 <- length(adegraphics:::separation(plot.li = list(col = "blue", lwd = c(1:5)), par.end = NA, pl.boxes.draw = FALSE, pattern = 1)$rest) == 2
+b4 <- length(adegraphics:::separation(plot.li = list(col = "blue", lwd = c(1:5)), par.end = NA, pl.boxes.draw = FALSE, pattern = 0)$rest) == 2
+b5 <- length(adegraphics:::separation()) == 2
+b6 <- length(adegraphics:::separation(par.sub.text = list("lineheight" = 5), pattern = 1)$rest) == 0
+b7 <- names(adegraphics:::separation(toto = "rienavoir!")$rest) == "toto"
+b8 <- names(adegraphics:::separation(toto = "rienavoir!", pattern = 1)$rest) == "toto"
+
+l1 <- list(parrow = list(col = "blue", lwd = c(1:5), end = NA), plboxes.draw = FALSE, pattern = 1)
+sep1 <- adegraphics:::separation(l1)  ## no recognition of "pattern" in a list
+
+l2 <- list("parrow.lwd", "plboxes.draw")
+sep2 <- adegraphics:::separation(l2)
+
+sep3 <- adegraphics:::separation("plboxes" = list("draw" = FALSE, "col"))
+sep4 <- adegraphics:::separation("plboxes" = list("draw" = FALSE, "col" = 2))
+sep5 <- adegraphics:::separation(pla.box = list(col = 1:5))
+sep6 <- adegraphics:::separation(pla.box.col = c(1:5))
+sep7 <- adegraphics:::separation(pla = list(box.col = 1:5))  ## don't match
+
+
+## adegpar test
+ad1 <- adegpar()
+ad2 <- adegpar("paxes.draw")
+ad3 <- adegpar("paxes.draw", "psub.cex")
+
+ad4 <- adegpar("psub.cex" = 5)
+ad5 <- adegpar("psub.cex" = 5, paxes.draw = FALSE)
+ad6 <- adegpar("psub")
+ad7 <- adegpar("psub.cex", "plabe.boxes")
+
+ad8 <- adegpar(ppoints = list(col = "yellow"), pgrid.space = 4, plines = list(lwd = c(1:5)))
+ad9 <- adegpar(ppoints = list(col = "red"), pgrid = list(nint = 12), plines = list(lwd = c(1:5)))
+ad10 <- adegpar("ppoints.col", "pgrid.nint", "plines")
+
+ad11 <- adegpar(paxes = list("x"), pgrid = list("nint", "col"))
+ad12 <- adegpar(list(pellip = list(col = "red"), grid.nint = 8, plines = list(lwd = c(1:5))))
+ad13 <- adegpar(paxes = list("x"), pgrid = list("nint", "col"), "plines", "pellipse")
+
+ad14 <- adegpar(plegend.drawKey = FALSE)
+ad15 <- adegpar(list(paxes = list(col = "white"), pgrid.nint = 6, plines = list(lwd = c(1:5))))
+ad16 <- adegpar(paxes = list(x = list(draw = TRUE)))
+
+adegpar(adegparold)
+
+## merging list
+l3 <- list(plabels = list(boxes = list(col = "white", alpha = 1)), plabels = list(cex = 2), plabels = list(col = "red"))
+adegraphics:::.mergingList(l3)
+adegraphics:::.mergingList(list(plabels = list(cex = 3)))
+
+
+## update parameters in graphics
+cha <- rep(LETTERS, length.out = 100)
+xy <- cbind.data.frame(runif(length(cha)), runif(length(cha)))
+g1 <- s.label(xy, labels = cha, paxes.draw = TRUE, plabels.cex = runif(length(cha), 0.5, 1.5))
+update(g1, paxes = list(aspect = "fill", draw = TRUE, x = list(draw = FALSE)), 
+  pgrid = list(col = "black", lwd = 2, lty = 5), 
+  plabels = list(col = 1:4, alpha = 0.5, cex = 2, boxes = list(border = "blue", col = "antiquewhite", alpha = 0.2, lwd = 2.5, lty = 5))) 
+
+g2 <- s.label(xy, labels = cha)
+update(g2, paxes.draw = FALSE, pgrid = list(col = "blue", lwd = 2, lty = 5, text = list(pos = "bottomright", cex = 2, col = "green")))
+update(g2, porigin = list(alpha = 0.5, col = "red", lty = 5 , lwd = 2, origin = c(0.6, 0.1)), pgrid.lwd = 0.5)
+update(g2, psub = list(text = "parameters", cex = 2, col = "red", position = "topright"))
+update(g2, plabels.cex = 0, ppoints = list(alpha = 0.4, cex = 2, col = "red", fill = "blue", pch = 21))
+
+
+## from tdr641
+data(doubs, package = "ade4")
+dudi1 <- ade4::dudi.pca(doubs$env, scale = T, scannf = F, nf = 3)
+dudi2 <- ade4::dudi.pca(doubs$fish, scale = T, scannf = F, nf = 2)
+coin1 <- ade4::coinertia(dudi1, dudi2, scannf = F, nf = 2)
+g3 <- s.arrow(coin1$l1, plabels.cex = .87)
+update(g3, plines = list(col = "blue", lwd = 2, lty = 3), parr.end = "both", parr = list(angle = 25, length = 0.5))
+
+## with spatial object
+library(maptools)
+nc <- readShapePoly(system.file("shapes/sids.shp", package = "maptools")[1], proj4string = CRS("+proj=longlat +datum=NAD27"))
+xy <- coordinates(nc)
+g4 <- s.label(xy, label = as.character(1:nrow(xy)), porigin.include = FALSE, Sp = nc, pSp.col = colorRampPalette(c("yellow", "blue"))(52), pgrid.draw = TRUE)
+update(g4, pSp = list(col = "yellow", border = "blue", lwd = 2, lty = 5, alpha = 0.01)) ## don't match : to solve
+
+## plabels parameter
+data(tortues, package = "ade4")
+pturtles <- tortues
+names(pturtles) <- c("length", "width", "height", "sex")
+sex <- pturtles$sex
+sexcol <- ifelse(sex == "M", "blue", "red")
+measures <- pturtles[, 1:3]
+pca1 <- ade4::dudi.pca(measures, scann = FALSE, nf = 3)
+g5 <- scatter(pca1, row.plabel.cex = 0, col.plabel.cex = c(1, 2, 3), posieig = "none", col.plabel.col = c("red", "blue", "green"))
diff --git a/tests/s1d.boxplot.R b/tests/s1d.boxplot.R
new file mode 100644
index 0000000..2feca5a
--- /dev/null
+++ b/tests/s1d.boxplot.R
@@ -0,0 +1,31 @@
+library(adegraphics)
+pdf("s1d.boxplot.pdf")
+
+## ex1
+x <- c(rnorm(10), rnorm(10))
+fact <- factor(rep(c("A", "B"), 10))
+g1 <- s1d.boxplot(x, fact)
+g2 <- s1d.boxplot(x, fact, ppolygon.border = c("red", "blue"), box.rectangle = list(alpha = 1, fill = "green"))
+
+## ex2
+w1 <- rnorm(100, -1)
+w2 <- rnorm(100)
+w3 <- rnorm(100, 1)
+f1 <- gl(3, 100)
+f2 <- gl(30, 10)
+g3 <- s1d.boxplot(c(w1, w2, w3), f1)
+g4 <- s1d.boxplot(c(w1, w2, w3), f2)
+g5 <- s1d.boxplot(c(w1, w2, w3), f2, p1d.rug.draw = FALSE)
+
+mat <- matrix(0, ncol = 1, nrow = 8)
+mat[c(2), ] <- 1
+mat[c(3:8), ] <- 2
+mat[1, ] <- 3
+g6 <- ADEgS(c(g3, g4, s1d.label(c(w1, w2, w3), p1d = list(rug = list(tck = 0.8), rev = TRUE), ppoints.cex = 0, plabels.cex = 0, plot = F, pgrid.draw = F)), 
+  layout = matrix((rev(mat)), ncol = 1))
+g7 <- s1d.boxplot(c(w1, w2, w3), data.frame(f1, f2))
+
+## ex3
+data(banque, package = "ade4")
+banque.acm <- ade4::dudi.acm(banque, scan = FALSE, nf = 4)
+s1d.boxplot(banque.acm$l1[, 1], banque[, 1:7], plabels.cex = 1.8)
diff --git a/tests/s1d.density.R b/tests/s1d.density.R
new file mode 100644
index 0000000..0c66eb5
--- /dev/null
+++ b/tests/s1d.density.R
@@ -0,0 +1,12 @@
+library(adegraphics)
+pdf("s1d.density.pdf")
+
+x1 <- rnorm(1000)
+g1 <- s1d.density(x1)
+g2 <- s1d.density(x1, fill = T, ppoly.col = "blue", p1d.rev = T)
+
+x2 <- c(rnorm(1000, mean = -0.5, sd = 0.5), rnorm(1000, mean = 1))
+fact <- rep(c("A", "B"), each = 1000)
+g3 <- s1d.density(x2, fact, col = c("red", "blue"))
+g4 <- s1d.density(x2, fact, col = FALSE, ppoly.col = 2:3, fill = T, p1d.rev = F)
+g5 <- s1d.density(x2, fact, col = FALSE, ppoly.col = 2:3, p1d.horizontal = F, p1d.rev = F, fill = TRUE)
diff --git a/tests/s1d.distri.R b/tests/s1d.distri.R
new file mode 100644
index 0000000..ce27d77
--- /dev/null
+++ b/tests/s1d.distri.R
@@ -0,0 +1,15 @@
+library(adegraphics)
+pdf("s1d.distri.pdf")
+
+## ex1
+score <- rnorm(10)
+df <- data.frame(matrix(rep(c(1, 2), 10), ncol = 2))
+g1 <- s1d.distri(score, df)
+
+## ex2
+set.seed(1)
+w <- seq(-1, 1, le = 200)
+distri <- data.frame(lapply(1:50, function(x) sample(200:1) * ((w >= (- x / 50)) & (w <= x / 50))))
+names(distri) <- paste("w", 1:50, sep = "")
+g2 <- s1d.distri(w, distri)
+g3 <- s1d.distri(w, distri, yrank = TRUE, sdS = 1.5)
diff --git a/tests/s1d.gauss.R b/tests/s1d.gauss.R
new file mode 100644
index 0000000..04ae361
--- /dev/null
+++ b/tests/s1d.gauss.R
@@ -0,0 +1,18 @@
+library(adegraphics)
+pdf("s1d.gauss.pdf")
+
+data(meau, package= "ade4")
+envpca <- ade4::dudi.pca(meau$env, scannf = FALSE)
+dffac <- cbind.data.frame(meau$design$season, meau$design$site)
+g1 <- s1d.gauss(envpca$li[, 1], dffac[, 1])
+g2 <- s1d.gauss(envpca$li[, 1], dffac[, 1], ppoly.col = 1:4, fill = TRUE, plines.col = 1:4, col = FALSE)
+
+g3 <- s1d.gauss(envpca$li[, 1], dffac[, 2], ppoly.col = 1:4, paxes.draw = TRUE, ylim = c(0, 2), fill = T, p1d.hori = F)
+update(g3, p1d.rev = T)
+
+g4 <- s1d.gauss(envpca$li[, 1], fac = dffac, fill = TRUE, col = 1:5)
+g5 <- s1d.gauss(envpca$li[, 1], fac = dffac, fill = T, col = F, ppoly.col = 1:6)
+g6 <- s1d.gauss(envpca$li[, 1], fac = dffac[, 1], fill = T, col = 1:6, ppoly.col = 1:6)
+
+g7 <- s1d.gauss(envpca$li[, 1], fac = dffac, fill = T, col = 1:6, ppoly.col = 1:6, steps = 10)
+g8 <- s1d.gauss(envpca$li[, 1], dffac[, 2])
diff --git a/tests/s1d.label.R b/tests/s1d.label.R
new file mode 100644
index 0000000..9d99c87
--- /dev/null
+++ b/tests/s1d.label.R
@@ -0,0 +1,11 @@
+library(adegraphics)
+pdf("s1d.label.pdf")
+data(meau, package= "ade4")
+
+envpca <- ade4::dudi.pca(meau$env, scannf = FALSE)
+
+g1 <- s1d.label(envpca$l1[, 1], row.names(envpca$l1))
+g2 <- s1d.label(envpca$l1[, 1], row.names(envpca$l1), p1d.hori = F)
+g3 <- s1d.label(envpca$l1[, 1], row.names(envpca$l1), plabels.boxes.draw = FALSE, plab.srt = 45, plabel.boxes =  list(draw = FALSE))
+g4 <- s1d.label(envpca$co[, 1], row.names(envpca$co), p1d.reverse = TRUE, poslabel = "value")
+g5 <- s1d.label(envpca$l1[, 1], row.names(envpca$l1), at = 0, plabel.cex = 0)
diff --git a/tests/s1d.match.R b/tests/s1d.match.R
new file mode 100644
index 0000000..c06ce76
--- /dev/null
+++ b/tests/s1d.match.R
@@ -0,0 +1,6 @@
+library(adegraphics)
+pdf("s1d.match.pdf")
+
+g1 <- s1d.match(-5:5, 2 * (-5:5))
+g2 <- s1d.match(rnorm(10), runif(10), p1d.hor = FALSE)
+g3 <- s1d.match(1:5, 7:11, p1d.hor = F, p1d.rev = T)
diff --git a/tests/s1dclass.R b/tests/s1dclass.R
new file mode 100644
index 0000000..b8b0973
--- /dev/null
+++ b/tests/s1dclass.R
@@ -0,0 +1,28 @@
+library(adegraphics)
+pdf("s1dclass.pdf")
+data(meau, package = "ade4")
+
+## ex1
+envpca <- ade4::dudi.pca(meau$env, scannf = FALSE)
+g1 <- s1d.class(envpca$li[, 1], poslab = "value", meau$design$season, col = 1:6)
+update(g1, p1d.horizontal = FALSE)
+update(g1, p1d.reverse = TRUE)
+g2 <- s1d.class(envpca$li[, 1], meau$design$season, col = 1:6, p1d.reverse = TRUE)
+g3 <- s1d.class(envpca$li[, 1], meau$design$season, col = 1:6, p1d.hori = F)
+
+## ex2
+set.seed(0)
+score1 <- c(rnorm(3, mean = 0, sd = 0.5), rnorm(3, mean = 1, sd = 0.5), rnorm(5, mean = 2, sd = 0.5))
+factor1 <- factor(rep(LETTERS[1:3], times = c(3, 3, 5)))
+g4 <- s1d.class(score1, factor1, col = 1:3)
+
+## ex3
+score2 <- c(rnorm(10, mean = 0, sd = 0.5), rnorm(15, mean = -1, sd = 0.2), rnorm(10, mean = 2, sd = 0.5))
+factor2 <- factor(rep(c(1, 3, 2), times = c(10, 15, 10)))
+levels(factor2) <- c("mean0", "mean2", "mean-1")
+g5 <- s1d.class(score2, factor2, col = 1:3)
+update(g5, posla = "value")
+
+indx <- rank(rnorm(35))
+factor2 <- factor2[rank(indx)]
+s1d.class(score2[indx], factor2[indx], col = 1:3, posla = "regular")
diff --git a/tests/sarrow.R b/tests/sarrow.R
new file mode 100644
index 0000000..726c240
--- /dev/null
+++ b/tests/sarrow.R
@@ -0,0 +1,33 @@
+library(adegraphics)
+pdf("sarrow.pdf")
+
+## ex1 : from tdr641
+data(doubs, package = "ade4") 
+dudi1 <- ade4::dudi.pca(doubs$env, scale = T, scan = F, nf = 3)
+dudi2 <- ade4::dudi.pca(doubs$fish, scale = T, scan = F, nf = 2)
+coin1 <- ade4::coinertia(dudi1, dudi2, scan = F, nf = 2)
+g1 <- s.arrow(coin1$l1, plabels.cex = 0.87)
+g2 <- s.arrow(coin1$c1, plabels.cex = 1)
+
+## ex2 : from bs81
+data(granulo, package = "ade4")
+w <- data.frame(t(apply(granulo$tab, 1, function(x) x / sum(x))))
+g3 <- s.arrow(ade4::dudi.pca(data.frame(w), scan = F, nf = 2)$co)
+
+wtr <- data.frame(t(w))
+wmoy <- data.frame(matrix(apply(wtr, 1, mean), 1))
+dudi3 <- ade4::dudi.pca(w, scal = FALSE, scan = FALSE)
+wmoy <- ade4::suprow(dudi3, wmoy)$lisup
+
+g4 <- s.arrow(dudi3$c1, plabels.cex = 1.5)
+g4 <- s.distri(dudi3$c1, wtr, starSize = 0.33, ellipseSize = 0, add = TRUE, plabels.cex = 1)
+g4 <- s.label(wmoy, ppoint.cex = 5, plabels.cex = 0, add = TRUE)
+
+## ex3
+data(deug, package = "ade4")
+pca1 <- ade4::dudi.pca(deug$tab, scal = FALSE, center = deug$cent, scan = FALSE)
+g5 <- s.arrow(40 * pca1$c1)
+
+## ex4
+xy <- cbind(rnorm(50), rnorm(50))
+g6 <- s.arrow(xy, plabels.cex = 0.9, parrows = list(angle = 20))
diff --git a/tests/scatter.R b/tests/scatter.R
new file mode 100644
index 0000000..00cf848
--- /dev/null
+++ b/tests/scatter.R
@@ -0,0 +1,56 @@
+## delete/remove this file when 'scatter' functions will be removed in ade4
+
+library(adegraphics)
+pdf("scatter.pdf")
+
+data(deug, package = "ade4")
+dd1 <- ade4::dudi.pca(deug$tab, scannf = FALSE, nf = 4)
+scatter(dd1, posieig = "bottomright")
+scatter(dd1, posieig = "bottomright", plot = T, prop = TRUE)
+scatter(dd1, posieig = "none", plot = T)
+scatter(dd1, posieig = "bottomleft", plot = T)
+scatter(dd1, posieig = "topright", plot = T)
+scatter(dd1, posieig = "topleft", plot = T, eig.col = c("white", "blue", "red"))
+
+data(rhone, package = "ade4")
+dd1 <- ade4::dudi.pca(rhone$tab, nf = 4, scannf = FALSE)
+g1 <- scatter(dd1, sub = "Principal component analysis", row = list(plabels.optim = TRUE), col.pla.boxes.alpha = 0.5)
+g1[2, drop = TRUE]
+scatter(dd1, row = list(sub = "Principal component analysis", plabels.optim = TRUE), col.pla.boxes.alpha = 0.5)
+scatter(dd1, prop = TRUE, ppoints.cex = 0.2, density.plot = TRUE, row = list(threshold = 0.01))
+
+
+##################### scatter.coa test
+data(housetasks, package = "ade4")
+par(mfrow = c(2, 2))
+dd2 <- ade4::dudi.coa(housetasks, scan = FALSE)
+ade4::scatter(dd2, method = 1, sub = "1 / Standard", posieig = "none")
+ade4::scatter(dd2, method = 2, sub = "2 / Columns -> averaging -> Rows", posieig = "none")
+ade4::scatter(dd2, method = 3, sub = "3 / Rows -> averaging -> Columns ", posieig = "none")
+g1 <- scatter(dd2, method = 1, row.sub = "1 / Standard", posieig = "none", plot = FALSE)
+g2 <- scatter(dd2, method = 2, col.sub = "2 / Columns -> averaging -> Rows", posieig = "none", plot = FALSE)
+g3 <- scatter(dd2, method = 3, row.sub = "3 / Rows -> averaging -> Columns ", posieig = "none", plot = FALSE)
+G <- ADEgS(list(g1, g2, g3), layout = c(2, 2), plot = TRUE)
+
+
+##################### plot.acm test
+data(lascaux, package = "ade4")
+
+acm1 <- ade4::dudi.acm(lascaux$ornem, sca = FALSE)
+p1 <- proc.time()
+ade4::scatter(acm1)
+Tade4 <- proc.time() - p1
+
+p2 <- proc.time()
+plot(acm1, ppoints.cex = 0.3, plot = T)
+Tadegraphics <- proc.time() - p2
+## faster caculus, longest display than for ade4
+
+
+##################### plot.fca text
+data(coleo, package = "ade4")
+coleo.fuzzy <- ade4::prep.fuzzy.var(coleo$tab, coleo$col.blocks)
+
+fca1 <- ade4::dudi.fca(coleo.fuzzy, scannf = FALSE, nf = 3)
+ade4::scatter(fca1)
+plot(fca1)
diff --git a/tests/sclass.R b/tests/sclass.R
new file mode 100644
index 0000000..b725f71
--- /dev/null
+++ b/tests/sclass.R
@@ -0,0 +1,28 @@
+library(adegraphics)
+pdf("sclass.pdf")
+
+xy0 <- cbind.data.frame(x = runif(20, -1, 1), y = runif(20, -1, 6))
+basic <- s.class(xy0, fac = factor(rep(c("A", "B"), le = 20)), chull = 0, star = 0)
+
+xy1 <- cbind.data.frame(x = runif(200, -1, 1), y = runif(200, -1, 6))
+fac1 <- factor(xy1$x > 0) : factor(xy1$y > 0)
+g1 <- s.class(xy1, fac = fac1, storeData = F, col = 1:4, pbackground.box = T, pbackground.col = grey(0.85), paxes.draw = T, ell = 0)
+
+## multiaxis
+xy2 <- cbind.data.frame(x = runif(200, -1, 1), y = runif(200, -2, 2), y2 = runif(200, -0.5, .5))
+fac2 <- factor(xy2$x > 0) 
+g2 <- s.class(xy2, fac = fac2, xax = 1, yax = 2:3, storeData = F, plot = F)
+print(g2)
+
+## insertion
+print(ADEgS(list(g1, g2), posi = rbind(c(0, 0, 1, 1), c(0.7, 0.5, 1, 0.9))))
+
+## color test
+g3 <- s.class(xy1, fac = fac2, psub.text = "Graphic 3", "ppoints.col" = 1:5, plabels.boxes = list(col = "white", alpha = 0.8), pellipses.col = 1:5, col = 1:5)
+
+## test convex hull and parameters
+xy4 <- cbind.data.frame(x = runif(200, -1, 1), y = runif(200, -1, 1))
+fac4 <- factor(xy4$x > 0) : factor(xy4$y > 0)
+col <- c("black", "red", "green", "blue")
+g4 <- s.class(xy4, fac4, ppoints.cex = 1.5, chull = T, ellipseSize = 0, starSize = 0, ppolygon = list(border = 4:1, col = 1:4, lty = 1:4, lwd = 2, alpha = 0.4))
+
diff --git a/tests/scorcircle.R b/tests/scorcircle.R
new file mode 100644
index 0000000..ed19ed8
--- /dev/null
+++ b/tests/scorcircle.R
@@ -0,0 +1,10 @@
+library(adegraphics)
+pdf("scorcircle.pdf")
+data(olympic, package = "ade4")
+
+dudi1 <- ade4::dudi.pca(olympic$tab, scan = FALSE) # a normed PCA
+g1 <- s.corcircle(dudi1$co, lab = names(olympic$tab))
+
+g2 <- s.corcircle(dudi1$co, lab = names(olympic$tab), fullcircle = T)
+g3 <- s.corcircle(dudi1$co, lab = names(olympic$tab), fullcircle = FALSE)
+g4 <- s.corcircle(dudi1$co, lab = names(olympic$tab), pback.col = "red", pbackground.box = FALSE)
diff --git a/tests/sdensity.R b/tests/sdensity.R
new file mode 100644
index 0000000..dc9e5e4
--- /dev/null
+++ b/tests/sdensity.R
@@ -0,0 +1,13 @@
+library(adegraphics)
+pdf("sdensity.pdf")
+
+xx1 <- rnorm(1000, 1, 2)
+yy1 <- rnorm(1000, 1, 2)
+
+g1 <- s.density(cbind(xx1, yy1), paxes.draw = T, gridsize = c(40, 40))
+g2 <- s.density(cbind(xx1, yy1), paxes.draw = T, gridsize = c(80, 80), col = colorRampPalette(c("red", "blue"))(58), storeData = FALSE, region = TRUE)
+g3 <- s.density(cbind(yy1 + 3, xx1 + 3), gridsize = c(400, 400))
+g4 <- s.density(cbind(xx1, yy1), paxes.draw = T, gridsize = c(200, 200), add = TRUE)
+g5 <- s.density(cbind(c(rnorm(50000, 1, 1), rnorm(50000, -1, 1)), c(rnorm(50000, -1, 0.5), rnorm(50000, 1, 0.5))), paxes.draw = T, gridsize = c(200, 200), region = TRUE, contour = TRUE, plabels.cex = 1, plabels.srt = "vertial")
+g6 <- s.density(cbind(rnorm(300, 3, 0.3), rnorm(300, -2, 0.5)), gridsize = c(500, 500), thres = 0.01, nr = 10, regions = list(alpha = 0.5), col = colorRampPalette(c("red", "blue"))(108))
+g7 <- s.density(cbind(c(rnorm(50000, 1, 1), rnorm(50000, -1, 1)), c(rnorm(50000, -1, 0.5), rnorm(50000, 1, 0.5))), paxes.draw = T, gridsize = c(100, 100), region = TRUE, contour = TRUE, plabels.cex = 1, nclass = 5)
diff --git a/tests/sdistri.R b/tests/sdistri.R
new file mode 100644
index 0000000..f2dd094
--- /dev/null
+++ b/tests/sdistri.R
@@ -0,0 +1,31 @@
+library(adegraphics)
+pdf("sdistri.pdf")
+
+xy5 <- cbind.data.frame(x = runif(200, -1, 1), y = runif(200, -1, 1))
+w1 <- as.numeric((xy5$x > 0) & (xy5$y > 0))
+w2 <- ((xy5$x > 0) & (xy5$y < 0)) * (1 - xy5$y) * xy5$x
+w3 <- ((xy5$x < 0) & (xy5$y > 0)) * (1 - xy5$x) * xy5$y
+w4 <- ((xy5$x < 0) & (xy5$y < 0)) * xy5$y * xy5$x
+distri <- data.frame(a = w1 / sum(w1), b = w2 / sum(w2), c = w3 / sum(w3), d = w4 / sum(w4))
+g5 <- s.distri(xy5, distri, plabels.boxes = list(col = "white", alpha = 1), plabels.cex = 2, plabels.col = 1:5)
+
+data(rpjdl, package = "ade4")
+xy6 <- ade4::dudi.coa(rpjdl$fau, scan = FALSE)$li + 3
+g6 <- s.distri(xy6, rpjdl$fau[, 5], ellipseSize = 1.5, psub = list(text = rpjdl$frlab[5], cex = 2, pos = c(0.2, 0.1)))
+g7 <- s.distri(xy6, rpjdl$fau[, 5], ellipseSize = 1.5, psub = list(text = rpjdl$frlab[5], cex = 2, pos = c(0.2, 0.1)), porigin = list(include = FALSE), pellipses.axes.col = "blue")
+
+## test add
+g8 <- s.distri(xy6, rpjdl$fau[, 5], ellipseSize = 1.5, psub = list(text = rpjdl$frlab[5], cex = 2, pos = c(0.2, 0.1)), porigin.include = FALSE, pellipses = list(col = "blue"))
+g9 <- s.distri(xy6, rpjdl$fau[, 12], ellipseSize = 1.5, psub = list(text = rpjdl$frlab[5], cex = 2, pos = c(0.2, 0.1)), porigin.include = FALSE, pellipses = list(col = "red"), add = TRUE)
+show(g9) ## g8 is a superposition, an ADEgS object 
+
+## add
+index <- c(1, 5, 8, 20, 21, 23, 26, 33, 36, 44, 47, 49)
+col <- colorRampPalette(c("blue", "red", "orange"))(49)
+s.distri(xy6, rpjdl$fau[, 1], ellipseSize = 1, starSize = 0, porigin.include = FALSE, pellipses = list(col = col[1], alpha = 0.3))
+for(i in index[-1])
+   s.distri(xy6, rpjdl$fau[, i], ellipseSize = 1, starSize = 0, porigin.include = FALSE, pellipses = list(col = col[i], alpha = 0.3), add = TRUE)
+
+current <- get("currentadeg", env = adegraphics:::.ADEgEnv)
+print(current[[6]])
+length(current) == length(index)
\ No newline at end of file
diff --git a/tests/shist.R b/tests/shist.R
new file mode 100644
index 0000000..37f4c40
--- /dev/null
+++ b/tests/shist.R
@@ -0,0 +1,16 @@
+library(adegraphics)
+pdf("shist.pdf")
+
+dfxy1 <- matrix(rnorm(200), ncol = 2)
+g1 <- s.label(dfxy1)
+g2 <- addhist(g1)
+
+dfxy2 <- dfxy1
+dfxy2[, 2] <- dfxy2[, 2] + rnorm(100, 2)
+g3 <- s.label(dfxy2)
+g4 <- addhist(g3, plot.polygon = list(col = "red"))
+
+data(rpjdl, package = "ade4")
+coa1 <- ade4::dudi.coa(rpjdl$fau, scannf = FALSE, nf = 4)
+g5 <- s.label(coa1$li)
+g6 <- addhist(g5)
diff --git a/tests/simage.R b/tests/simage.R
new file mode 100644
index 0000000..51a6c1a
--- /dev/null
+++ b/tests/simage.R
@@ -0,0 +1,26 @@
+library(adegraphics)
+library(sp)
+pdf("simage.pdf")
+
+## ex1
+xy <- data.frame(expand.grid(-3:3, -3:3))
+names(xy) <- c("x", "y")
+z <- (1 / sqrt(2)) * exp(-(xy$x ^ 2 + xy$y ^ 2) / 2)
+s.image(xy, z)
+s.image(xy, z, grid = 20)
+s.image(xy, z, grid = 500)
+
+## ex2
+Sr1 <- Polygon(cbind(c(0, 1, 2, 1, 2, 0 , -2, -1, -2, -1, 0), c(2.5, 1.5, 2, 0, -2, -1, -2, 0, 2, 1.5, 2.5)))    
+Srs1 <- Polygons(list(Sr1), ID = "stars")        
+SPp1 <- SpatialPolygons(list(Srs1))
+xy1 <- cbind(rnorm(100, 0, 1), rnorm(100, 0, 1.5))
+g1 <- s.image(xy1, runif(100), outsideLimits = SPp1)
+
+## ex3
+Sr2 <- Polygon(cbind(c(-0.5, 0.5, 0.5, -0.5, -0.5), c(0, 0, 1 ,1, 0)), hole = TRUE)
+Srs2 <- Polygons(list(Sr1, Sr2), ID = "hole")
+SPp2 <- SpatialPolygons(list(Srs2))
+xy2 <- cbind(c(rnorm(2000, 1, 0.25), rnorm(3000, -1, 1.5)), c(rnorm(2000, 1, 0.5), rnorm(3000, -1, 3)))
+z <- c(rnorm(2000, 12, 1), rnorm(3000, 1, 2))
+g2 <- s.image(xy2, z, outsideLimits = SPp2, grid = 500, xlim = c(-2.5, 2.5), ylim = c(-2, 3))
diff --git a/tests/slabel.R b/tests/slabel.R
new file mode 100644
index 0000000..3999213
--- /dev/null
+++ b/tests/slabel.R
@@ -0,0 +1,24 @@
+library(adegraphics)
+library(grid)
+pdf("slabel.pdf")
+
+x0 <- runif(50, -2, 2)
+y0 <- runif(50, -2, 2)
+z <- x0 ^ 2 + y0 ^ 2
+dfxy1 <- data.frame(x0, y0)
+g1 <- s.label(dfxy1, label = as.character(z < 1), paxes.draw = TRUE, axis.text = list(col = "grey"))
+g2 <- s.label(dfxy1[1, ])
+g3 <- s.label(dfxy1[1, ], pori.incl = FALSE)
+g4 <- s.label(dfxy1, labels = c("", "MM", "", NA, "ooo"), plabels.optim = TRUE)
+g5 <- s.label(dfxy1, labels = as.character(z < 1), psub = list(text = "Subtitle", col = "blue", position = "topleft"), plabels.col = 1:5, pgrid.text.pos = c(unit(0.95, "npc"), unit(0.94, "npc")))
+
+dfxy2 <- cbind(dfxy1, runif(50, -5, 5))
+g6 <- s.label(dfxy2, xax = 1, yax = 2:3, paxes.draw = TRUE, paxes.aspectratio = 1.5, plabels.cex = 0.8)
+
+l <- ls()
+x1 <- runif(length(l))
+x2 <- runif(100)
+y1 <- runif(length(l))
+y2 <- runif(100)
+g7 <- s.label(cbind(x2, y2), labels = as.character((x2 * x2 + y2 * y2) < 1))
+g8 <- s.label(cbind(x1, y1), labels = l, add = TRUE, plabels.col = "blue")
diff --git a/tests/slogo.R b/tests/slogo.R
new file mode 100644
index 0000000..eb280d8
--- /dev/null
+++ b/tests/slogo.R
@@ -0,0 +1,18 @@
+library(adegraphics)
+pdf("slogo.pdf")
+
+## ex1
+data(ggtortoises, package = "ade4")
+ico <- ggtortoises$ico[as.character(ggtortoises$pop$carap)]
+g1 <- s.logo(ggtortoises$pop, ico, pori.incl = FALSE)
+g2 <- s.label(ggtortoises$pop, add = TRUE, plabels = list(boxes = list(alpha = 0.4, border = "transparent")))
+
+## ex2
+data(capitales, package = "ade4")
+index <- unlist(lapply(1:15, function(i) which(names(capitales$logo) == tolower(rownames(capitales$xy)[i]))), use.names = FALSE)
+g3 <- s.logo(capitales$xy, capitales$logo[index])
+
+x <- c(0, max(capitales$area$x))
+y <- c(0, max(capitales$area$y))
+#g4 <- s.image(cbind(x, y), z = c(1, 2), outsideLimits = capitales$area, grid = 500, regions = list(col = "yellow", alpha = 0.9))
+#s.logo(capitales$xy, capitales$logo[index], add = TRUE)
diff --git a/tests/smatch.R b/tests/smatch.R
new file mode 100644
index 0000000..64308a7
--- /dev/null
+++ b/tests/smatch.R
@@ -0,0 +1,10 @@
+library(adegraphics)
+pdf("smatch.pdf")
+
+X <- data.frame(x = runif(50, -1, 2), y = runif(50, -1, 2))
+Y <- X + rnorm(100, sd = 0.3)
+
+g1 <- s.match(X, Y, ppoints.cex = 0, col = c("blue", "red"))
+g2 <- s.match(X, Y, arr = FALSE, ppoints.cex = 2, ppoints.col = c("blue", "green"))
+g3 <- s.match(X, Y, arr = FALSE)
+g4 <- s.match(X, Y, arrows = TRUE, plabels = list(alpha = 1, col = "black", cex = 1), plines = list(col = "red"), panel.background = list(col = "antiquewhite"))
diff --git a/tests/straject.R b/tests/straject.R
new file mode 100644
index 0000000..d073ec7
--- /dev/null
+++ b/tests/straject.R
@@ -0,0 +1,19 @@
+library(adegraphics)
+pdf("straject.pdf")
+
+rw <- function(a){
+  x <- 0
+  for(i in 1:49)
+    x <- c(x, x[length(x)] + runif(1, -1, 1))
+  x
+}
+
+x <- unlist(lapply(1:5, rw), use.names = FALSE)
+y <- unlist(lapply(1:5, rw), use.names = FALSE)
+z <- gl(5, 50)
+g1 <- s.traject(data.frame(x, y), z, ppoints.pch = 19:23, plines.col = rainbow(5))
+
+x <- unlist(lapply(1:2, rw), use.names = FALSE)
+y <- unlist(lapply(1:2, rw), use.names = FALSE)
+z <- gl(2, 50)
+g2 <- s.traject(data.frame(x, y), z, ppoints.pch = 21:20, plines.col = 1:2)
diff --git a/tests/svalue.R b/tests/svalue.R
new file mode 100644
index 0000000..eacdea1
--- /dev/null
+++ b/tests/svalue.R
@@ -0,0 +1,37 @@
+library(adegraphics)
+pdf("svalue.pdf")
+
+## ex1
+xy <- cbind.data.frame(x = runif(50, -1, 1), y = runif(50, 0, 2))
+z <- rnorm(50)
+z <- sapply(z, function(X) max(X, -3))
+z <- sapply(z, function(X) min(X, 3))
+val1 <- s.value(xy, z, method = "size", symbol = "square", plot = F)
+val2 <- s.value(xy, z, method = "color", symbol = "square", plot = F)
+val3 <- s.value(xy, z, method = "size", symbol = "circle", plot = F)
+val4 <- s.value(xy, z, method = "color", symbol = "circle", plot = F)
+g1 <- ADEgS(c(val1, val2, val3, val4), positions = layout2position(matrix(c(1, 2, 3, 4), 2, 2)), add = matrix(0, ncol = 4, nrow = 4))
+g2 <- s.value(xy, z, method = "color", symbol = "square", breaks = c(-3, -1, -0.5, 0, 0.5, 1, 3))
+g3 <- s.value(xy, z, method = "color", col = colorRampPalette(c("yellow", "blue"))(6))
+g4 <- s.value(xy, z, method = "size", symbol = "circle", paxes.draw = FALSE)
+
+## ex2
+xx <- runif(100) * 100
+yy <- 1:100 
+zz <- 1:100
+breaks <- c(0, 25, 50, 75, 100)
+g5 <- s.value(data.frame(xx, yy), zz, breaks = breaks, method = "color", paxes.draw = TRUE,  porigin.include = FALSE)
+g6 <- s.value(data.frame(xx, yy), cbind(zz, rev(zz)), breaks = breaks, method = "color", col = c("blue", "red", "green", "yellow"), paxes.draw = TRUE)
+g7 <- s.value(data.frame(xx, yy), cbind(zz, rev(zz)), nclass = c(2, 6), method = "color", col = c("blue", "red", "pink", "green", "yellow"), paxes.draw = TRUE)
+
+## ex3
+data(rpjdl, package = "ade4")
+fau.coa <- ade4::dudi.coa(rpjdl$fau, scan = FALSE, nf = 3)
+val5 <- s.value(fau.coa$li, fau.coa$li[,3], plot = FALSE)
+val6 <- s.value(fau.coa$li, fau.coa$li[, 3], center = 0, method = "size", symbol = "circle", col = c("yellow", "red"), plot = FALSE)
+g8 <- ADEgS(c(val5, val6), positions = layout2position(matrix(c(1, 2), 1, 2)), add = matrix(0, ncol = 2, nrow = 2))
+
+## ex3
+data(doubs, package = "ade4")
+g9 <- s.value(doubs$xy, doubs$env[, 1:2])
+g10 <- s.value(doubs$xy, doubs$env)
diff --git a/tests/tdist.R b/tests/tdist.R
new file mode 100644
index 0000000..3440864
--- /dev/null
+++ b/tests/tdist.R
@@ -0,0 +1,19 @@
+library(adegraphics)
+pdf("tdist.pdf")
+
+## ex1
+data(eurodist)
+g1 <- table.value(eurodist)
+g2 <- table.value(eurodist, ptable.margin = list(b = 17, t = 17, l = 17, r = 17))
+g3 <- table.value(eurodist, ptable.x = list(pos = "bottom"),
+                  ptable.margin = list(b = 17, t = 17, l = 17, r = 17))
+
+## ex2
+d <- as.dist(matrix(rep(1:5, 5), 5), upper = TRUE)
+attr(d, "Labels") <- c ("A", "B", "C", "D", "E")
+g4 <- table.value(d)
+
+## ex3
+data(irishdata, package = "ade4")
+d.geo <- dist(irishdata$xy.utm)
+g5 <- table.value(d.geo)
diff --git a/tests/timage.R b/tests/timage.R
new file mode 100644
index 0000000..26cefc0
--- /dev/null
+++ b/tests/timage.R
@@ -0,0 +1,26 @@
+library(adegraphics)
+pdf("timage.pdf")
+
+## ex1
+x <- 1:4
+y <- 1:4
+df <- data.frame(as.matrix(cbind(x, y)))
+g1 <- table.image(df, col = 2:4)
+update(g1, plegend.drawColorKey = TRUE)
+
+## ex2
+df <- matrix(0, 10, 10)
+df[1:3, 1:3] <- 5        
+g2 <- table.image(df)
+g3 <- table.image(df, breaks = c(5, 2, 0))
+
+## ex3
+data(rpjdl, package = "ade4")
+X <- data.frame(t(rpjdl$fau))
+Y <- data.frame(t(rpjdl$mil))
+coa1 <- ade4::dudi.coa(X, scan = FALSE)
+x <- rank(coa1$co[, 1])
+y <- rank(coa1$li[, 1])
+g4 <- table.image(Y, coordsx = x, coordsy = 1:8, axis.text = list(alpha = 0), pgrid.col = "black", pgrid.lwd = 0.8, col = c("white", "black"), plegend.drawKey = FALSE)
+g5 <- table.image(X, coordsx = x, coordsy = y, ptable = list(x = list(tck = 0), y = list(tck = 4)), pleg.drawKey = FALSE, labelsy = paste(" ", row.names(X), sep = ""))
+g6 <- ADEgS(list(g4, g5), positions = rbind(c(0, 0, 1, 0.3), c(0, 0.4, 1, 1)))
diff --git a/tests/triangle.R b/tests/triangle.R
new file mode 100644
index 0000000..bb960da
--- /dev/null
+++ b/tests/triangle.R
@@ -0,0 +1,31 @@
+library(adegraphics)
+pdf("triangle.pdf")
+
+## ex1
+data(euro123, package = "ade4")
+
+dfxyz1 <- rbind.data.frame(euro123$in78, euro123$in86, euro123$in97)
+row.names(dfxyz1) <- paste(row.names(euro123$in78), rep(c(1, 2, 3), rep(12, 3)), sep = "")
+g1 <- triangle.label(dfxyz1, label = row.names(dfxyz1))
+g2 <- triangle.label(euro123$in86, label = row.names(euro123$in78), plab.cex = 0.8)
+g3 <- triangle.match(euro123$in78, euro123$in86)
+g4 <- triangle.label(rbind.data.frame(euro123$in78, euro123$in86), plab.cex = 1, addaxes = TRUE, psub = list(text = "Principal axis", cex = 2, pos = "topright"))
+g5 <- triangle.label(euro123[[1]], min3 = c(0, 0.2, 0.3), max3 = c(0.5, 0.7, 0.8), plabels.cex = 1, label = row.names(euro123[[1]]), addax = TRUE)
+g6 <- triangle.label(euro123[[2]], min3 = c(0, 0.2, 0.3), max3 = c(0.5, 0.7, 0.8), label = row.names(euro123[[1]]), addax = TRUE)
+g7 <- triangle.label(euro123[[3]], min3 = c(0, 0.2, 0.3), max3 = c(0.5, 0.7, 0.8), label = row.names(euro123[[1]]), addax = TRUE)
+g8 <- triangle.label(rbind.data.frame(euro123[[1]], euro123[[2]], euro123[[3]]))
+
+## ex2
+dfxyz2 <- cbind.data.frame(a = runif(100), b = runif(100), c = runif(100, 4, 5))
+g9 <- triangle.label(dfxyz2)
+
+## ex3
+g10 <- triangle.label(dfxyz1)
+g11 <- triangle.class(dfxyz1, as.factor(rep("G", 36)), star = 0.5, ellips = 1)
+g12 <- triangle.class(dfxyz1, euro123$plan$an)
+g13 <- triangle.class(dfxyz1, euro123$plan$pays)
+g14 <- triangle.class(dfxyz1, euro123$plan$an, elli = 1, pell.axe.draw = TRUE)
+g15 <- triangle.class(dfxyz1, euro123$plan$an, elli = 0, sta = 0, col = c("red", "green", "blue"), pell.axe.draw = TRUE, plab.cex = 2, ppoi.cex = 2, pell.axe.draw = TRUE)
+g16 <- triangle.class(dfxyz1, euro123$plan$an, ell = 2, sta = 0.5, pell.axe.draw = TRUE, plab.cex = 1.5)
+g17 <- triangle.class(dfxyz1, euro123$plan$an, ell = 0, sta = 1, adjust = FALSE) 
+g18 <- triangle.class(dfxyz1, euro123$plan$an, ell = 0, sta = 1, chull =c(0.2, 0.25, 0.5, 0.75, 1), adjust = TRUE, showposi = TRUE, col = 10:13, pgrid.draw = FALSE)
diff --git a/tests/tvalue.R b/tests/tvalue.R
new file mode 100644
index 0000000..3de72d2
--- /dev/null
+++ b/tests/tvalue.R
@@ -0,0 +1,58 @@
+library(adegraphics)
+pdf("tvalue.pdf")
+
+## ex1
+data(olympic, package = "ade4")
+tab1 <- data.frame(scale(olympic$tab))
+pca <- ade4::dudi.pca(tab1, scann = FALSE)
+g1 <- table.value(tab1, axis.line = list(col = "blue"), axis.text = list(col = "grey"))
+g2 <- table.value(tab1, coordsx = c(1:5, 10:6))
+g3 <- table.value(tab1, coordsx = c(1:5, 10:8))
+g4 <- table.value(tab1, coordsy = rank(pca$li[, 1]), coordsx = rank(pca$co[, 1]), method = "color")
+g5 <- table.value(tab1, coordsy = pca$li[, 1], coordsx = pca$co[, 1], ptable = list(x = list(srt = 90)))
+
+## ex2
+data(eurodist)
+g6 <- table.value(eurodist, store = TRUE, symbol = "circle")
+g7 <- table.value(eurodist, store = FALSE, psub.text = "eurodist", psub.position = c(0, -0.04))
+
+## ex3
+data("doubs", package = "ade4")
+tab2 <- as.table(as.matrix(doubs$fish))
+g8 <- table.value(tab2)
+
+## ex4
+data(chats, package = "ade4")
+tab3 <- as.table(as.matrix(data.frame(t(chats))))
+coa1 <- ade4::dudi.coa(data.frame(t(chats)), scann = FALSE)
+adegparold <- adegpar()
+adegpar(ptable = list(x = list(pos = "bottom", srt = 0), y = list(pos = "left")), plegend.drawKey = FALSE)
+g9 <- table.value(tab3, meanX = TRUE, ablineX = TRUE)
+g10 <- table.value(tab3, meanY = TRUE, ablineY = TRUE) 
+g11 <- table.value(tab3, coordsx = coa1$c1[, 1], coordsy = coa1$l1[, 1], meanX = TRUE, ablineX = TRUE)
+g12 <- table.value(tab3, coordsx = coa1$c1[, 1], coordsy = coa1$l1[, 1], meanY = TRUE, ablineY = TRUE)
+g13 <- ADEgS(list(g9, g10, g11, g12), pos = rbind(c(0, 0.5, 0.5, 1), c(0.5, 0.5, 1, 1), c(0, 0, 0.5, 0.5), c(0.5, 0, 1, 0.5)))
+adegpar(adegparold)
+
+## ex5
+data(rpjdl, package = "ade4")
+tab4 <- data.frame(t(rpjdl$fau))
+coa2 <- ade4::dudi.coa(tab4, scann = FALSE)
+g14 <- table.value(tab4, coordsx = coa2$c1[, 1], coordsy = rank(coa2$l1[, 1]), axis.text = list(cex = 0), labelsy = rpjdl$lalab, plot = F)
+
+## ex6
+tab5 <- as.table(matrix(rep(0, 100), 10))
+tab5[1:5, 1:5] <- 10
+ade4::table.cont(tab5, abmean.x = T, y = 10:1)
+g15 <- table.value(tab5, coordsy = 10:1, meanX = T)
+g16 <- table.value(tab5, coordsy = 10:1, meanX = T, meanY = TRUE, ablineX = TRUE, ablineY = TRUE)
+
+## ex7
+tab6 <- matrix(rep(0, 100), 10)
+tab6[1:5, 1:5] <- 20
+colnames(tab6) <- LETTERS[1:10]
+rownames(tab6) <- LETTERS[1:10]
+ade4::table.value(tab6, x = 1:10, y = 10:1)
+g17 <- table.value(tab6, coordsx = 1:10, coordsy = 10:1)
+g18 <- table.value(tab6, coordsx = 1:10, coordsy = c(1, 2, 5, 6, 8, 9, 10, 3, 4, 7))
+
diff --git a/vignettes/adegraphics.Rmd b/vignettes/adegraphics.Rmd
new file mode 100644
index 0000000..442bac6
--- /dev/null
+++ b/vignettes/adegraphics.Rmd
@@ -0,0 +1,1252 @@
+---
+title: "The `adegraphics` package"
+author: "Alice Julien-Laferrière, Aurélie Siberchicot and Stéphane Dray"
+date: '`r Sys.Date()`'
+output:
+  html_vignette:
+    number_sections: yes
+    toc: yes
+bibliography: adegraphics.bib
+vignette: |
+  %\VignetteIndexEntry{The `adegraphics` package} 
+  %\VignetteEngine{knitr::rmarkdown} 
+  %\VignetteEncoding{UTF-8}
+---
+
+<br>
+<hr>
+<br>
+
+The `adegraphics` package is a complete reimplementation of the
+graphical functionalities of the `ade4` package [@Dray2007]. The package
+has been initially designed to improve the representation of the outputs
+of multivariate analyses performed with `ade4` but as its graphical
+functionalities are very general, they can be used for other purposes.
+
+The `adegraphics` package provides a flexible environment to produce,
+edit and manipulate graphs. We adopted an *object oriented* approach (a
+graph is an object) using `S4` classes and methods and used the
+visualization system provided by the `lattice` [@Sarkar2008] and `grid`
+[@Murrell2005] packages. In `adegraphics`, graphs are R objects that can
+be edited, stored, combined, saved, removed, etc.
+
+Note that we tried to facilitate the handling of `adegraphics` by `ade4`
+users. Hence, the name of functions and parameters has been preserved in
+many cases. The main changes are listed in the appendix of this vignette
+so that it should be quite easy to use `adegraphics`. However, several
+new functionalities (graphical parameters, creation and manipulation of
+graphical objects, etc.) are now available and detailed in this
+vignette.
+
+The *adelist* mailing list can be used to send questions and/or comments
+on `adegraphics` (see <http://listes.univ-lyon1.fr/wws/info/adelist>)
+<br>
+
+An overview of object classes
+=============================
+
+In `adegraphics`, a user-level function produces a plot that is stored
+(and returned) as an object. The class architecture of the objects
+created by `adegraphics` functions is described in [Figure 1](#classes).
+
+<br>
+<div style="text-align:center">
+<a name="classes"></a>
+<span style="color:blue">Figure 1: Classes structure and user-level functions</span>
+<img src="classes.png" style="width:700px"/>
+</div>
+<br>
+
+This class management highlights a hierarchy with two parent classes:
+
+-   `ADEg` for simple graphs. It contains the display of a single data
+    set using only one kind of representation (e.g., arrows, points,
+    lines, etc.)
+
+-   `ADEgS` for multiple graphs. It contains a collection of at least
+    two simple graphs (`ADEg`, `trellis` or `ADEgS`)
+
+The `ADEg` class has five child classes which are also subdivided in
+several child classes. Each of these five child classes is dedicated for
+a particular graphical data representation:
+
+-   `ADEg.S1`: unidimensional graph of a numeric score
+
+-   `ADEg.S2`: bidimensional graph of xy coordinates (`matrix` or
+    `data.frame` object)
+
+-   `ADEg.C1`: bidimensional graph of a numeric score (bar chart or
+    curve)
+
+-   `ADEg.T`: heat map-like representation of a data table (`matrix`,
+    `data.frame`, `dist` or `table` object)
+
+-   `ADEg.Tr`: ternary plot of xyz coordinates (`matrix` or `data.frame`
+    object)
+
+The `ADEg` class and its five child classes are virtual: it is not
+allowed to create object belonging to these classes. Users can only
+create objects belonging to child classes by calls to user functions (see the [User functions](#user-functions) section).
+
+
+Simple graph (`ADEg` object)
+============================
+
+In the `adegraphics` package, a graph is created by a call to a user
+function and stored as an R object. These functions allow to display the
+raw data but also the outputs of a multivariate analysis. The following
+sections describe the different graphical functions available in the
+package.
+
+<a name="user-functions"></a>
+
+User functions
+--------------
+
+Several user functions are available to create a simple graph (stored as
+an `ADEg` object in R). Each function creates an object of a given class
+(see [Figure 1](#classes)). [Table 1](#functionsADEg) lists the different
+functions, their corresponding classes and a short description. The
+`ade4` users would not be lost: many functions have kept their names in
+`adegraphics`. The main changes are listed in [Table 2](#functionsADEgchanged).
+
+<br>
+<a name="functionsADEg"></a>
+<span style="color:blue">Table 1: Graphical functions available in `adegraphics`</span>
+
+Function            Class of the returned object    Description
+---------           ------------------------------  --------------
+`s1d.barchart`      `C1.barchart`                   1-D plot of a numeric score by bars
+`s1d.curve`         `C1.curve`                      1-D plot of a numeric score linked by curves
+`s1d.curves`        `C1.curves`                     1-D plot of multiple scores linked by curves
+`s1d.density`       `C1.density`                    1-D plot of a numeric score by density curves
+`s1d.dotplot`       `C1.dotplot`                    1-D plot of a numeric score by dots
+`s1d.gauss`         `C1.gauss`                      1-D plot of a numeric score by Gaussian curves
+`s1d.hist`          `C1.hist`                       1-D plot of a numeric score by bars
+`s1d.interval`      `C1.interval`                   1-D plot of the interval between two numeric scores
+`s1d.boxplot`       `S1.boxplot`                    1-D box plot of a numeric score partitioned in classes
+`s1d.class`         `S1.class`                      1-D plot of a numeric score partitioned in classes
+`s1d.distri`        `S1.distri`                     1-D plot of a numeric score by means/tandard deviations computed using an external table of weights
+`s1d.label`         `S1.label`                      1-D plot of a numeric score with labels
+`s1d.match`         `S1.match`                      1-D plot of the matching between two numeric scores
+`s.arrow`           `S2.arrow`                      2-D scatter plot with arrows
+`s.class`           `S2.class`                      2-D scatter plot with a partition in classes
+`s.corcircle`       `S2.corcircle`                  Correlation circle
+`s.density`         `S2.density`                    2-D scatter plot with kernel density estimation
+`s.distri`          `S2.distri`                     2-D scatter plot with means/standard deviations computed using an external table of weights
+`s.image`           `S2.image`                      2-D scatter plot with loess estimation of an additional numeric score
+`s.label`           `S2.label`                      2-D scatter plot with labels
+`s.logo`            `S2.logo`                       2-D scatter plot with logos (pixmap objects)
+`s.match`           `S2.match`                      2-D scatter plot of the matching between two sets of coordinates
+`s.Spatial`         `S2.label`                      Mapping of a `Spatial*` object
+`s.traject`         `S2.traject`                    2-D scatter plot with trajectories
+`s.value`           `S2.value`                      2-D scatter plot with proportional symbols
+`table.image`       `T.image`                       Heat map-like representation with colored cells
+`table.value`       `T.value` or `T.cont`           Heat map-like representation with proportional symbols
+`triangle.class`    `Tr.class`                      Ternary plot with a partition in classes
+`triangle.label`    `Tr.label`                      Ternary plot with labels
+`triangle.match`    `Tr.match`                      Ternary plot of the matching between two sets of coordinates
+`triangle.traject`  `Tr.match`                      Ternary plot with trajectories
+
+
+<br>
+<a name="functionsADEgchanged"></a>
+<span style="color:blue">Table 2: Changes in functions names between `ade4` and `adegraphics`</span>
+
+
+Function in `ade4`                            Equivalence in `adegraphics`
+-------------------------------------------   ------------------------------  
+`table.cont`, `table.dist`, `table.value`     `table.value` [^1]
+`table.paint`                                 `table.image`
+`sco.boxplot`                                 `s1d.boxplot`
+`sco.class`                                   `s1d.class`
+`sco.distri`                                  `s1d.distri`
+`sco.gauss`                                   `s1d.gauss`
+`sco.label`                                   `s1d.label`
+`sco.match`                                   `s1d.match`
+`sco.quant`                                   no equivalence
+`s.chull`                                     `s.class`[^2]
+`s.kde2d`                                     `s.density`
+`s.match.class`                               superposition of `s.match` and `s.class`
+`triangle.biplot`                             `triangle.match`
+`triangle.plot`                               `triangle.label`
+`s.multinom`                                  `triangle.multinom`
+
+
+[^1]: The `table.value` function is now generic and can handle `dist` or `table` objects as arguments.
+[^2]: Convex hulls are now drawn by the `s.class` function (argument `chullSize`.)
+
+
+Arguments
+---------
+
+The list of arguments of a function are given by the `args` function.
+```{r label=chunk1}
+library(ade4)
+library(adegraphics)
+args(s.label)
+```
+
+Some arguments are very general and present in all user functions:
+
+-   `plot`: a logical value indicating if the graph should be displayed
+
+-   `storeData`: a logical value indicating if the data should be stored
+    in the returned object. If `FALSE`, only the names of the data are
+    stored. This allows to reduce the size of the returned object but it
+    implies that the data should not be modified in the environment to
+    plot again the graph.
+
+-   `add`: a logical value indicating if the graph should be superposed
+    on the graph already displayed in the current device (it replaces
+    the argument `add.plot` in `ade4`).
+
+-   `pos`: an integer indicating the position of the environment where
+    the data are stored, relative to the environment where the function
+    is called. Useful only if `storeData` is `FALSE`.
+
+-   `…`: additional graphical parameters (see below)
+
+Some other arguments influence the graphical outputs and they are thus
+specific to the type of produced graph. [Figure 2](#gargsVSclass) summarizes some
+of these graphical parameters available for the different functions. We
+only reported the parameters stored in the `g.args` slot of the returned
+object (see the [Parameters in `g.args`](#gargs) section).
+
+
+<br>
+<div style="text-align:center">
+<a name="gargsVSclass"></a>
+<span style="color:blue">Figure 2: Specific arguments in each object class</span>
+```{r label=fig-gargsVSclass, include=TRUE, echo=FALSE, fig.width=7, fig.height=8}
+source("gargsVSclass.R")
+```
+</div>
+<br>
+
+
+<br>
+The `ade4` users would note that the names of some arguments have been
+modified in `adegraphics`. The [Appendix](#appendix) gives a full list of
+these modifications.
+
+<a name="slots"></a>
+
+Slots and Methods
+-----------------
+
+A call to a graphical function (see the [User functions](#user-functions) section) returns an `ADEg`
+object. Each object is defined by a number of slots and several methods
+are associated to this class. Let us consider the `olympic` data set
+available in the `ade4` package. A principal component analysis (PCA) is
+applied on the `olympic$tab` table that contains the results for 33
+participating athletes at the 1988 summer olympic games:
+
+```{r label=chunk2}
+data(olympic)
+pca1 <- dudi.pca(olympic$tab, scannf = FALSE)
+```
+
+The barplot of eigenvalues is then drawn and stored in `g1`:
+
+```{r label=plot1, fig.height=4, fig.width=4}
+g1 <- s1d.barchart(pca1$eig, p1d.horizontal = F, ppolygons.col = "white")
+```
+
+<br>
+The class of the `g1` object is `C1.barchart` which extends the `ADEg`
+class:
+```{r label=chunk3}
+class(g1)
+showClass("C1.barchart")
+```
+
+<br>
+This object contains different slots:
+```{r label=chunk4}
+slotNames(g1)
+```
+
+<br>
+These slots are defined for each `ADEg` object and contain different
+types of information. The package `adegraphics` uses the capabilities of
+the `lattice` package to display a graph (by generating a `trellis`
+object). Hence, several slots contain information that will be passed in
+the call to the `lattice` functions:
+
+-   `data`: a list containing information about the data.
+
+-   `trellis.par`: a list of graphical parameters that are directly
+    passed to the `lattice` functions using the `par.settings` argument
+    (see the [Parameters in `trellis.par`](#trellispar) section).
+
+-   `adeg.par`: a list of graphical parameters defined in `adegraphics`.
+    The list of parameters can be obtained using the `adegpar` function
+    (see the [Parameters in `adeg.par`](#adegpar) section).
+
+-   `lattice.call`: a list of two elements containing the information
+    required to create the `trellis` object: `graphictype` (the name of
+    the `lattice` functions that should be used) and `arguments` (the
+    list of parameter values required to obtain the `trellis` object).
+
+-   `g.args`: a list containing at least the different values of the
+    graphical arguments described in [Figure 2](#gargsVSclass) (see the [Parameters in `g.args`](#gargs) section).
+
+-   `stats`: a list of internal preliminary computations performed to
+    display the graph.
+
+-   `s.misc`: a list of other internal parameters.
+
+-   `Call`: an object of class `call` containing the matched call.
+
+<br>
+These different slots can be extracted using the `@` operator:
+```{r label=chunk5}
+g1 at data
+```
+
+<br>
+All these slots are automatically filled during the object creation. The
+`trellis.par`, `adeg.par` and `g.args` can also be modified *a
+posteriori* using the `update` method (see the [Customizing a graph](#update) section). This allows to
+customize graphs after their creation.
+
+We consider the correlation circle that depicts the correlation between
+PCA axes and the results for each event:
+```{r label=plot2, fig.width=4, fig.height=4}
+g2 <- s.corcircle(pca1$co)
+```
+
+```{r label=chunk6}
+class(g2)
+g2 at g.args
+```
+
+<br>
+The argument `fullcircle` can be updated *a posteriori* so that the
+original object is modified:
+```{r label=plot3, fig.width=4, fig.height=4}
+update(g2, fullcircle = FALSE)
+g2 at g.args
+```
+
+
+Several other methods have been defined for the `ADEg` class allowing to
+extract information, modify or combine objects:
+
+-   `getcall`, `getlatticecall` and `getstats`: these accessor methods
+    return respectively the `Call`, the `lattice.call` and the `stats`
+    slots.
+
+-   `getparameters`: this method returns the `trellis.par` and/or the
+    `adeg.par` slots.
+
+-   `show`, `print` and `plot`: these methods display the `ADEg` object
+    in the current device or in a new one.
+
+-   `gettrellis`: this method returns the `ADEg` object as a `trellis`
+    object. It can then be exploited using the `lattice` and
+    `latticeExtra` packages.
+
+-   `superpose`, `+` and `add.ADEg`: these methods superpose two `ADEg`
+    graphs. It returns a multiple graph object of class `ADEgS` 
+    (see the [The basic methods for superposition, juxtaposition and insertion](#superpose) section).
+
+-   `insert`: this method inserts an `ADEg` graph in an existing one or
+    in the current device. It returns an `ADEgS` object 
+    (see the [The basic methods for superposition, juxtaposition and insertion](#superpose) section).
+
+-   `cbindADEg`, `rbindADEg`: these methods combine several `ADEg`
+    graphs. It returns an `ADEgS` object 
+    (see the [The basic methods for superposition, juxtaposition and insertion](#superpose) section).
+
+-   `update`: this method modifies the graphical parameters after the
+    `ADEg` creation. It updates the current display and returns the
+    modified `ADEg` (see the [Customizing a graph](#update) section).
+
+For instance:
+```{r label=chunk7}
+getcall(g1) ## equivalent to g1 at Call
+```
+
+A biplot-like graph can be obtained using the `superpose` method. The
+result is a multiple graph:
+```{r label=plot4, fig.width=4, fig.height=4}
+g3 <- s.label(pca1$li)
+g4 <- s.arrow(5 * pca1$c1, add = TRUE)
+class(g4)
+```
+
+In addition, some object classes have specific methods. For instance, a
+`zoom` method is available for `ADEg.S1` and `ADEg.S2` classes. For the
+`ADEg.S2` class, the method `addhist` (see the [The basic methods for superposition, juxtaposition and insertion](#superpose) section) decorates a 2-D
+graph by adding marginal distributions as histograms and density lines
+(this method replaces and extends the `s.hist` function of `ade4`).
+```{r label=plot5, fig.width=4, fig.height=4}
+zoom(g3, zoom = 2, center = c(2, -2))
+```
+
+
+
+Multiple graph (`ADEgS` object)
+===============================
+
+The `adegraphics` package provides class `ADEgS` to manage easily the
+combination of several graphs. This class allows to deal with the
+superposition, insertion or juxtaposition of several graphs in a single
+object. An object of this class is a list containing several graphical
+objects and information about their positioning. Different ways to
+generate `ADEgS` objects are described below.
+
+Slots and Methods
+-----------------
+
+The class `ADEgS` is used to store multiple graphs. Different slots are
+associated to this class (use the symbol `@` to extract information):
+
+-   `ADEglist`: a list of graphs stored as `trellis`, `ADEg` and/or
+    `ADEgS` objects.
+
+-   `positions`: a matrix containing the positions of the graphs. It has
+    four columns and as many rows as the number of graphical objects in
+    the `ADEglist` slot. For each graph (i.e. row), it contains the
+    coordinates of the bottom-left and top-right corners in `npc` units
+    (i.e. normalized parent coordinates varying between 0 and 1).
+
+-   `add`: a square binary matrix with as many rows and columns as the
+    number of graphical objects in the `ADEglist` slot. It allows to
+    manage the superposition of graphs: the value at the i-th row and
+    j-th column is equal to 1 if the j-th graphical object is superposed
+    on the i-th. Otherwise, this value is equal to 0.
+
+-   `Call`: an object of class `call` containing the matched call.
+
+Several methods have been implemented to obtain information, edit or
+modify `ADEgS` objects. Several methods are inspired from the management
+of `list` in R:
+
+-   `[`, `[[` and `$`: these methods extract one or more elements from
+    the `ADEgS` object.
+
+-   `getpositions`, `getgraphics` and `getcall`: these methods return
+    the `positions`, the `ADEglist` and the `Call` slots, respectively.
+
+-   `names` and `length`: these methods return the names and number of
+    graphs contained in the object.
+
+-   `[[<-` and `names<-`: these methods replace a graph or its name in
+    an `ADEgS` object (acts on the `ADEglist` slot).
+
+-   `show`, `plot` and `print`: these methods display the `ADEgS` object
+    in the current device or in a new one.
+
+-   `superpose` and `+`: these methods superpose two graphs. It returns
+    a multiple graph object of class `ADEgS` 
+    (see the [The basic methods for superposition, juxtaposition and insertion](#superpose) section).
+
+-   `insert`: this method inserts a graph in an existing one or in the
+    current device. It returns a multiple graph object of class `ADEgS`
+    (see the [The basic methods for superposition, juxtaposition and insertion](#superpose) section).
+
+-   `cbindADEg`, `rbindADEg`: these methods combine several graphs. It
+    returns an `ADEgS` object 
+    (see the [The basic methods for superposition, juxtaposition and insertion](#superpose) section).
+
+-   `update`: this method modifies the names and/or the `positions` of
+    the graphs contained in an `ADEgS` object. It updates the current
+    display and returns the modified `ADEgS`.
+
+We will show in the next sections how these methods can be used to deal
+with `ADEgS` objects.
+
+Creating an `ADEgS` object by hand
+----------------------------------
+
+The `ADEgS` objects can be created by easy manipulation of several
+simple graphs. Some methods (e.g., `insert`, `superpose`) can be used to
+create a compilation of graphs by hand.
+
+<a name="superpose"></a>
+
+### The basic methods for superposition, juxtaposition and insertion
+
+The functions `superpose`, `+` and `add.ADEg` allow the superposition of
+an `ADEg`/`ADEgS` object on an `ADEg`/`ADEgS` object.
+
+The vector `olympic$score` contains the total number of points computed
+for each participant. This vector is used to generate a `factor`
+partitioning the participants in two groups according to their final
+result (more or less than 8000 points):
+```{r label=chunk8}
+fac.score <- factor(olympic$score < 8000, labels = c("MT8000", "LT8000"))
+```
+
+These two groups can be represented on the PCA factorial map using the
+`s.class` function:
+```{r label=plot6, fig.width=4, fig.height=4}
+g5 <- s.class(pca1$li, fac.score, col = c("red", "blue"), chullSize = 1, ellipseSize = 0, 
+              plabels.cex = 2, pbackground.col = "grey85", paxes.draw = TRUE)
+```
+
+The graph with the labels (object `g3`) can then be superposed on this
+one:
+```{r label=plot7, fig.width=4, fig.height=4}
+g6 <- superpose(g5, g3, plot = TRUE) ## equivalent to g5 + g3
+class(g6)
+```
+
+In the case of a superposition, the graphical parameters (e.g.,
+background and limits) of the first graph (the one below) are used as a
+reference and applied to the second one (the one above). Note that it is
+also possible to use the `add = TRUE` argument in the call of a simple
+user function (functions described in [Table 1](#functionsADEg)) to perform
+a superposition. The graph `g6` can also be obtained by:
+```{r label=chunk9, eval=FALSE}
+g5
+s.label(pca1$li, add = TRUE)
+```
+
+The functions `cbindADEg` and `rbindADEg` allows to combine several
+graphical objects (`ADEg`, `ADEgS` or `trellis`) by rows or by columns.
+The new created `ADEgS` contains the list of the reduced graphs:
+```{r label=plot8, fig.width=6, fig.height=6}
+rbindADEg(cbindADEg(g2, g3), cbindADEg(g5, g6), plot = TRUE)
+```
+
+The function `insert` allows the insertion of a graphical object on
+another one (`ADEg` or `ADEgS`). It takes the position of the inserted
+graph as an argument:
+```{r label=plot9, fig.width=4, fig.height=4}
+g7 <- insert(g2, g6, posi = c(0.65, 0.65, 0.95, 0.95))
+class(g7)
+```
+
+The different methods associated to the `ADEgS` class allow to obtain
+information and to modify the multiple graph:
+```{r label=chunk10}
+length(g7)
+names(g7)
+names(g7) <- c("chulls", "labels", "cor")
+class(g7[1])
+class(g7[[1]])
+class(g7$chulls)
+```
+
+The multiple graph contains three simple graphs. It can be easily
+updated. For instance, the size of the inserted graph can be modified:
+```{r label=plot10, fig.width=4, fig.height=4}
+pos.mat <- getpositions(g7)
+pos.mat
+pos.mat[3,] <- c(0.1, 0.7, 0.3, 0.9)
+update(g7, positions = pos.mat)
+```
+
+The graphs themselves can be modified, without affecting the global
+structure of the `ADEgS` object. Here, we replace the correlation circle
+by the barplot of eigenvalues:
+```{r label=plot11, fig.width=4, fig.height=4}
+g7[[3]] <- g1
+g7
+```
+
+The `addhist` method adds univariate marginal distributions around an
+`ADEg.S2` and returns an `ADEgS` object:
+```{r label=plot12, fig.width=4, fig.height=4}
+addhist(g3)
+```
+
+More examples are available in the help page by typing
+`example(superpose)`, `example(insert)`, `example(add.ADEg)` and
+`example(addhist)` in the R session.
+
+### The `ADEgS` function
+
+The `ADEgS` function provides the most elementary and flexible way to
+create an `ADEgS` object. The different arguments of the function are:
+
+-   `adeglist`: a list of several `trellis`, `ADEg` and/or `ADEgS`
+    objects.
+
+-   `positions`: a matrix with four columns and as many rows as the
+    number of graphical objects in the `ADEglist` slot. For each
+    subgraph, i.e. in each row, the coordinates of the top-right and the
+    bottom-left hand corners are given in `npc` units (i.e., normalized
+    parent coordinates varying from 0 to 1).
+
+-   `layout`: an alternative way to specify the positions of graphs. It
+    could be a vector of length 2 indicating the number of rows and
+    columns used to split the device (similar to `mfrow` parameter in
+    basic graphs). It could also be a matrix specifying the location of
+    the graphs: each value in this matrix should be 0 or a positive
+    integer (similar to `layout` function for basic graphs).
+
+-   `add`: a square matrix with as many rows and columns as the number
+    of graphical objects in the `ADEglist` slot. The value at the i-th
+    row and j-th column is equal to 1 if the j-th graphical object is
+    superposed to i-th one. Otherwise, this value is equal to 0.
+
+-   `plot`: a logical value indicating if the graphs should be
+    displayed.
+
+When users fill only one argument among `positions`, `layout` and `add`,
+the other values are automatically computed to define the `ADEgS`
+object.
+
+We illustrate the different possibilities to create objects with the
+`ADEgS` function. Simple juxtaposition using a vector as layout:
+```{r label=plot13, fig.width=6, fig.height=3}
+ADEgS(adeglist = list(g2, g3), layout = c(1, 2))
+```
+
+Layout specified as a matrix:
+```{r label=plot14, fig.width=5, fig.height=5}
+mlay <- matrix(c(1, 1, 0, 1, 1, 0, 0, 0, 2), byrow = T, nrow = 3)
+mlay
+ADEgS(adeglist = list(g6, g2), layout = mlay)
+```
+
+Using the matrix of positions offers a very flexible way to arrange the
+different graphs:
+```{r label=plot15, fig.width=5, fig.height=5}
+mpos <- rbind(c(0, 0.3, 0.7, 1), c(0.5, 0, 1, 0.5))
+ADEgS(adeglist = list(g3, g5), positions = mpos)
+```
+
+Lastly, superposition can also be specified using the `add` argument:
+```{r label=plot16, fig.width=4, fig.height=4}
+ADEgS(list(g5, g3), add = matrix(c(0, 1, 0, 0), byrow = TRUE, ncol = 2))
+```
+
+More examples are available in the help page by typing `example(ADEgS)`
+in the R session.
+
+Automatic collections
+---------------------
+
+The package `adegraphics` contains functionalities to create collections
+of graphs. These collections are based on a simple graph repeated for
+different groups of individuals, variables or axes. The building process
+of these collections is quite simple (definition of arguments in the
+call of a user function) and leads to the creation of an `ADEgS` object.
+
+<a name="facets"></a>
+
+### Partitioning the data (`facets`)
+
+The `adegraphics` package allows to split up the data by one variable
+(`factor`) and to plot the subsets of data together. This possibility of
+conditional plot is available for all user functions (except the
+`table.*` functions) by setting the `facets` argument. This is directly
+inspired by the functionalities offered in the `lattice` and `ggplot2`
+packages.
+
+Let us consider the `jv73` data set. The table `jv73$morpho` contains
+the measures of 6 variables describing the geomorphology of 92 sites. A
+PCA can be performed on this data set:
+```{r label=plot17, fig.width=4, fig.height=4}
+data(jv73)
+pca2 <- dudi.pca(jv73$morpho, scannf = FALSE)
+s.label(pca2$li)
+```
+
+The sites are located on 12 rivers (`jv73$fac.riv`) and it is possible
+to represent the PCA scores for each river using the `facets` argument:
+```{r label=plot18, fig.width=7, fig.height=5.2}
+g8 <- s.label(pca2$li, facets = jv73$fac.riv)
+length(g8)
+names(g8)
+```
+
+The `ADEgS` returned object contains the 12 plots. It is then possible
+to focus on a given river (e.g., the Doubs river) by considering only a
+subplot (e.g., type `g8$Doubs`). The `facets` functionality is very
+general and available for the majority of `adegraphics` functions. For
+instance, with the `s.class` function:
+```{r label=plot19, fig.width=7, fig.height=5.2}
+s.class(pca2$li, fac = jv73$fac.riv, col = rainbow(12), facets = jv73$fac.riv)
+```
+
+### Multiple axes
+
+All 2-D functions (i.e. `s.*`) returning an object inheriting from the
+`ADEg.S2` class have the `xax` et `yax` arguments. These arguments allow
+to choose which column of the main argument (i.e. `df`) should be
+plotted as x and y axes. As in `ade4`, these two arguments can be simple
+integers. In `adegraphics`, the user can also specify vectors as `xax`
+and/or `yax` arguments to obtain multiple graphs. Here, we represent the
+different correlation circles associated to the first four PCA axes of
+the olympic data set:
+```{r label=plot20, fig.width=6, fig.height=6}
+pca1 <- dudi.pca(olympic$tab, scannf = FALSE, nf = 4)
+g9 <- s.corcircle(pca1$co, xax = 1:2, yax = 3:4)
+length(g9)
+names(g9)
+g9 at positions
+```
+
+### Multiple score
+
+All 1-D functions (i.e. `s1d.*`) returning an object inheriting from the
+`ADEg.C1` or `ADEg.S1` classes have the `score` argument. Usually, this
+argument should be a numeric vector but it is also possible to consider
+an object with several columns (`data.frame` or `matrix`). In this case,
+an `ADEgS` object is returned in which one graph by column is created.
+For instance for the `olympic` data set, we can represent the link
+between the global performance (`fac.score`) and the PCA scores on the
+first four axes (`pca1$li`):
+```{r label=plot21, fig.width=6, fig.height=6}
+dim(pca1$li)
+s1d.boxplot(pca1$li, fac.score, col = c("red", "blue"), 
+  psub = list(position = "topleft", cex = 2))
+```
+
+
+### Multiple variable
+
+Some user functions (`s1d.density`, `s1d.gauss`, `s1d.boxplot`,
+`s1d.class`, `s.class`, `s.image`, `s.traject`, `s.value`,
+`triangle.class`) have an argument named `fac` or `z`. This argument can
+have several columns (`data.frame` or `matrix`) so that each column is
+used to create a separate graph. For instance, we can represent the
+distribution of the 6 environmental variables on the PCA factorial map
+of the `jv73$tab` data set:
+```{r label=plot22, fig.width=6, fig.height=4}
+s.value(pca2$li, pca2$tab, symbol = "circle")
+```
+
+### Outputs of the `ade4` package
+
+Lastly, we reimplemented all the graphical functions of the `ade4`
+package designed to represent the outputs of a multivariate analysis.
+The functions `ade4::plot.*`, `ade4::kplot.*`, `ade4::scatter.*` and
+`ade4::score.*` return `ADEgS` objects. It is now very easy to represent
+or modify these graphical outputs:
+```{r label=plot23, fig.width=6, fig.height=6}
+data(meaudret)
+pca3 <- dudi.pca(meaudret$env, scannf = FALSE)
+pca4 <- dudi.pca(meaudret$spe, scale = FALSE, scannf = FALSE)
+coi1 <- coinertia(pca3, pca4, scannf = FALSE, nf = 3)
+g10 <- plot(coi1)
+class(g10)
+names(g10)
+g10 at Call
+```
+
+<a name="update"></a>
+
+Customizing a graph
+===================
+
+Compared to the `ade4` package, the main advantage of `adegraphics`
+concerns the numerous possibilities to customize a graph using several
+graphical parameters. These parameters are stored in slots
+`trellis.par`, `adeg.par` and `g.args` (see the [Slots and Methods](#slots) section) of an `ADEg`
+object. These parameters can be defined during the creation of a graph
+or updated *a posteriori* (using the `update` method).
+
+<a name="trellispar"></a>
+
+Parameters in `trellis.par`
+---------------------------
+
+The `trellis.par` slot is a list of parameters that are directly
+included in the call of functions of the `lattice` package. The name of
+parameters and their default value are given by the `trellis.par.get`
+function of `lattice`.
+```{r label=chunk11}
+library(lattice)
+sort(names(trellis.par.get()))
+```
+
+
+Hence, modifications of some of these parameters will modify the
+graphical display of an `ADEg` object. For instance, margins are defined
+using `layout.widths` and `layout.heights` parameters, `clip` parameter
+allows to overpass panel boundaries and `axis.line` and `axis.text`
+allow to customize lines and text of axes.
+```{r label=plot24, fig.width=7, fig.height=3.5}
+d <- scale(olympic$tab)
+g11 <- table.image(d, plot = FALSE)
+g12 <- table.image(d, axis.line = list(col = "blue"), axis.text = list(col = "red"), 
+  plot = FALSE)
+ADEgS(c(g11, g12), layout = c(1, 2))
+```
+
+<a name="adegpar"></a>
+
+Parameters in `adeg.par`
+------------------------
+
+The `adeg.par` slot is a list of graphical parameters specific to the
+`adegraphics` package. The name of parameters and their default value
+are available using the `adegpar` function which is inspired by the
+`par` function of the `graphics` package.
+```{r label=chunk12}
+names(adegpar())
+```
+
+A description of these parameters is available in the help page of the
+function (`?adegpar`). Note that each `adeg.par` parameter starts by the
+letter ’p’ and its name relates to the type of graphical element
+considered (`ptable` is for tables display, `ppoints` for points,
+`parrows` for arrows, etc). Each element of this list can contain one or
+more sublists. Details on a sublist are obtained using its name either
+as a parameter of the `adegpar` function or after the `$` symbol. For
+example, if we want to know the different parameters to manage the
+display of points:
+```{r label=chunk13}
+adegpar("ppoints")
+adegpar()$ppoints
+```
+
+The full list of available parameters is summarized in [Figure 3](#paramVSparam).
+
+<br>
+<div style="text-align:center">
+<a name="paramVSparam"></a>
+<span style="color:blue">Figure 3: Parameters that can be set with the `adegpar` function.</span>
+```{r label=fig-paramVSparam, echo=FALSE, fig.width=7, fig.height=7}
+source("paramVSparam.R")
+```
+</div>
+<br>
+
+
+
+The ordinate represents the different sublists and the abscissa gives
+the name of the parameters available in each sublist. Note that some row
+names have two keys separated by a dot: the first key indicates the
+first level of the sublist, etc. For example `plabels.boxes` is the
+sublist `boxes` of the sublist `plabels`. The parameters `border`,`col`,
+`alpha`, `lwd`, `lty` and `draw` in `plabels.boxes` allow to control the
+aspect of the boxes around labels.
+
+According to the function called, only some of the full list of
+`adeg.par` parameters are useful to modify the graphical display. [Figure 4](#paramVSfunction)
+indicates which parameters can affect the display of an object
+created by a given user function. For example, the background
+(`pbackground` parameter) can be modified for all functions whereas the
+display of ellipses (`pellipses` parameter) affects only three
+functions.
+
+
+
+<br>
+<div style="text-align:center">
+<a name="paramVSfunction"></a>
+<span style="color:blue">Figure 4: Effect of `adeg.par` parameters in `adegraphics` functions.</span>
+```{r label=fig-paramVSfunction, echo=FALSE, fig.width=7, fig.height=10}
+source("paramVSfunction.R")
+```
+</div>
+<br>
+
+### Global assignment
+
+The `adegpar` function allows to modify globally the values of graphical
+parameters so that changes will affect all subsequent displays. For
+example, we update the size/color of labels and add axes to a plot:
+```{r label=plot25, fig.width=6, fig.height=3}
+oldadegpar <- adegpar()
+adegpar("plabels")
+g13 <- s.label(dfxy = pca1$li, plot = FALSE)
+adegpar(plabels = list(col = "blue", cex = 1.5), paxes.draw = TRUE)
+adegpar("plabels")
+g14 <- s.label(dfxy = pca1$li, plot = FALSE)
+ADEgS(c(g13, g14), layout = c(1, 2))
+```
+
+As the `adegpar` function can accept numerous graphical parameters, it
+can be used to define some graphical themes. The next releases of
+`adegraphics` will offer functionalities to easily create, edit and
+store graphical themes. Here, we reassign the original default
+parameters:
+```{r label=chunk14}
+adegpar(oldadegpar)
+```
+
+### Local assignment
+
+A second option is to update the graphical parameters locally so that
+the changes will only modify the object created. This is done using the
+dots (`...`) argument in the call to a user function. In this case, the
+default values of parameters in the global environment are not modified:
+```{r label=plot26, fig.width=4, fig.height=4}
+adegpar("ppoints")
+s.label(dfxy = pca1$li, plabels.cex = 0, ppoints = list(col = c(2, 4, 5), cex = 1.5, pch = 15))
+adegpar("ppoints")
+```
+
+In the previous example, we can see that parameters can be either
+specified using a ’`.`’ separator or a list. For instance, using
+`plabels.cex = 0` or `plabels = list(cex = 0)` is strictly equivalent.
+Moreover, partial names can be used if there is no ambiguity (such as
+`plab.ce = 0` in our example).
+
+<a name="gargs"></a>
+
+Parameters in `g.args`
+----------------------
+
+The `g.args` slot is a list of parameters specific to the function used
+(and thus to the class of the returned object). Several parameters are
+very general and used in all `adegraphics` functions:
+
+-   `xlim`, `ylim`: limits of the graph on the x and y axes
+
+-   `main`, `sub`: main title and subtitle
+
+-   `xlab`, `ylab`: labels of the x and y axes
+
+-   `scales`: a list determining how the x and y axes (tick marks dans
+    labels) are drawn; this is the `scales` parameter of the `xyplot`
+    function of `lattice`
+
+The `ADEg.S2` objects can also contain spatial information (map stored
+as a `Spatial` object or neighborhood stored as a `nb` object):
+
+-   `Sp`, `sp.layout`: objects from the `sp` package to display spatial
+    objects, `Sp` for maps and `sp.layout` for spatial widgets as a
+    North arrow, scale, etc.
+
+-   `nbobject`: object of class `nb` or `listw` to display neighbor graphs.
+
+When the `facets` (see the [Partitioning the data (`facets`)](#facets) section) argument is used, users can modify the
+parameter `samelimits`: if it is `TRUE`, all graphs have the same limits
+whereas limits are computed for each subgraph independently when it is
+`FALSE`. For example, considering the `jv73` data set, each subgraph is
+computed with its own limits and labels are then more scattered:
+```{r label=plot27, fig.width=7, fig.height=5.2}
+s.label(pca2$li, facets = jv73$fac.riv, samelimits = FALSE)
+```
+
+Several other `g.args` parameters can be updated according to the class
+of the created object (see [Figure 2](#gargsVSclass)).
+
+Parameters applied on a `ADEgS`
+-------------------------------
+
+Users can either apply the changes to all graphs or to update only one
+graph. Of an `ADEgS`, to apply changes on all the graphs contained in an
+`ADEgS`, the syntax is similar to the one described for an `ADEg`
+object. For example, background color can be changed for all graphs in
+`g10` using the `pbackground.col` parameter.
+```{r label=plot28, fig.width=6, fig.height=6}
+g15 <- plot(coi1, pbackground.col = "steelblue")
+```
+
+To change the parameters of a given graph, the name of the parameter
+must be preceded by the name of the subgraph. This supposes that the
+names of subgraphs are known. For example, to modify only two graphs:
+```{r label=plot29, fig.width=6, fig.height=6}
+names(g15)
+plot(coi1, XYmatch.pbackground.col = "steelblue",  XYmatch.pgrid.col = "red", 
+     eig.ppolygons.col = "orange")
+```
+
+
+Using `adegraphics` functions in your package
+=============================================
+
+In this section, we illustrate how `adegraphics` functionalities can be
+used to implement graphical functions in your own package. We created an
+objet of class `track` that contains a vector of distance and time.
+```{r label=chunk15}
+tra1 <- list()
+tra1$time <- runif(300)
+tra1$distance <- tra1$time * 5 + rnorm(300)
+class(tra1) <- "track"
+```
+
+For an object of the class `track`, we wish to represent different
+components of the data:
+
+-   an histogram of distances
+
+-   an histogram of speeds (i.e., distance / time)
+
+-   a 2D plot representing the distance, the time and the line
+    corresponding to the linear model that predict distance by time
+
+The corresponding multiple plot can be done using `adegraphics`
+functions:
+```{r label=plot30, fig.width=7, fig.height=2.3}
+g1 <- s1d.hist(tra1$distance, psub.text = "distance", ppolygons.col = "blue", 
+               pgrid.draw = FALSE, plot = FALSE)
+g2 <- s1d.hist(tra1$distance / tra1$time, psub.text = "speed", ppolygons.col = "red", 
+               plot = FALSE)
+g31 <- s.label(cbind(tra1$time, tra1$distance), paxes = list(aspectratio = "fill", 
+               draw = TRUE), plot = FALSE)
+g32 <- xyplot(tra1$distance ~ tra1$time, aspect = g31 at adeg.par$paxes$aspectratio, 
+              panel = function(x, y) {panel.lmline(x, y)})
+g3 <- superpose(g31, g32)
+G <- ADEgS(list(g1, g2, g3))
+```
+
+
+To facilitate the graphical representation of an object of class
+`track`, the simplest solution is to design a function `plot` for this
+class. We illustrate how to define such function with a particular
+emphasis on the management of graphical parameters. The function is
+provided below and we detail the different steps.
+
+
+```{r label=chunk16}
+plot.track <- function(x, pos = -1, storeData = TRUE, plot = TRUE, ...) {
+ 
+ ## step 1 : sort parameters for each graph
+ graphsnames <- c("histDist", "histSpeed", "regression")
+ sortparameters <- sortparamADEgS(..., graphsnames = graphsnames, 
+                                  nbsubgraphs = c(1, 1, 2))
+ 
+ ## step 2 : define default values for graphical parameters
+ params <- list()
+ params[[1]] <- list(psub = list(text = "distance"), ppolygons = list(col = "blue"), 
+                     pgrid = list(draw = FALSE))
+ params[[2]] <- list(psub = list(text = "speed"), ppolygons = list(col = "red"), 
+                     pgrid = list(draw = FALSE))
+ params[[3]] <- list()
+ params[[3]]$l1 <- list(paxes = list(aspectratio = "fill", draw = TRUE))
+ params[[3]]$l2 <- list()
+ names(params) <- graphsnames
+ sortparameters <- modifyList(params, sortparameters, keep.null = TRUE)
+ 
+ ## step 3 : create each individual plot (ADEg)
+ g1 <- do.call("s1d.hist", c(list(score = substitute(x$distance), plot = FALSE, 
+               storeData = storeData, pos = pos - 2), sortparameters[[1]]))
+ g2 <- do.call("s1d.hist", c(list(score = substitute(x$distance / x$time), 
+               plot = FALSE, storeData = storeData, pos = pos - 2), sortparameters[[2]]))
+ g31 <- do.call("s.label", c(list(dfxy = substitute(cbind(x$time, x$distance)), plot = 
+               FALSE, storeData = storeData, pos = pos - 2), sortparameters[[3]][[1]]))
+ g32 <- xyplot(x$distance ~ x$time, aspect = g31 at adeg.par$paxes$aspectratio,
+               panel = function(x, y) {panel.lmline(x, y)})
+ g3 <- do.call("superpose", list(g31, g32))
+ g3 at Call <- call("superpose", g31 at Call, g32$call)
+ 
+ 
+ ## step 4 : create the multiple plot (ADEgS)
+ lay <- matrix(1:3, 1, 3)
+ object <- new(Class = "ADEgS", ADEglist = list(g1, g2, g3), positions = 
+               layout2position(lay), add = matrix(0, ncol = 3, nrow = 3), 
+               Call = match.call())
+ names(object) <- graphsnames
+ if(plot)
+   print(object)
+ invisible(object)
+}
+```
+
+
+In the first step, the arguments given by the user through the dots (…)
+argument are managed. A name is given to each subgraph and stored in the
+vector `graphnames`. Then, the function `sortparamADEgS` associates the
+graphical parameters of the dots (…) argument to each subgraph. If a
+prefix is specified and matches the name of a graph (e.g.,
+`histDist.pbackground.col = grey`), the parameter is applied only to the
+graphic specified (e.g., called `histDist`). If no prefix is specified
+(e.g., `pbackground.col = grey`), the parameter is applied to all
+subgraphs. The function `sortparamADEgS` returns a list (length equal to
+the number of subgraph) of lists of graphical parameters.\
+
+In the second step, default values for some graphical parameters are
+modified. The default parameters are stored in a list which has the same
+structure that the one produced by `sortparamADEgS` (i.e., names
+corresponding to those contained in `graphsnames`). Then, the
+`modifyList` function is applied to merge user and defaults values of
+paramaters (if a parameter is specified by the user and in the default,
+the value given by the user is used).\
+
+In the third step, each subgraph is created. Here, we create two
+`C1.hist` objects and superpose a `S2.label` object and a `trellis` one.
+The functions `do.call` and `substitute` are used to provide a pretty
+call for each subgraph (stored in the `Call` slot).\
+
+In a final step, the multiple graph is build through the creation of a
+new `ADEgS` object and possibly plotted.\
+
+The `plot.track` function can then be used by:
+```{r label=plot31, fig.width=7, fig.height=2.3}
+plot(tra1)
+```
+
+Graphical parameters can be modified by:
+```{r label=plot32, fig.width=7, fig.height=2.3}
+plot(tra1, histDist.ppoly.col = "green", pbackground.col = "grey")
+```
+
+
+Examples
+========
+
+Labels customization
+--------------------
+
+```{r label=plot33, fig.width=6, fig.height=3}
+data(meaudret)
+g16 <- s.label(pca3$li, plot = FALSE)
+g17 <- s.label(pca3$li, ppoints.col= "red", plabels = list(box = list(draw = FALSE), 
+  optim = TRUE), plot = FALSE)
+ADEgS(c(g16, g17), layout = c(1, 2))
+```
+
+
+Ellipses, stars and convex hulls
+--------------------------------
+
+```{r label=plot34, fig.width=6, fig.height=6}
+g18 <- s.class(pca3$li, fac = meaudret$design$season, plot = FALSE)
+g19 <- s.class(pca3$li, fac = meaudret$design$season, ellipseSize = 0, 
+  chullSize = 1, starSize = 0.5, col = TRUE, plot = FALSE)
+g20 <- s.class(pca3$li, fac = meaudret$design$season, pellipses.lwd = 2, 
+  pellipses.border = 2:5, pellipses.col = 2:5, plot = FALSE)
+g21 <- s.class(pca3$li, fac = meaudret$design$season, ellipseSize = 0, 
+  chullSize = 0, ppolygons.lwd = 2, plines.col = 2:5, starSize = 1.2, plot = FALSE)
+ADEgS(c(g18, g19, g20, g21), layout = c(2, 2))
+```
+
+
+Values and legend
+-----------------
+
+```{r label=plot35, fig.width=6, fig.height=6}
+data(rpjdl)
+coa2 <- dudi.coa(rpjdl$fau, scannf = FALSE, nf = 3)
+g22 <- s.value(coa2$li, coa2$li[,3], plot = FALSE)
+g23 <- s.value(coa2$li, coa2$li[,3], method = "color", ppoints.cex = 0.8, 
+  plegend.size= 0.8, plot = FALSE)
+g24 <- s.value(coa2$li, coa2$li[,3], plegend.size = 0.8, ppoints.cex = 0.8, 
+  symbol = "square", method = "color", key = list(columns = 1), 
+  col = colorRampPalette(c("yellow", "blue"))(6), plot = FALSE)
+g25 <- s.value(coa2$li, coa2$li[, 3], center = 0, method = "size", ppoints.cex = 0.6, 
+  symbol = "circle", col = c("yellow", "red"), plot = FALSE)
+ADEgS(c(g22, g23, g24, g25), layout = c(2, 2))
+```
+
+
+1-D plot
+--------
+
+```{r label=plot36, fig.width=6, fig.height=6}
+score1 <- c(rnorm(1000, mean = -0.5, sd = 0.5), rnorm(1000, mean = 1))
+fac1 <- rep(c("A", "B"), each = 1000)
+g26 <- s1d.density(score1, fac1, pback.col = "grey75", plot = FALSE)
+g27 <- s1d.density(score1, fac1, col = c(2, 4), plot = FALSE)
+g28 <- s1d.density(score1, fac1, col = c(2, 4), p1d.reverse = TRUE, p1d.horizontal = FALSE, 
+  p1d.rug.draw = FALSE, plot = FALSE)
+g29 <- s1d.density(score1, fac1, col = c(2, 4), ppolygons.alpha = 0.2, 
+  p1d = list(rug = list(tck = 1, line = FALSE)), plot = FALSE)
+ADEgS(c(g26, g27, g28, g29), layout = c(2, 2))
+```
+
+Maps and neighbor graphs
+------------------------
+
+```{r label=plot37, fig.width=6, fig.height=3}
+library(Guerry)
+library(sp)
+data(gfrance85)
+region.names <- data.frame(gfrance85)[, 5]
+col.region <- colors()[c(149, 254, 468, 552, 26)]
+g30 <- s.class(coordinates(gfrance85), region.names, porigin.include = FALSE, plot = FALSE)
+g31 <- s.class(coordinates(gfrance85), region.names, ellipseSize = 0, starSize = 0, 
+  Sp = gfrance85, pgrid.draw = FALSE, pSp.col = col.region[region.names], pSp.alpha = 0.4, 
+  plot = FALSE)
+ADEgS(c(g30, g31), layout = c(1, 2))
+```
+
+```{r label=plot38, fig.width=6, fig.height=4}
+s.Spatial(gfrance85[,7:12])
+```
+
+```{r label=plot39, fig.width=6, fig.height=3}
+data(mafragh, package = "ade4")
+g32 <- s.label(mafragh$xy, nb = mafragh$nb, plot = FALSE)
+g33 <- s.label(mafragh$xy, nb = mafragh$nb, pnb.ed.col = "red", plab.cex = 0, 
+  pnb.node = list(cex = 3, col = "blue"), ppoints.col = "green", plot = FALSE)
+ADEgS(c(g32, g33), layout = c(1, 2))
+```
+
+
+Ternary plots
+-------------
+
+```{r label=plot40, fig.width=6, fig.height=3}
+data(euro123, package = "ade4")
+df <- rbind.data.frame(euro123$in78, euro123$in86, euro123$in97)
+row.names(df) <- paste(row.names(euro123$in78), rep(c(1, 2, 3), rep(12, 3)), sep = "")
+g34 <- triangle.label(df, label = row.names(df), showposition = TRUE, plot = FALSE)
+g35 <- triangle.label(euro123$in78, plabels.cex = 0, ppoints.cex = 2, addmean = TRUE, 
+  show = FALSE, plot = FALSE)
+ADEgS(c(g34, g35), layout = c(1, 2))
+```
+
+<a name="appendix"></a>
+
+Appendix
+=============================
+
+This appendix summarizes the main changes between `ade4` and
+`adegraphics`. Each line corresponds to a graphical argument defined in
+`ade4` and its equivalent in `adegraphics` is given.
+
+| Arguments in `ade4` | Functions in `ade4`   | `g.args` in `adegraphics`   | `adeg.par` in `adegraphics`   |   |
+| ------------------- | ----------------------| ----------------------------| ------------------------------|---|
+| `abline.x`          | `table.cont`          | `ablineX`                   |                               |   |
+| `abline.y`          | `table.cont`          | `ablineY`                   |                               |   |
+| `abmean.x`          | `table.cont`          | `meanX`                     |                               |   |
+| `abmean.y`          | `table.cont`          | `meanY`                     |                               |   |
+| `addaxes`           | `s.arrow`, `s.chull`, `s.class`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `triangle.class`, `triangle.plot` | |`paxes.draw` | |
+| `area`              | `s.arrow`, `s.chull`, `s.class`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`  | `Sp`   |    |  a `Sp` object  |
+| `axesell`           | `s.class`, `s.distri`, `triangle.class`     |                    | `pellipses.axes.draw`                               |   |
+| `box`               | `s.corcircle`, `triangle.plot`          |                    | `pbackground.box`                                   |   |
+| `boxes`             | `s.arrow`, `s.label`, `sco.class`, `sco.label`, `sco.match`           |              | `plabels.boxes.draw`    |   |
+| `cellipse`          | `s.class`, `s.distri`, `triangle.class`      | `ellipseSize`                                               |                         |   |
+| `cgrid`             | `s.arrow`, `s.class`, `s.chull`, `s.corcircle`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `sco.boxplot`, `sco.class`, `sco.distri`, `sco.gauss`, `sco.label`, `sco.match` |  | `pgrid.nint` |  both play on the grid mesh, but they are not strictly equivalent |
+| `clabel`            | `s.arrow`, `s.class`, `s.chull`, `s.corcircle`, `s.distri`, `s.kde2d`, `s.label`, `s.match`, `s.traject`, `sco.boxplot`, `sco.class`, `sco.distri`, `sco.gauss`, `sco.label`, `sco.match`, `triangle.plot`   |  | `plabels.cex` |   |
+| `clabel`            | `table.dist`    |                                                                                             |  | `axis.text = list()` `lattice` parameter  |
+| `clabel.col`        | `table.cont`, `table.paint`, `table.value`    |                                                               |  | `axis.text = list()` `lattice` parameter  |
+| `clabel.row`        | `table.cont`, `table.paint`, `table.value`    |                                                               |  | `axis.text = list()` `lattice` parameter  |
+| `clegend`           | `s.value`, `table.cont`, `table.value`        |                                   | `plegend.size` `ppoints.cex` | parameters setting the legend size        |
+| `clegend`           | `table.paint`                                 |                                   | `plegend.size`                                |                          |
+| `clogo`             | `s.logo`                                      |                                   | `ppoints.cex`                                 |                          |
+| `cneig`             | `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.value`     |                                   | `pnb.edge.lwd`                                |                          |
+| `col.labels`        | `table.cont`, `table.paint`, `table.value`                                                                     | `labelsy`  |     |                          |
+| `contour`           | `s.arrow`, `s.class`, `s.chull`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value` | `Sp`  |   | a `Sp` object            |
+| `contour.plot`      | `s.image`  | `region`  |                      |             |
+| `cpoints`, `cpoint` | `s.arrow`, `s.class`, `s.chull`, `s.distri`, `s.kde2d`, `s.label`, `s.match`, `s.traject`, `s.value`, `sco.class`, `sco.label`, `sco.match`, `triangle.class`, `triangle.plot`  |   | `ppoints.cex` |    |
+| `csize`      | `s.value`, `table.cont`, `table.dist`, `table.paint`, `table.value`  | `ppoints.cex`  |                      |             |
+| `csize`      | `sco.distri`  | `sdSize`    |                      |             |
+| `cstar`      | `s.class`, `s.distri`, `triangle.class`  | `starSize`    |           |             |
+| `csub`       | `s.arrow`, `s.chull`, `s.class`, `s.corcircle`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `sco.boxplot`, `sco.class`, `sco.distri`, `sco.gauss`, `sco.label`, `sco.match`, `triangle.class`, `triangle.plot`  |  | `psub.cex`   |  |
+| `draw.line`  | `triangle.biplot`, `triangle.class`, `triangle.plot` | | `pgrid.draw`       | |
+| `edge`       | `s.arrow`, `s.match`, `s.traject`  | | `parrows.length`   | setting the length of the arrows to 0 is equivalent to `edge = FALSE` |
+| `grid`       | `s.arrow`, `s.chull`, `s.class`, `s.corcircle`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `sco.boxplot`, `sco.class`, `sco.distri`, `sco.gauss`, `sco.label`, `sco.match`, `table.cont`, `table.dist`, `table.value`  |  | `pgrid.draw` |  |
+| `horizontal` | `sco.class`, `sco.gauss`, `sco.label`, `sco.match` |              | `p1d.horizontal`  |             |
+| `image.plot` | `s.image`                             | `contour`    |                   |             |
+| `includeorigin`, `include.origin`  | `s.arrow`, `s.chull`, `s.class`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `sco.boxplot`, `sco.class`, `sco.distri`, `sco.gauss`, `sco.label`, `sco.match` |  | `porigin.include` |  |
+| `kgrid` | `s.image`                                  | `gridsize`   |                   |             |
+| `klogo` | `s.logo`                                   |              |                   | no correspondence |
+| `labeltriangle` | `triangle.class` , `triangle.plot`                  |                   |        | no correspondence   | 
+| `legen`          | `sco.gauss`                      | `labelplot`         |            |                   |
+| `neig`           | `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.value` | `nbobject`         |            | a `nb` object |
+| `optchull`       | `s.chull`                         | `chullSize`         |            |                   |
+| `origin`         | `s.arrow`, `s.chull`, `s.class`, `s.corcircle`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `sco.boxplot`, `sco.class`, `sco.distri`, `sco.gauss`, `sco.label`, `sco.match` | | `porigin.origin` | |
+| `pch`            | `s.arrow`, `s.chull`, `s.class`, `s.distri`, `s.kde2d`, `s.label`, `s.match`, `s.traject`, `s.value`, `sco.boxplot`, `sco.class`, `sco.label`, `sco.match`, `triangle.class`, `triangle.plot`, `table.cont`  | | `ppoints.pch`   |  |
+| `pixmap`         | `s.arrow`, `s.chull`, `s.class`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`         | | | no correspondence  |
+| `pos.lab`        | `sco.class`, `sco.label`, `sco.match`         | | `p1d.labpos` | |
+| `possub`         | `s.arrow`, `s.chull`, `s.class`, `s.corcircle`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `sco.class`, `sco.gauss`, `sco.label`, `sco.match`, `triangle.class`, `triangle.plot`  | | `psub.pos`   |  |
+| `rectlogo`       | `s.logo`     | `rect` | |   |
+| `reverse`        | `sco.class`, `sco.gauss`, `sco.label`, `sco.match` | | `p1d.reverse` |   |
+| `row.labels`     | `table.cont`, `table.paint`, `table.value`     | `labelsx` | | |
+| `scale`          | `triangle.class`, `triangle.plot`     | `adjust` | | |
+| `show.position`  | `triangle.class`, `triangle.plot`     | `showposition` | | |
+| `sub`            | `s.arrow`, `s.chull`, `s.class`, `s.corcircle`, `s.distri`, `s.image`, `s.kde2d`, `s.label`, `s.logo`, `s.match`, `s.traject`, `s.value`, `sco.boxplot`, `sco.class`, `sco.distri`, `sco.gauss`, `sco.label`, `sco.match`, `triangle.class`, `triangle.plot`  | | `psub.text`   |  |
+| `y.rank`  | `sco.distri`     | `yrank` | | |
+| `zmax`  | `s.value`     | | | set to default max(abs(z)) |
+| | | | | | 
+
+
+
+
+References
+=============================
\ No newline at end of file
diff --git a/vignettes/adegraphics.bib b/vignettes/adegraphics.bib
new file mode 100644
index 0000000..6b8d99b
--- /dev/null
+++ b/vignettes/adegraphics.bib
@@ -0,0 +1,33 @@
+ at article{DrayJombart2011,
+  title = {Revisiting Guerry's data: introducing spatial constraints in multivariate analysis},
+  author = {S. Dray and T. Jombart},
+  journal = {The Annals of Applied Statistics},
+  year = {2011},
+  volume = {5},
+  pages = {2278-2299}
+}
+
+ at book{Sarkar2008,
+  title={Lattice: multivariate data visualization with R},
+  author={D. Sarkar},
+  year={2008},
+  publisher={Springer}
+}
+
+ at book{Murrell2005,
+  title={R graphics},
+  author={P. Murrell},
+  year={2005},
+  publisher={Chapman \& Hall/CRC}
+}
+
+ at article{Dray2007,
+author = {S. Dray and A. B. Dufour},
+journal = {Journal of Statistical Software},
+number = {4},
+pages = {1--20},
+title = {The ade4 package: implementing the duality diagram for ecologists},
+volume = {22},
+year = {2007}
+}
+
diff --git a/vignettes/classes.png b/vignettes/classes.png
new file mode 100644
index 0000000..aff9e23
Binary files /dev/null and b/vignettes/classes.png differ
diff --git a/vignettes/gargsVSclass.R b/vignettes/gargsVSclass.R
new file mode 100644
index 0000000..e27b122
--- /dev/null
+++ b/vignettes/gargsVSclass.R
@@ -0,0 +1,11 @@
+library(grid)
+t <- read.csv("gargsVSclass.csv", sep = ",", header = TRUE, check.names = FALSE)
+row.names(t) <- t[, 1]
+t <- t[, -1]
+t[is.na(t)] <- 0
+
+table.value(t, plegend.drawKey = FALSE, ppoints.cex = 0.2, symbol = "circle", axis.text = list(cex = 0.7), pgrid.draw = TRUE,
+            ptable.margin = list(bottom = 5, left = 15, top = 15, right = 5),
+            ptable.x = list(tck = 5), ptable.y = list(tck = 5, srt = 45, pos = "left"))
+            
+
diff --git a/vignettes/gargsVSclass.csv b/vignettes/gargsVSclass.csv
new file mode 100644
index 0000000..b76bbbb
--- /dev/null
+++ b/vignettes/gargsVSclass.csv
@@ -0,0 +1,42 @@
+,s1d.barchart,s1d.curve,s1d.curves,s1d.density,s1d.dotplot,s1d.gauss,s1d.hist,s1d.interval,s1d.boxplot,s1d.class,s1d.distri,s1d.label,s1d.match,s.arrow,s.class,s.corcircle,s.density,s.distri,s.image,s.label,s.logo,s.match,s.traject,s.value,table.value (T.cont),table.image,table.value (T.value),triangle.class,triangle.label,triangle.match,triangle.traject
+ablineX,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,
+ablineY,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,
+addaxes,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,
+addmean,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,
+adjust,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,1,1,1
+arrows,,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,,
+axespar,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,
+bandwidth,,,,1,,,,,,,,,,,,,1,,,,,,,,,,,,,,
+breaks,,,,,,,1,,,,,,,,,,,,1,,,,,1,1,1,1,,,,
+center,,,,,,,,,,,,,,,,,,,,,,,,1,1,,1,,,,
+centerpar,,,,,,,,,,,,,,,,,,,,,,,,1,1,,1,,,,
+chullSize,,,,,,,,,,,,,,,1,,,,,,,,,,,,,1,,,
+col,,,,1,,1,,,1,1,,,,,1,,1,1,,,,1,1,1,1,1,1,1,,,1
+contour,,,,,,,,,,,,,,,,,1,,1,,,,,,,,,,,,
+ellipseSize,,,,,,,,,,,,,,,1,,,1,,,,,,,,,,1,,,
+fill,,,,1,,1,,,,,,,,,,,,,,,,,,,,,,,,,
+fullcircle,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,,,
+gridsize,,,,1,,,,,,,,,,,,,1,,1,,,,,,,,,,,,
+kernel,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,
+max3d,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,1,1,1
+meanpar,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,
+meanX,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,
+meanY,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,
+method,,,,,,,,1,,,,,,,,,,,,,,,,1,1,,1,,,,
+min3d,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,1,1,1
+nclass,,,,,,,1,,,,,,,,,,1,,1,,,,,1,1,1,1,,,,
+nrpoints,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,,
+order,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,1
+outsideLimits,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,
+poslab,,,,,,,,,,1,,1,,,,,,,,,,,,,,,,,,,
+rect,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,
+region,,,,,,,,,,,,,,,,,1,,1,,,,,,,,,,,,
+right,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,
+sdSize,,,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,
+span,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,
+starSize,,,,,,,,,,,,,,,1,,,1,,,,,,,,,,1,,,
+steps,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,
+symbol,,,,,,,,,,,,,,,,,,,,,,,,1,1,,1,,,,
+threshold,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,,
+type,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,
+yrank,,,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,
diff --git a/vignettes/paramVSfunction.R b/vignettes/paramVSfunction.R
new file mode 100644
index 0000000..72253af
--- /dev/null
+++ b/vignettes/paramVSfunction.R
@@ -0,0 +1,10 @@
+t <- read.csv("tableparamVSfunction.csv", sep = ",", header = TRUE, check.names = FALSE)
+row.names(t) <- t[, 1]
+t <- t[, -1]
+t[is.na(t)] <- 0
+
+table.value(t, plegend.drawKey = FALSE, ppoints.cex = 0.2, symbol = "circle", axis.text = list(cex = 0.8), pgrid.draw = TRUE, 
+            ptable.y = list(srt = 45, pos = "left"), 
+            ptable.margin = list(bottom = 2, left = 15, top = 15, right = 2))
+            
+            
diff --git a/vignettes/paramVSparam.R b/vignettes/paramVSparam.R
new file mode 100644
index 0000000..24bd202
--- /dev/null
+++ b/vignettes/paramVSparam.R
@@ -0,0 +1,46 @@
+Adegpar <- adegpar()
+names <- names(Adegpar)
+xx <- as.null()
+yy <- as.null()
+
+for(i in 1:length(Adegpar)) {
+  if(is.list(Adegpar[[i]])) {
+    for(j in 1:length(Adegpar[[i]])) {
+      if(is.list(Adegpar[[i]][[j]])) {  ## sublist of list
+        xx <- c(xx, paste(names(Adegpar)[i], '.', names(Adegpar[[i]])[j], sep = ""))
+        yy <- c(yy, names(Adegpar[[i]][[j]]))
+      } else {
+        yy <- c(yy, names(Adegpar[[i]])[j])
+        xx <- c(xx, names[i])
+      }
+    }
+  }
+  else
+    xx <- c(xx, names[i])
+}
+
+yy <- unique(yy)
+xx <- unique(xx)
+paramVSsub <- data.frame(matrix(0, nrow = length(yy), ncol = length(xx)))
+row.names(paramVSsub) <- yy
+colnames(paramVSsub) <- xx
+
+## filling
+for(i in 1:length(Adegpar)) {
+  if(is.list(Adegpar[[i]])) {
+    for(j in 1:length(Adegpar[[i]])) {
+      if(is.list(Adegpar[[i]][[j]])) ## sublistof list
+        paramVSsub[names(Adegpar[[i]][[j]]), paste(names(Adegpar)[i], '.', names(Adegpar[[i]])[j], sep = "")] <- 100
+      else
+        paramVSsub[names(Adegpar[[i]])[j], names[i]] <- 100
+  	}
+  }
+}
+
+table.value(t(paramVSsub), axis.text = list(cex = 0.9), symbol = "circle", plegend.drawKey = FALSE, ppoints.cex = 0.3, 
+            ptable.y = list(srt = 60, pos = "left"),
+            ptable.margin = list(bottom = 2, left = 17, top = 17, right = 2))
+            
+
+
+
diff --git a/vignettes/tableparamVSfunction.csv b/vignettes/tableparamVSfunction.csv
new file mode 100644
index 0000000..c842f64
--- /dev/null
+++ b/vignettes/tableparamVSfunction.csv
@@ -0,0 +1,31 @@
+,"p1d","parrows","paxes","pbackground","pellipses","pgrid","plabels","plegend","plines","pnb","porigin","ppalette","ppoints","ppolygons","pSp","psub","ptable"
+"s.arrow",,1,1,1,,1,1,,1,1,1,,,,1,1,
+"s.class",,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+"s.corcircle",,1,1,1,,1,1,,1,1,1,,,,1,1,
+"s.density",,,1,1,,1,1,,,1,1,1,1,,1,1,
+"s.distri",,,1,1,1,1,1,,1,1,1,1,1,,1,1,
+"s.image",,,1,1,,1,1,1,,1,1,1,,,1,1,
+"s.label",,,1,1,,1,1,,,1,1,,1,,1,1,
+"s.logo",,,1,1,,1,,,,1,1,,,,1,1,
+"s.match",,1,1,1,,1,1,,1,1,1,,1,,1,1,
+"s.traject",,1,1,1,,1,1,,1,1,1,,1,,1,1,
+"s.value",,,1,1,,1,,1,,1,1,1,1,,1,1,
+"s1d.barchart",1,,1,1,,1,1,,,,1,,,1,,1,
+"s1d.boxplot",1,,1,1,,1,1,,1,,1,,1,1,,1,
+"s1d.class",1,,1,1,,1,1,1,1,,1,,1,,,1,
+"s1d.curve",1,,1,1,,1,,,1,,1,,1,,,1,
+"s1d.curves",1,,1,1,,1,,,1,,1,,1,,,1,
+"s1d.density",1,,1,1,,1,1,,1,,1,,,,,1,
+"s1d.distri",1,,1,1,,1,1,,1,,1,,1,,,1,
+"s1d.dotplot",1,,1,1,,1,,,1,,1,,1,,,1,
+"s1d.gauss",1,,1,1,,1,1,,1,,1,,,,,1,
+"s1d.hist",1,,1,1,,1,,,,,1,,,1,,1,
+"s1d.interval",1,1,1,1,,1,,,1,,1,,,1,,1,
+"s1d.label",1,,1,1,,1,1,,1,,1,,1,,,1,
+"s1d.match",1,,1,1,,1,1,,1,,1,,1,,,1,
+"table.image",,,,1,,1,,1,,,,,1,,,1,1
+"table.value",,,,1,,1,,1,1,,,1,1,,,1,1
+"triangle.class",,,1,1,1,1,1,1,1,,,1,1,1,,1,
+"triangle.label",,,1,1,,1,1,,,,,,1,,,1,
+"triangle.match",,1,1,1,,1,1,,1,,,,1,,,1,
+"triangle.traject",,1,1,1,,1,1,,1,,,,1,,,1,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-cran-adegraphics.git



More information about the debian-med-commit mailing list