Not sure exactly what you're trying to show, but try the following for starters--
x=x.'; y1=y1.'; y2=y2.'; % needs must have column vectors
y2pct=[(y2-yref)/yref]*100;
[hAx,hBL,hBR]=plotyy(x,[y1 nan(size(y1))], x,[nan(size(y1)) y2pct], 'bar');
set(hBL(1),'basevalue',yref)
yL=ylim(hAx(1));
ylim(hAx(1),[yref yL(2)])
legend([hBL(1) hBR(end)],'Y1','Y2Pct','location','northwest')
The above results in
The biggest "trick" with bar for two series on same x-axis is the augmentation with NaN as a placeholder so the bars aren't drawn overlaying each other but appear as if grouped...I'm guessing your definition of the percentages for the RH axis may not be what you really intended, but the point is to convert to whatever units you want plotted and plot those values instead of the raw data. To fixup the LH axes limits with a bar plot, the 'baseline' value also needs adjusting if you don't want blank space under it...to see the difference, just comment out that set command.
As always, "salt to suit"...