[R] ternary contour plot

Nicholas Hamilton nicholasehamilton at gmail.com
Thu Dec 19 16:38:33 CET 2013


Dear Walmes, 

I wanted to mention that I have just published on CRAN, a package for R, 
for the plotting of ternary diagrams. 

It is based off ggplot2, which is highly regarded, and, my website can be 
viewed at www.ggtern.com, including many examples, specifically including a 
case study at the following address: 

http://ggtern.com/case-study-zirconia-alumina-silica/ 

Hope you find it of value. 

Best Regards, 

Nicholas Hamilton 
School of Materials Science and Engineering 
Univesity of New South Wales 
Sydney Australia 
-- 
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]]
>
>


More information about the R-help mailing list