How can I draw multiple histograms inside a x-y plot?

2 views (last 30 days)
Hello, how can I place tilted histograms at pre-defined positions in a "normal" xy-plot? Please see the bottom plot in the attached picture to better understand what I want to display.
Nevertheless, let me also explain in words, what I have statistical data from many samples (e.g. time and location vectors for multiple particles). (top plot in attached picture). I would like to present the data in histograms, showing the distribution / probability of location for different time clusters. In my opinion, this could be best displayed by rotated histograms at the x / y positions in the plot (lower plot in attachment).
I know how to create histograms of data inside predefined boundaries (i.e. the four separate histograms in the attached picture), but how can I rotate them and place them specific locations in the xy-plot, correctly aligned with the histogram bars to the values on the y-axis?
Best regards and thank you ahead for helpful advice, Dan
  3 Comments
dpb
dpb on 7 Sep 2018
[DH Answer moved to Comment...DB]
Updated original post, included attachment
dpb
dpb on 7 Sep 2018
Not implemented in ML...you'd have to scale/position individual axes onto a figure in the correct locations to plot into with histogram
Alternative would be to use discretize or histc to just compute the statistics and then create the bars via patch where needed.
Either way, it's going to be a fair amount of effort.
Might look to see if there's any chance somebody has done something similar on FEX, or if this is a form common in your field, maybe google can uncover another person who's already done it for you...

Sign in to comment.

Answers (0)

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!