Using plot3D()

Simon Liles


One of the core functionalities of protein8k is the ability to plot a 3 dimensional model of a protein’s atomic record. This vignette serves to explore the function that enables this capability, plot3D(). This function is primarily a wrapper function of the lattice cloud() function, thus much of the functionality of this function should feel familiar to those with experience in lattice.

The Most Basic Plot

Creating a simple plot is very easy. The following code creates a simple plot looking at what could be considered the “front” of the protein.

This visual is not very aesthetically pleasing, nor does it provide any insight. The next few sections will demonstrate how to use the various arguments in plot3D() to make insightful 3D visualizations of a protein’s atomic record.


One of the quickest ways to gain additional insight into a protein’s structure is to animate a plot of it spinning on an axis. When animating the plot, the function will create a series of PNG images looking at the plot from different angles before combining them into a single GIF and plotting to the viewer.

plot3D(p53_tetramerization, animated = TRUE)