how to make stacked bar graph readable in white and black only - matlab

I have a stacked bar graph to include in my paper, which is going to be printed by reviewers in black and white only. When I print it out, I cannot tell the difference between some parts of it, which would otherwise be clearly distinguishable in color. Is there any way to make it readable even in black and white? Thanks in advance.

Have a look at the function presented in this File Exchange Pick of the Week to create hatched patterns instead of (or in addition to) your colors.
Here's one example:
Here's one example of how to use applyhatch_pluscolor:
figure, bar(rand(3,4)
[im_hatch,colorlist] = applyhatch_pluscolor(1,'|-.x',1,[1 0 1 1]);

Related

How to remove darkness of a mass of bars in a matlab figure?

I made a diagram which includes 500 bars in a matlab figure. The color of bars are blue but due to the large number, some of them are seen compact and black. I used this code for removing the borders of bars:
g=bar(...)
g.EdgeColor = 'none';
But still the diagram is same whith the dark parts. Can any one help me to make these black bars as blue?
g.EdgeColor = 'none' works on my computer.
It may be a refreshing problem, did you try :
refresh
or an alternative
g.EdgeAlpha = 0
If either of those don't work, please post a minimal working example, because you may have a problem elsewhere in your code.

matlab: bar, how to change the edge color?

I am having trouble to change the bar color, I want it to be white in the middle, and red at the edge. Looking at matlab's description
if I do:
bar(y,'FaceColor','w','EdgeColor','r','LineWidth',1)
It should give me the above. However, when I actually run it, it only give me white graph.
Update: my y is:
y=zeros(1,5000); y(3000)=1; y(4000)=1;
Using the above, I got....
With so many bars, Matlab probably has trouble differentiating edge ('EdgeColor') and fill ('FaceColor') of each. After all, each complete bar is less than a screen pixel.
I suggest you use white edge and colored fill. That works for me. It's as if 'FaceColor' had precedence over 'EdgeColor'.
bar(y,'FaceColor','r','EdgeColor','w','LineWidth',1)
Or better yet: replace each bar by a line, that is, use stem:
stem(y,'r','marker','none')

Matlab Increase thickness of lines of 3d bars

I have a 3D bar chart. Let me clarify, I do not want to edit the width of the bar graph as I have already done that. However, there are black lines that outline each bar. Is there a way to make these thicker?
Everything I have search pays reference to the width of the bars themselves, not the black lines enclosing them.
At last, I found the answer to my own question the minute after I ask it.
Simply:
set(j,'LineWidth',1.5)
EDIT: As Luis mentioned, j is the handle such that j = bar3(...)
Sorry should have included that.

Change bar chart column structure

I change the column color in the bar chart but the problem that when i print the paper in black and white all columns look the same, so I am wondering if there is any way to change the column shape from inside (like cross or circles) so i can differentiate between columns in black and white ?
Thanks a lot
You may want to try, amongst others, this matlab exchange entry called Hatch fill patterns plus Color & Invert.

How to change the histogram colour in Matlab

So i'm awful at Matlab and I mainly learn through examples and literally spelt out explanations.
So baring that in mind - Right now i'm trying to find how likely it is that one image i'm given is in anther via a histogram.
What i want to do is create 3 histograms for red, blue & green for each image and then add those into one image - So basically i'll have an image with a literal green histogram showing the green, a red one showing the red and a blue one showing the blue.
I know that to show a colour chanel in matlab i have to do imhist(image(:,:,1/2/3)
however that still gives me a histogram in blue.
I've looked up some things that are meant to help with this issue but it's normally aimed toward someone who knows what they're doing.... not helpful.
I've heard peope saying something like get(get(gca,'child')) which just seems giberish to me.
SO - for what i'm trying to do, image detection via histrograms, is this an appropriate method? And if so HOW do i create my 1 histogram that shows all 3 histograms in their respective colour
Cheers
You could use this version of imhist:
[counts,x] = imhist(...)
And then draw your histograms yourself, via bar, stem or similar.
These functions are then fully customizable and you can plug in your favourite color, linestyle, etc.