PCATools: is it possible to output a single legend when using pairsplot()?
1
0
Entering edit mode
oakhamwolf • 0
@oakhamwolf-24374
Last seen 4.2 years ago
UK

Hi all,

I'm currently loving the PCATools package, it is very neat and easily replaces my own comparatively crude efforts using ggplot2()

When producing a pairsplot() I was wondering if it was possible to output a single legend (top, bottom, right or left) to be used as a reference for all the individual biplots? Currently when using legendPosition = 'bottom' (for example), each biplot has its own legend, which is a bit redundant and also squishes all the biplots.

Many thanks.

PCATools • 1.7k views
ADD COMMENT
1
Entering edit mode
Kevin Blighe ★ 4.0k
@kevin
Last seen 6 weeks ago
Republic of Ireland

For this, you'll have to plot each as a panel via cowplot::plot_grid() and make use of the rel_widths parameter. Or, it may even be easier to output each with the legend and do some post-editing outside of R.

Kevin

ADD COMMENT
0
Entering edit mode

Great. I'll give it a go. If it's not already implemented in PCATools, is there a way to submit a feature request for a future version?Thanks again for putting PCATools together. Cheers

ADD REPLY
0
Entering edit mode

You can create an issue on the GitHub page, if you wish: https://github.com/kevinblighe/PCAtools

ADD REPLY

Login before adding your answer.

Traffic: 893 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6