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...@ufpr.br / @walmeszeviani


homepage: http://www.leg.ufpr.br/~walmes


============================================================




> Date: Mon, 14 Feb 2011 20:05:54 +0000
> From: colin.bl...@bristol.ac.uk
> To: walmeszevi...@hotmail.com
> 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.bl...@ecoex-moulis.cnrs.fr
> Webpage: http://www.ecoex-moulis.cnrs.fr/Staffpages/ColinBleay.htm
> 
                                          
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to