Happy New Years Eve everyone!
I hope someone can help me with my problem:
I have some winddata, which I want to display in an histogram with a weibull distribution. I'm using the winddata to evaluate different locations for a windturbine. The windturbine generates electriciy when windspeed is more than 5 m/s. I would like to change the barcolor for windspeed smaller than 5 m/s so that it's easy to see which windspeeds are relevant for the windturbine.
My code so far:
function Weibulldistribution(windspeed)weibulldata = windspeed;weibulldata(weibulldata==0) = 0.000001;figureh=histfit(weibulldata ,25, 'weibull');xlim([0 25]);xticks(0:5:25);xlabel ('windspeed in m/s');ylabel ('Distribution in %');yt = get(gca, 'YTick');set (gca, 'YTickLabel', [num2str(round((yt'/numel(weibulldata))*100)), repmat(' %', length(yt),1)])h(1).FaceColor = [0.38 0.6 0];h(2).Color = [.2 .2 .2];title('Weibulldistribution of Windspeed', 'FontSize',20);end
How I'd like to color the bars:
I'm looking forward to your ideas!
Best Answer