The standard way would be to exchange the arguments passed to plot:
plot(ydata, xdata) %// instead of plot(xdata, ydata)
Otherwise, you can change the view to rotate the axes:
view([90 -90]) %// instead of normal view, which is view([0 90])
source
share