Is it possible to plot bars with filled pattern in Matlab

Viewed 3556

enter image description here

Is it possible to plot bars with filled pattern in Matlab, like this figure?

I attempted to use applyhatch_pluscolor link however, I couldn't make it work (attempt below). Is there an easy / feasible alternative?


Test code:

bar(rand(3,4));
[im_hatch,colorlist] = applyhatch_pluscolor(gcf,'\-x.',1,[],[],150);

enter image description here

Then I changed the source code, from bits = hardcopy(h,'-dzbuffer',['-r' num2str(dpi)]); to bits = print(h,'-RGBImage',['-r' num2str(dpi)]);.

I got the figure below. However, this is still far away form the desired result.

enter image description here

0 Answers
Related