Discussion:
Correlation plot
Eduardo Beche
2018-09-07 07:42:14 UTC
Permalink
Hi

I am interested in plot correlations from two different set of data below
and above the diagonal line. Does somebody have any idea how I can code
that?

Thanks
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility

To post: email ***@googlegroups.com
To unsubscribe: email ggplot2+***@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ron Crump
2018-09-07 08:50:46 UTC
Permalink
Hi Eduardo,
Post by Eduardo Beche
I am interested in plot correlations from two different set of data
below and above the diagonal line. Does somebody have any idea how I can
code that?
Do I have this right: you have two datasets (a and b) containing the
same variables and you want to do a symmetric grid/matrix of plots such
that variables i and j are in row i and col j for dataset a and row j
col i for dataset b?

What do you plan to put in the diagonal plots?

Do you just want to put the correlation in the plot? In that case why
not use a table? Or do you really want a scatterplot (or hexbin or some
other way of representing the joint distribution of the data), maybe
with the correlation value overlaid? Or a 'heatmap'? Or ellipses?

You need to define what you have and what you want to get out a bit more
clearly.

What have you tried? Do you have some (example) data and your code
that you could put in a reprex (reproducible example) that would be
helpful to let people play around with your problem.

You might be able to make a start with ggpairs or ggcorr from the GGally
package, or the ggcorrplot package. But your dual datasets may make it
more awkward.

Regards,
Ron.
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility

To post: email ***@googlegroups.com
To unsubscribe: email ggplot2+***@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...