tikzscat | R Documentation |
TikZ
scatter plotCreate a simple 2D TikZ
scatter plot, useful for plotting PCA data.
tikzscat(data, obs_lvls, marks, tscale, axes_color = "gray")
data |
Data to plot, m x 2 numeric matrix, where m is the number of observations or points to plot. |
obs_lvls |
Levels or groups associated with each observation. |
marks |
Character vector determining how to draw the points in
|
tscale |
The |
axes_color |
Axes color (must be a |
This function creates a simple TikZ
2D scatter plot within a
tikzpicture
environment. The points are plotted on a normalized
figure with x and y axes bounded between [-1, 1]. To render
adequately, the final LaTeX
document should load the plotmarks
TikZ
library.
A string containing the TikZ
figure code for plotting the
specified data
.
tikzscat(rbind(c(1.5, 2), c(0.5, 1)), factor(c(1,2)),
c("mark=square*,mark options={color=red},mark size=0.8pt",
"mark=diamond*,mark options={color=black},mark size=1pt"),
6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.