This question already has an answer here:

I'm trying to create a plot similar to this, where histogram bins are plotted along each axis of some randomly distributed data from a csv-file:

example plot

Ideally, the histogram bars would be mirrored along the their main axis, so that unlike in this example, the histogram orgin is on the axis. How can this or something similar be done in pgfplots?

marked as duplicate by Tom Bombadil, Svend Tveskæg, user13907, Werner, Mensch Oct 29 '15 at 19:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Your question seems to be a duplicate of this thread: Scatterplot with marginal histograms using pgfplots

And you can do this in R easily, this thread gives two ways of doing it: https://stackoverflow.com/questions/8545035/scatterplot-with-marginal-histograms-in-ggplot2

  • Yes, the pgfplot solution looks promsing. Thanks for the quick answer. Apparently I did not have the right keywords to find it myself – Mikke Oct 29 '15 at 16:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.