TAS | R Documentation |
TAS()
draws either a static or interactive diagram, in english or spanish. It is a base diagram where data can be plotted.
TAS(output = c("ggplot", "plotly"), language = c("en", "es"))
output |
The output format: "ggplot" or "plotly" (default is "ggplot") |
language |
The language to be displayed: "en" for english or "es" for spanish (deafult is "en") |
The examples show basic usage and how to add data, which can be more customizable. In general, just map the silica content to the x-axis and alkali content to the y-axis.
TAS diagram in the desired format (object)
library(ggplot2) library(plotly) d = data.frame(silica=c(58,50,70), alkali=c(8,4,5)) TAS() TAS('plotly') # adding data to ggplot object TAS(language = 'es') + geom_point(aes(x=silica, y=alkali), data=d) # adding data to plotly object TAS('plotly') %>% add_markers(x=~silica, y=~alkali, data = d, name = "My data", marker = list(size=8,color='orange', symbol=3,opacity=.9)) %>% layout(showlegend = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.