**ggtern: ternary diagrams in R**, and kindly contributed to R-bloggers)

Version 2.1.0 has just been submitted to CRAN and should be available over the next day or so. This version primarily resolves the recent errors that people have been encountering when using ggtern with the most recent version of ggplot2 (v2.1.0). Specifically, the following errors recently emerged, due to (amongst other changes) a change in function signatures in ggplot2’s never-ending quest for plotting-perfection.

Error in ggint$map_layout(panel, plot$facet, layer_data, plot$data) : unused argument (plot$data)

**and**

Error in FUN(X[[i]], …) : attempt to apply non-function

However, in the spirit of improvement, I have also included a number of new geometries with this version:

## Axis marks and Ternary Crosshairs

This geometry is for displaying the respective values along their axes for points, here is an example:

library(ggtern) set.seed(1) df = data.frame(x=runif(10),y=runif(10),z=runif(10)) base = ggtern(data=df,aes(x,y,z)) + geom_point() base1 = base + geom_Tmark(color='red') + labs(title="Tmark") base2 = base + geom_Lmark(color='blue') + labs(title="Lmark") base3 = base + geom_Rmark(color='green') + labs(title="Rmark") base4 = base + geom_crosshair_tern(color='black') + labs(title="Crosshair") grid.arrange(base1,base2,base3,base4)

Which produces the following:

## Isoproportion Lines

This geometry is for displaying isoproportion lines, here is an example, using the same dataset from the previous example:

values = c(.25)*c(1:3) base1 = base + geom_Tisoprop(color='red',value=values) + labs(title="Tisoprop") base2 = base + geom_Lisoprop(color='blue',value=values) + labs(title="Lisoprop") base3 = base + geom_Risoprop(color='green',value=values) + labs(title="Risoprop") base4 = base + geom_Tisoprop(color='red',value=.5) + geom_Lisoprop(color='blue',value=.5) + geom_Risoprop(color='green',value=.5) + labs(title="All Isoproportion Lines") grid.arrange(base1,base2,base3,base4,nrow=2)

Which produces the following:

If there are any further bugs that I have not fixed, please let me know, and as always, if this has helped you in your work, please feel free to contribute to my beer fund via the donations button at the top.

Cheers.

NH

The post Version 2.1.0 Released appeared first on ggtern: ternary diagrams in R.

**leave a comment**for the author, please follow the link and comment on their blog:

**ggtern: ternary diagrams in R**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...