www.ggtern.com
On Wednesday, February 16, 2011 2:42:43 AM UTC+11, Walmes Marques Zeviani
wrote:
>
>
> Colin,
>
> If your propose is to create a ternary plot with points and vectors, I
> think easier do this with graphics based plots instead of trellis based
> plots. Although, with little work you can do with trellis too. I gave you a
> reproducible code to put an arrow in a ternary plot. I use the function
> locator() to extract coordinates. The code is the following
>
>
> #------------------------------------------------------------------------------------------
> # package and related documentaion
>
> require(plotrix)
> help.search("triax")
> help(triax.plot, html=TRUE)
>
>
> #------------------------------------------------------------------------------------------
> # toy data
>
> data(soils)
> str(soils)
>
>
> #------------------------------------------------------------------------------------------
> # creating a ternary plot
>
> triax.plot(soils[1:10,], main="DEFAULT")
>
>
> #------------------------------------------------------------------------------------------
> # extracting coodinates by mouse click on the plot (cartesian coordinates,
> x and y axis)
>
> id <- locator(n=2) # click on the plot to extract 2 coodinates
>
>
> #------------------------------------------------------------------------------------------
> # draw an arrow with the coordinates extracted
>
> arrows(id$x[1], id$y[1], id$x[2], id$y[2])
>
>
> #------------------------------------------------------------------------------------------
>
> At your disposal.
> Walmes.
>
> ============================================================
>
>
> Walmes Marques Zeviani
>
>
> LEG (Laborat?rio de Estat?stica e Geoinforma??o)
>
>
> Departamento de Estat?stica - Universidade Federal do Paran?
>
>
> fone: (+55) 41 3361 3573
>
>
> VoIP: (3361 3600) 1053 1173
>
>
> e-mail: wal... at ufpr.br <javascript:> / @walmeszeviani
>
>
> homepage: http://www.leg.ufpr.br/~walmes
>
>
> ============================================================
>
>
> > Date: Mon, 14 Feb 2011 20:05:54 +0000
> > From: Colin... at bristol.ac.uk <javascript:>
> > To: walmes... at hotmail.com <javascript:>
> > Subject: ternary contour plot
> >
> > Dear Walmes,
> >
> > Firstly, thank you for distributing your ternary contour plot code.
> >
> > could I ask you a question about it, hopefully you will be able to
> > answer it quite simply and so save me some time trying to work out what
> > it is that the function is actually doing.
> >
> > Essentially I wish to overlay points and vectors onto the ternary
> > contour plot. Now can I do this by:
> >
> > a): extracting the adjusted x y coordinates and using it with triax.fill
> >
> > or
> >
> > b) can I plot my vectors (arrows) and points onto the grid that is
> > created by levelplot.ternary
> >
> > if either or both are true do you know how I would go about a)
> > extracting or b) inputing the relevent data?
> >
> > I would be grateful for your advice,
> >
> > best regards,
> >
> > colin
> >
> > --
> >
> **********************************************************************************
> >
> **********************************************************************************
> >
> > Dr Colin Bleay
> > Station d'Ecologie Experimentale du CNRS,
> > 09200 Moulis,
> > France.
> >
> > Tel: +33 5 61 04 03 61
> > Fax: +33 5 61 96 08 51
> > email: Colin... at EcoEx-Moulis.cnrs.fr <javascript:>
> > Webpage: http://www.ecoex-moulis.cnrs.fr/Staffpages/ColinBleay.htm
> >
>
> [[alternative HTML version deleted]]
>
>