Trying to plot 3d histogram to show profit/loss magnitude and frequency over 13 years
1 view (last 30 days)
Show older comments
I have data with 3 columns, year, event (categorised already) and profit or loss in $m for the corresponding date/event columns - please see attached text file.
What I am trying to do is plot this data to illustrate downside risk by frequency and magnitude in a histogram or two histograms, one profits and one losses if the former is not possible.
What I have tried to achieve already are 13 years of histogram frequency bars stacked up together that form a contour - frequency and loss magnitude. One graph is all positive and one all the negative values....What I would really like to see is all of the data in one histogram with colours ranging from red (losses) to blue (gains) to illustrate the magnitude of profit/loss, with a frequency bar for each year. Is this even possible with some kind of zero plane where the red bars go below in a 3d histogram?
As you can probably see I am a true novice.
I would attach my code but it's embarrassing (and wrong) as I am trying to self teach MATLAB, however I spent the whole day yesterday reading forums and researching how to do this. I just don't know a way. I have truly tried to solve this.
The data is so simple so this would be so easy for an expert MATLAB user.
Somebody please help I would forever be in your debt! Even if it's ust a kick in the right direction!
0 Comments
Answers (1)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!