mtex-toolbox / mtex

MTEX is a free Matlab toolbox for quantitative texture analysis. Homepage:
http://mtex-toolbox.github.io/
GNU General Public License v2.0
281 stars 185 forks source link

plotSection/axisAngleSections ignores 'sections' option #206

Closed kilir closed 7 years ago

kilir commented 7 years ago

Hi Ralf, using plotSection with an odf/mdf and 'axisAngle' (default) ignores the 'sections' option.

odf=uniformODF(crystalSymmetry('3'))
plotSection(odf,'axisAngle','sections',4)

This is the case for mtex4.3.2 as well as the latest from git. Cheers, Rüdiger

kilir commented 7 years ago

Thanks a lot, works for me. Cheers, Rüdiger

DavidMainprice commented 7 years ago

I am not sure it is the same bug using latest version of MTEX 4.4.alpha.7 and MATLAB 2016a

adding directions to

plotSection(gB_Ice_Ice.misorientation,'axisAngle',[1 2 3]*degree,... 'axisAngle','projection','earea','volumeScaling',false,'antipodal','MarkerFaceColor','b','MarkerEdgeColor','b')

either via hold on plot which gives color dots plus labels

hold on % Ice reference directions % direction plot(Miller(1,1,-2,0,ebsd('Ice-Ih').CS,'uvtw'),'labeled','MarkerSize',15)

or annotate which gives black squares plus labels

% Ice reference directions % direction annotate(Miller(1,1,-2,0,ebsd('Ice-Ih').CS,'uvtw'),'labeled','MarkerSize',15)

only three out of Six directions are plotted on the misorientation sections

all the best David

Code below

%% Correlated Grain Boundary Misorientation Distribution (MDF) %** setMTEXpref('FontSize',25) close all figure % Crystallographic a-axes to East plota2east % plot section plotSection(gB_Ice_Ice.misorientation,'axisAngle',[1 2 3]degree,... 'axisAngle','projection','earea','volumeScaling',false,'antipodal','MarkerFaceColor','b','MarkerEdgeColor','b') % Ice reference directions % direction annotate(Miller(1,1,-2,0,ebsd('Ice-Ih').CS,'uvtw'),'labeled','MarkerSize',15) % direction annotate(Miller(1,0,-1,0,ebsd('Ice-Ih').CS,'uvtw'),'labeled','MarkerSize',15,'textAboveMarker') % pole {r} annotate(Miller(1,0,-1,1,ebsd('Ice-Ih').CS,'hkil'),'labeled','MarkerSize',15,'textAboveMarker') % pole {pi} annotate(Miller(1,1,-2,2,ebsd('Ice-Ih').CS,'hkil'),'labeled','MarkerSize',15) % direction <c+a> annotate(Miller(1,1,-2,3,ebsd('Ice-Ih').CS,'uvtw'),'labeled','MarkerSize',15,'textAboveMarker') % direction [c] annotate(Miller(0,0,0,1,ebsd('Ice-Ih').CS,'uvtw'),'labeled','MarkerSize',15) %mtexTitle('Correlated Grain Boundary Misorientation Distribution (MDF) - points') number_of_points = length(gB_Ice_Ice.misorientation) % Flush event queue - gives more accurate result near edges of plot drawNow(gcm,'figSize','large') set(gcf,'renderer','zBuffer') saveFigure('Ice_Correlated_misorientation_boundary_axes_annotate.png') %** %% Correlated Grain Boundary Misorientation Distribution (MDF) %** % find the grain boundaries with misorientation with % most frequent being (11-20),(01-11) and angles 60,90 degrees. setMTEXpref('FontSize',25) close all figure % Crystallographic a-axes to East plota2east % plot section plotSection(gB_Ice_Ice.misorientation,'axisAngle',[1 2 3]degree,... 'axisAngle','projection','earea','volumeScaling',false,'antipodal','MarkerFaceColor','b','MarkerEdgeColor','b') hold on % Ice reference directions % direction plot(Miller(1,1,-2,0,ebsd('Ice-Ih').CS,'uvtw'),'labeled','MarkerSize',15) hold on % direction plot(Miller(1,0,-1,0,ebsd('Ice-Ih').CS,'uvtw'),'labeled','MarkerSize',15,'textAboveMarker') hold on % pole {r} plot(Miller(1,0,-1,1,ebsd('Ice-Ih').CS,'hkil'),'labeled','MarkerSize',15,'textAboveMarker') hold on % pole {pi} plot(Miller(1,1,-2,2,ebsd('Ice-Ih').CS,'hkil'),'labeled','MarkerSize',15) hold on % direction <c+a> plot(Miller(1,1,-2,3,ebsd('Ice-Ih').CS,'uvtw'),'labeled','MarkerSize',15,'textAboveMarker') hold on % direction [c] plot(Miller(0,0,0,1,ebsd('Ice-Ih').CS,'uvtw'),'labeled','MarkerSize',15) hold off %mtexTitle('Correlated Grain Boundary Misorientation Distribution (MDF) - points') number_of_points = length(gB_Ice_Ice.misorientation) % Flush event queue - gives more accurate result near edges of plot drawNow(gcm,'figSize','large') set(gcf,'renderer','zBuffer') saveFigure('Ice_Correlated_misorientation_boundary_axes_plot.png')

kilir commented 7 years ago

Hi David, so you want 3 sections but all 6 Millers to be annotated. Does something like that do what you want?

plotSection(mori,'axisAngle',[1 2 3]*degree,'volumeScaling',false,'antipodal')
% Ice reference directions
% direction
m=[Miller(1,1,-2,0,cs,'uvtw'),...
    Miller(1,0,-1,0,cs,'uvtw'),...
    Miller(1,1,-2,3,cs,'uvtw'),...
    Miller(0,0,0,1,cs,'uvtw')]

m2= [ Miller(1,0,-1,1,cs,'hkil'),...
    Miller(1,1,-2,2,cs,'hkil')]
annotate(symmetrise([m]),'labeled','MarkerSize',15,'antipodal')
annotate(symmetrise([m2]),'labeled','MarkerSize',15,'antipodal')

Cheers, Rüdiger

DavidMainprice commented 7 years ago

Dear Ralf, As you introduced % Crystallographic a-axes to East plota2east This is now a = a1 [2–1-10] where as before was a = a2 [-12–10] and fundamental region is different

Thanks for your suggestion Rüdiger

all the best David