Image saving requires kaleido
python package setup via reticulate
R package. See ?plotly::save_image
for more details and setup instructions. Pass in savename
with html
file extension to avoid these errors.
Arguments
- df_pca
string or
prcomp
obj; (path to) PCA output- PCs
num vector; list of numeric PCs to plot (ex.
c(1:3)
for first 3 PCs)- type
c("Score", "Loading")
- anno
string/df; Annotation info for
df_pca
withannoname
,annotype
, andannolabel
columns- annoname
string; Colname in
anno
matching point name- annotype
string; Colname in
anno
with info to color by- annolabel
string; Colname in
anno
to label points by, defaults toannoname
- label
logical; T to label points
- colors
char vector; For discrete
annotype
, length should be number of uniqueannotype
s or length 2 for continuousannotype
s wherecolors[1]
represents low values andcolors[2]
represents high values.- title
string; Plot title
- savename
string; File path to save plot under,
html
if not an image format- rotate
logical; T to have the HTML widget automatically rotate when opened. Only applicable if
savename
is notNULL
- width
numeric; Saved plot width
- height
numeric; Saved plot height if saving as image format