Assume that the EBSD dataset is loaded in the variable named data_ebsd and the orientation color mapping is defined using om = ipfHSVKey(data_ebsd);
Then the direction of the orientation map can be simply specified in the figure using om.inversePoleFigureDirection = zvector;
For example:
figure();
om.inversePoleFigureDirection = zvector; % Input direction - can be x or yvector
color = om.orientation2color(data_ebsd.orientations);
plot(data_ebsd,color,'micronbar','on');
The zvector here is normal to the plane and the x,y,z vectors refer to the MTeX coordinates. The relation to sample coordinates needs to be taken care by the user.