MATLAB Answers


Hello, i want to display separate (side by side) bar on one graph. below is my code but its display bars on single column.

Asked by khalil ur Rehman on 6 Jan 2019
Latest activity Commented on by khalil ur Rehman on 6 Jan 2019
clear all;
hold on;
Rank_N = [15678 10987 15243 3467 1234]; % New Values After Implementation
C1 = categorical ({'Google','Bing','Alxa','Yahoo Directory','DMOZ',});
h1 = bar (C1,Rank_N,'b','barwidth',0.3);
Rank_O = [1111 3456 13456 3345 1038]; % Old Values Before Implementation
C2 = categorical ({'Google','Bing','Alxa','Yahoo Directory','DMOZ',});
h2 = bar (C2,Rank_O,'r','barwidth',0.3);
xlabel('Search Engines');
ylabel('Link Rank');
title('Site Link Rank on Different Search Engines');
legend ('New Values', 'Old Values');
legend ('Location','northeast');
legend ('boxoff');


Sign in to comment.




1 Answer

Answer by madhan ravi
on 6 Jan 2019
 Accepted Answer

I am not sure what your doing but perhaps you want to use subplot()

  1 Comment

my code display this bars i want to dipsly it side by side.rank_site.jpg

Sign in to comment.