ampvis2 icon indicating copy to clipboard operation
ampvis2 copied to clipboard

Ordination plots do not use equally scaled axes/coordinate system

Open gavinsimpson opened this issue 1 year ago • 2 comments

Ordination plots (biplots/joint plots) should use a coordinate system where 1 unit change in the x direction is equal to 1 unit change in the y direction. This allows a true visual interpretation of distances on the plot being a 2-d approximation of the distances in the original data.

All of the ordination methods in ampvis should be visualised within a coordinate system with a fixed aspect ratio of 1.

The solution to this issue is to add + coord_fixed(ratio = 1) to the base plot object after it is created and before other layers are added (for simplicity's sake).

gavinsimpson avatar Apr 02 '25 11:04 gavinsimpson

While I agree, some people would be interested in looking at invididual axes only. But could make it optional with a default.

KasperSkytte avatar Apr 17 '25 09:04 KasperSkytte

If you are only looking at a single axis, then there is no other axis to visualize and coord_fixed(1) would do nothing (there is not other axis to be fixed against), so there is no harm (unless you are plotting something derived on the y axis (like a density or histogram), in which case sure, you don't need equal scaling.

gavinsimpson avatar Apr 17 '25 09:04 gavinsimpson

Merged PR #177

KasperSkytte avatar Nov 03 '25 08:11 KasperSkytte