plotyy issue with 'bar' graph, not scaling correctly?
1 次查看(过去 30 天)
显示 更早的评论
Hello all! When I plot the data using plotyy making a bar graph with two sets of data, MATLAB plots it, but there is a distinct 2 sets of bars that can be seen (within the same binning). If you look at the example plot code given below, when I run this code, it plots the bar plot with two different bar values in order to keep the y-tick label consistent on both sides. I would like MATLAB to always keep the bar consistent, even if it means the ticks have to be different on both sides, I do not know how to do that, Please help! Here is the code:
rest = [330;
0;
3187;
0;
0;
0;
0;
0;
0;
0;
0;
17;
0];
rest_percent = [0.0934;
0;
0.9018;
0;
0;
0;
0;
0;
0;
0;
0;
0.0048;
0];
plotyy(1:13,rest_percent,1:13,rest,'bar','bar');
2 个评论
采纳的回答
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Two y-axis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!