Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: histogram with third dimension
Replies: 1   Last Post: Jan 22, 2013 4:17 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
matt dash

Posts: 626
Registered: 4/18/08
Re: histogram with third dimension
Posted: Jan 22, 2013 4:17 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Benjamin" wrote in message <kdm2mb$hju$1@newscl01ah.mathworks.com>...
> Hi,
>
> with the scatter3-plot, you can plot a 2 vector scatterplot where a third vector gives you the colour of each data point.
> How can i do that with a histogram? At the end of the day, i want to have a histogram where the x-axis are my values, the y-axis are the counts and i need another dimension and would like to add it similar to scatter3 with colours. So each bar would consist of stripes with colours refering to another vector of the same length of my data.
>
> Is this possible?



It's probably easiest to do this using the surf function. Use histc to calculate the y values, and then use surf to plot striped bars. Just set the z values of the surf to some constant value.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.