Learn R Programming

longitudinalData (version 2.0)

saveTrianglesAsASY: ~ Function: saveTrianglesAsASY ~

Description

Export a Triangle object to an '.azy' file.

Usage

saveTrianglesAsASY(scene, filename = "scene.asy")

Arguments

scene
[Triangle]: Object representing the graph to plot, probably produce by plot3dPdf.
filename
[character]: Name of exported file.

Value

  • An '.asy' file, in the current directory.

Author(s)

Luke Tierney Chair, Statistics and Actuarial Science Ralph E. Wareham Professor of Mathematical Sciences University of Iowa

Details

Export a Triangle object to an '.asy' file. See plot3dPdf for a summary of the overall procedure.

References

http://www.stat.uiowa.edu/~luke/R/misc3d/misc3d-pdf/

See Also

plot3dPdf,makeLatexFile,makeTriangles

Examples

Run this code
### Generating the data
  myLd <- gald3d()
  part <- partition(rep(1:3,each=50))
  plot3d(myLd,part)

  ### Creation of the scene
  scene <- plot3dPdf(myLd,part)
  drawScene.rgl(scene)

  ### Export in '.azy' file
  saveTrianglesAsASY(scene)

  ### Creation of a '.prc' file
  # Open a console, then run:
  # 'asy -inlineimage -tex pdflatex scene.azy'

  ### Creation of the LaTeX main document
  makeLatexFile()

  ### Creation of the '.pdf'
  # Open a console window, then run
  # pdfLatex main.tex

Run the code above in your browser using DataLab