oM = ipdfHSVOrientationMapping(ebsd('Ti-Hex'))
color = oM.orientation2color(ebsd('Ti-Hex').orientations);
odf = calcODF(ebsd('Ti-Hex').orientations)h = [Miller(0,0,0,1,odf.CS),Miller(1,0,-1,0,odf.CS),Miller(-2,1,1,0,odf.CS)];
plotPDF(ebsd('Ti-Hex').orientations,h,'antipodal', ... 'property',color,'points',10,'MarkerSize',15,'grid','grid_res',15*degree,'complete')
plot(oM)
hold on
plotIPDF(ebsd('Ti-Hex').orientations,[zvector],'antipodal','property',color,'points',20)
plotPDF(ebsd('Ti-Hex').orientations,h(1),'antipodal', ... 'property',color,'all','points',10,'MarkerSize',15,'grid','grid_res',15*degree,'complete')%can also specify 'all' to plot all points
I am trying to specify the number of points and plot the corect coloring as can be seen from the second pole plot above.
I noticed that in the code for plotPDF(o,h,varargin) there is a comment: "% colorcoding 1 TODO this should be done differently" above the code:
data = get_option(varargin,'property',[]);
% ------------------ subsample if needed --------------------------if ~check_option(varargin,{'all','contour','contourf','smooth'}) && ... (sum(length(o))*length(o.CS)*length(o.SS) > 10000 || check_option(varargin,'points'))
points = fix(get_option(varargin,'points',10000/length(o.CS)/length(o.SS)));% disp([' I''m plotting ', int2str(points) ,' random orientations out of ', int2str(length(o)),' given orientations']);% disp(' You can specify the the number points by the option "points".'); % disp(' The option "all" ensures that all data are plotted'); samples = discretesample(length(o),points); o= o.subSet(samples); if ~isempty(data) data = data(samples); endend
I am wondering if the fault lies with me or with the above code.
Any help on this mater would be very much appreciated.
Gerrit
plotPDF(ebsd('Ti-Hex').orientations,color,h)
plotPDF(ebsd('Ti-Hex').orientations,color,h,'points',10)
plotPDF(ebsd('Ti-Hex').orientations,color,h,'points',10)