Draw compact PCA views from regime_correlation_pca(). The default
"loadings" view reconstructs upper-triangle loading vectors as symmetric
trait-by-trait heatmaps, matching the Supplementary Figure 4B-style
interpretation of correlation-structure axes.
Usage
# S3 method for class 'regime_correlation_pca'
plot(
x,
type = c("loadings", "scores", "variance"),
components = 1:4,
pc_x = 1L,
pc_y = 2L,
palette = NULL,
main = NULL,
cluster = c("none", "global", "local"),
heatmap_engine = c("auto", "base", "ComplexHeatmap"),
show_dendrogram = TRUE,
show_legend = TRUE,
cex.axis = 0.62,
...
)Arguments
- x
A
regime_correlation_pcaobject.- type
Plot type:
"loadings","scores", or"variance".- components
Principal components to draw for loading or variance plots. Supply numeric indices or names such as
"PC1". By default, the first four available components, or all components when fewer exist, are drawn.- pc_x, pc_y
Components for the score scatter plot. The default uses PC1 and PC2 when available, or PC1 for both axes when only one component exists.
- palette
Optional color vector for loading heatmaps.
- main
Optional plot title. For loading plots with multiple components, supply one title per component.
- cluster
Loading-heatmap clustering style:
"none"preserves trait order,"global"reuses the first selected PC's clustered row/column order for all panels, and"local"reclusters each PC panel.- heatmap_engine
Loading-heatmap renderer.
"auto"usesComplexHeatmapfor clustered heatmaps when that optional package is installed and otherwise falls back to base graphics.- show_dendrogram, show_legend
Logical controls used by the optional
ComplexHeatmaprenderer.- cex.axis
Axis label size for loading heatmaps.
- ...
Additional graphical parameters passed to base plotting functions.
