Thanks.
cs = crystalSymmetry('cubic',[3.523,3.523,3.523],'mineral','Nickel')
sS = slipSystem.fcc(cs)
r = plotS2Grid(fundamentalSector(cs,'antipodal'),'resolution',0.5*degree)
% compute the Schmid factors for all slip systems and all tension directions
tau = SchmidFactor(sS.symmetrise,r);
% tau is a matrix with columns representing the Schmid factors for the
% different slip systems. Lets take the maximum rhowise
[tauMax,id] = max(abs(tau),[],2);
% vizualize the maximum Schmid factor
contourf(r,tauMax)
mtexColorbar
figurecsSF = ebsd('Iron fcc').CS;sS = slipSystem.fcc(csSF);
r = plotS2Grid(fundamentalSector(csSF,90*degree,'antipodal'),'resolution',0.5*degree);
% compute the Schmid factors for all slip systems and all tension directionstau = SchmidFactor(sS.symmetrise,r);% tau is a matrix with columns representing the Schmid factors for the% different slip systems. Lets take the maximum rhowise[tauMax,id] = max(abs(tau),[],2);
% vizualize the maximum Schmid factor
% ODF Estimation% compute optimal halfwidth from the meanorientations of grainspsi = calcKernel(grains('Iron fcc').meanOrientation);% load the orientation data into a variableo = ebsd('Iron fcc').orientations;% compute the ODF with the kernel psiodf = calcODF(o,'kernel',psi);% define the crystal symmetrycsIPF = odf.CS;
% plot contour IPFfigureplotIPDF(odf,oM.inversePoleFigureDirection,'antipodal','resolution',0.1*degree)% mtexColorMap white2blackhold onplotIPDF(grains(1).meanOrientation,oM.inversePoleFigureDirection,'points','all','MarkerSize',5,'MarkerFaceColor','k','MarkerEdgeColor','k');mtexColorbarhold on
% Inverse Schmid Factor% figure
csSF = ebsd('Iron fcc').CS;
% consider fcc slipsS = slipSystem.fcc(csSF);% and all symmetrically equivalent variantssS = sS.symmetrise;
r = plotS2Grid(fundamentalSector(csSF,90*degree,'antipodal'),'resolution',0.5*degree);% compute the Schmid factors for all slip systems and all tension directions
tau = SchmidFactor(sS,r);
% tau is a matrix with columns representing the Schmid factors for the
% different slip systems. Lets take the maximum row-wise
[tauMax,id] = max(abs(tau),[],2);% vizualize the maximum Schmid factorcontourf(r,tauMax,'xAxisDirection','south')mtexColorbar
setColorRange([0.272 0.5],'zero2white')hold off
contour(r,tauMax,'lineColor','k','contour',[0.475 0.475001], 'linestyle','-','linewidth',2,'ShowText','on')
c1=contour(r,tauMax,'lineColor','k','contour',[0.475 0.475001], 'linestyle','-','linewidth',2);
c1.ShowText='on'
'ShowText', 0.475
figure
cs = crystalSymmetry('432');
odf = unimodalODF(orientation.rand(1,cs));
plotIPDF(odf,xvector,'antipodal')
hold on
plotIPDF(discreteSample(odf,100),xvector,'antipodal','points','all','MarkerSize',5,'MarkerFaceColor','k','MarkerEdgeColor','k');
sS = slipSystem.fcc(cs);
sS = sS.symmetrise;
r = plotS2Grid(fundamentalSector(cs,90*degree,'antipodal'),'resolution',0.5*degree);
tau = SchmidFactor(sS,r);
[tauMax,id] = max(abs(tau),[],2);
mc=mtexColorbar;
mc_lim=mc.Limits(2);% get maximum of colorbar
% Specify contour levels:
contour(r,tauMax,'contour',[0.45 0.47 0.49],'lineColor','k', 'linestyle',':','linewidth',2,'ShowText','on')
% Or define a range of contour levels(e.g. from 0.3: with a 0.02 step: until 0.5)
% contour(r,tauMax,'contour',[0.3:0.02:0.5],'lineColor','k', 'linestyle',':','linewidth',2,'ShowText','on')
% Or let matlab choose the contour levels
% contour(r,tauMax,'lineColor','k', 'linestyle',':','linewidth',2,'ShowText','on')
hold off
CLim(gcm,[0 mc_lim]);% define colorbar range based on the IPF levels
The problem is that the contour command doesn't recognise
the a/ b axis direction and is labelling the contours outside the fundamental sector.
%% store old annotation style
storepfA = getMTEXpref('pfAnnotations');%%Change this when you running substrate RD and ND is different for substrate
pfAnnotations = @(varargin) text([vector3d.X,vector3d.Z],{'RD','ND'},'tag','axesLabels',varargin{:});
setMTEXpref('pfAnnotations',pfAnnotations);
%%%Set axis direction otherwise schmid contour map does not show text
setMTEXpref('xAxisDirection','east'); % or north, south,west, east
setMTEXpref('zAxisDirection','outOfPlane'); % %intoPlane, outOfPlane
contourf(r1,taur1Max,'contour',[0.0:0.05:0.5],'lineColor','k', 'linestyle',':','linewidth',1.2,'ShowText','on','FontSize',15)
mtexColorMap white
view([90 90])%It turns contour map 90 degree
hold on
plotIPDF(ea.orientations,zvector,'Miller2quat',[0 0 0 1],[0 0 0 1],'marker','o','MarkerSize',12,'MarkerFaceColor',[0.99 0.65 1],'MarkerEdgeColor','w','points',100)
annotate([Miller(0,0,0,1,cs)],'label','[0001]','color','k', 'FontSize',18,'marker','o','MarkerSize',2)
annotate([Miller(-1,1,0,0,cs)],'label','[-1100]','color','k', 'FontSize',18,'marker','o','MarkerSize',2)
annotate([Miller(-1,2,-1,0,cs)],'label','[-12-10]','color','k', 'FontSize',18,'marker','o','MarkerSize',2)