Clear Filters
Clear Filters

Indicating Significance on Bar Graph - Hatch vs. LineWidth Changes

2 views (last 30 days)
I am trying to create a multi-bar graph (5 regions, each with 5 scenarios) of temperature trends. Hence, the matrix is (5,5). I can create the bar graph (25 bars in all) and color each bar a different color (i.e., 1st bar in Region 1, Region 2, Region 3, Region 4, Region 5 are the same color, etc.), but I need to highlight on the plot which trends (i.e., bars) are significant at the 95% level. I have the significance values calculated and now need to translate it visually.
My intent was to do one of two things: (1) Change the LineWidth and EdgeColor of those bars with significant trends (make them thicker/bolder) or (2) make hatch marks on those bars that represent significant trends. Unfortunately, I cannot find a way to do either one. I have made an attempt to no avail on (1):
;plotTrend is a 5x5 matrix with the temperature trends by region
;(rows) and scenario (columns). I have another matrix, sigMask,
;that is also 5x5 and has 1's for the trends that are significant
;(p < 0.05) and 0s for where the trends are not.
figure(1);
bar_h = bar(plotTrend); bar_h is 1x5 - each scenario.
colormap('jet');
;Example of the LineWidth Property from one of the scenarios.
bar_child = get(bar_h(1),'Children');
tmpLineWidth = get(bar_child,'LineWidth');
tmpLineWidth is one single value - i.e., each 'scenario' has the same LineWidth. I need a way to manipulate the LineWidth of each bar individually.
As far as hatching, I cannot find a direct way to do this in MATLAB at all. But if this is an easier way than modifying the LineWidth property, then I am open to it.
If anyone can provide help on using either one of these options to modify a bar graph, it would be greatly appreciated. Thank you!

Answers (0)

Categories

Find more on Discrete Data Plots in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!