I have three vectors m1, v1, and v2 all of equal length. Vector m1 has values in range [1000,10000] whereas v1 and v2 have values in range [1,2]. I want to plot a bar graph with all three vectors, but I want vectors v1 and v2 to use a smaller y-axis scale than m1. I have found multiple sources (e.g. Matlab bar plot grouped but in different y scales) that recommend the following function for doing this with two vectors (m1, and v1)
plotyy(xrange-offset, m1, xrange+offset, v1, 'bar','bar')
However, I have not been able to figure out how to add v2 to this plot with the same scale as v1. Is there any way to do this in MATLAB?