Rainer M Krug
2011-Apr-07 09:27 UTC
[R] plot layout with several plots ON plot area of previous plot
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi I would like to have a plot layout, on which line graphs are on the plot area of an underlying bar graph. How can I achieve this? I know about layout() and par() to create a layout, but as far as I know, they assign non-overlapping plot areas. Effectively, it should look as below: |------------------------| | | | |---| |---| | | | | | | | | | | | | | | |-L-| |-L-| | | | | | | | | | | | | | |-the bargraph-----------| L: the line graphs Any help appreciated, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel: +33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: Rainer at krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2dg3UACgkQoYgNqgF2egpegwCfbqQP19qZqyof21+rA9Cbn+Vf UKcAnAgl6AoUNcygx/sSaMcYV+zoum/S =9/P0 -----END PGP SIGNATURE-----
Rainer M Krug
2011-Apr-07 09:39 UTC
[R] plot layout with several plots ON plot area of previous plot
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/04/11 11:27, Rainer M Krug wrote:> Hi > > I would like to have a plot layout, on which line graphs are on the plot > area of an underlying bar graph. > How can I achieve this? I know about layout() and par() to create a > layout, but as far as I know, they assign non-overlapping plot areas.Sorry - did not do my homework and forgot to google - found the solution (http://tolstoy.newcastle.edu.au/R/help/04/11/6449.html). But an additional question - uis there a way to position the plots in relation to the co-ordinates of the first plot, i.e. the x axis of the first plot (ehich covers the whole plot area) is from 1 to 6 - can I position the second overlapping plot over the x-coordinate 3 of the first plot? Rainer> > Effectively, it should look as below: > > |------------------------| > | | > | |---| |---| | > | | | | | | > | | | | | | > | |-L-| |-L-| | > | | > | | > | | > | | > | | > | | > |-the bargraph-----------| > > L: the line graphs > > Any help appreciated, > > Rainer > > >- -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel: +33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: Rainer at krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2dhmMACgkQoYgNqgF2egqysACeMJ0nl81wSBlr8w4s7sM2Zo2k gvUAnjTlzoFoOnDHPzbziRAbS/8MbV0p =LYr+ -----END PGP SIGNATURE-----
Rainer M Krug
2011-Apr-07 10:03 UTC
[R] plot layout with several plots ON plot area of previous plot
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/04/11 12:53, Jim Lemon wrote:> On 04/07/2011 07:39 PM, Rainer M Krug wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> On 07/04/11 11:27, Rainer M Krug wrote: >>> Hi >>> >>> I would like to have a plot layout, on which line graphs are on the plot >>> area of an underlying bar graph. >>> How can I achieve this? I know about layout() and par() to create a >>> layout, but as far as I know, they assign non-overlapping plot areas. >> >> Sorry - did not do my homework and forgot to google - found the solution >> (http://tolstoy.newcastle.edu.au/R/help/04/11/6449.html). >> >> But an additional question - uis there a way to position the plots in >> relation to the co-ordinates of the first plot, i.e. the x axis of the >> first plot (ehich covers the whole plot area) is from 1 to 6 - can I >> position the second overlapping plot over the x-coordinate 3 of the >> first plot? >> >> Rainer >> >> >>> >>> Effectively, it should look as below: >>> >>> |------------------------| >>> | | >>> | |---| |---| | >>> | | | | | | >>> | | | | | | >>> | |-L-| |-L-| | >>> | | >>> | | >>> | | >>> | | >>> | | >>> | | >>> |-the bargraph-----------| >>> >>> L: the line graphs >>> > Hi Rainer, > I think you want the subplot function in the TeachingDemos package.Exactly - why is such a gem of a function hiding in a package with Demos in the name? I would never have thought about that. Thanks a lot, Rainer> > Jim >- -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel: +33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: Rainer at krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2di+YACgkQoYgNqgF2egqR2ACdE8w+uvtDXtd09ml3L3DYwtas uesAn3emEYA7679U4Z7RfZO80T0p0pZ/ =iRDW -----END PGP SIGNATURE-----
Rainer M Krug
2011-Apr-07 10:25 UTC
[R] plot layout with several plots ON plot area of previous plot
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/04/11 13:09, Jim Lemon wrote:> On 04/07/2011 08:03 PM, Rainer M Krug wrote: >> ... >> Exactly - why is such a gem of a function hiding in a package with Demos >> in the name? I would never have thought about that. >> > Maybe Greg thought it was a package for the people.Nothing to add :-) Rainer> > Jim >- -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel: +33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: Rainer at krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2dkTQACgkQoYgNqgF2egoDlQCeLqIYerpiuIdsACLwq/PwpTkX v6gAn3ELKBe5StvYvL6/Iq9JpMumPyu8 =HNIS -----END PGP SIGNATURE-----
Jim Lemon
2011-Apr-07 10:53 UTC
[R] plot layout with several plots ON plot area of previous plot
On 04/07/2011 07:39 PM, Rainer M Krug wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 07/04/11 11:27, Rainer M Krug wrote: >> Hi >> >> I would like to have a plot layout, on which line graphs are on the plot >> area of an underlying bar graph. >> How can I achieve this? I know about layout() and par() to create a >> layout, but as far as I know, they assign non-overlapping plot areas. > > Sorry - did not do my homework and forgot to google - found the solution > (http://tolstoy.newcastle.edu.au/R/help/04/11/6449.html). > > But an additional question - uis there a way to position the plots in > relation to the co-ordinates of the first plot, i.e. the x axis of the > first plot (ehich covers the whole plot area) is from 1 to 6 - can I > position the second overlapping plot over the x-coordinate 3 of the > first plot? > > Rainer > > >> >> Effectively, it should look as below: >> >> |------------------------| >> | | >> | |---| |---| | >> | | | | | | >> | | | | | | >> | |-L-| |-L-| | >> | | >> | | >> | | >> | | >> | | >> | | >> |-the bargraph-----------| >> >> L: the line graphs >>Hi Rainer, I think you want the subplot function in the TeachingDemos package. Jim
Jim Lemon
2011-Apr-07 11:09 UTC
[R] plot layout with several plots ON plot area of previous plot
On 04/07/2011 08:03 PM, Rainer M Krug wrote:> ... > Exactly - why is such a gem of a function hiding in a package with Demos > in the name? I would never have thought about that. >Maybe Greg thought it was a package for the people. Jim