How to plot density of binary data
Mostra commenti meno recenti
I'm trying to plot either a 3D histogram, or a 2D plot with density (i.e. frequency) represented by color.
I used the hist3 command to create a density/frequency matrix (size 64x75). This matrix is created using the command: "cnt=hist3(X, [64 75])" and is calculated from raw data. My problem now is that I've created 70 matrices, representing the individual data from 70 research participants. I've averaged the density matrices across all participants, so I now have a 64x75 "average density matrix" that I need to plot. I've tried using the surf command, but I don't want a surface plot. I need bars to represent the information.
Is there a way to create either a 3D histogram, or a 2D plot with density represented by color, using the "average density matrix" that I have created? I've attached the average density matrix I'm trying to graph.
Thank you.
1 Commento
dpb
il 28 Feb 2014
Wouldn't that be bar3?
Risposte (2)
Image Analyst
il 28 Feb 2014
0 voti
Why not just display as a color image? Does it absolutely have to be a 2.5D perspective rendering of rising square bars (like a bird's eye view of downtown)?
4 Commenti
Ryan
il 3 Mar 2014
Image Analyst
il 3 Mar 2014
So use bar3 like the two others suggested. Any problem with that? Is that too much like the surface plot that you created with surf() that you said you didn't like? If so, then we are really puzzled as to what you want. Can you post an example of some kind of visualization that IS like what you want?
Ryan
il 3 Mar 2014
dpb
il 3 Mar 2014
So can't you just change the 0-value locations to have white color?
Youssef Khmou
il 1 Mar 2014
Ryan, as you need an alternative to two dimensional graphic like @image analyst proposed, you can use bar3 command, here is an example :
bar(magic(15))
1 Commento
Ryan
il 3 Mar 2014
Categorie
Scopri di più su Data Distribution Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!