Closed creuzige closed 7 months ago
@ralfHielscher I patched my code with the changes in 2c37af6, but still got the same errors. I'll send the job_variable.mat file I've been working with.
>> load('job_variable.mat')
>> plotIPDF(job.parentGrains.meanOrientation,xvector,'points','all','marker','o',...
'MarkerSize',sqrt(job.parentGrains.grainSize), 'MarkerEdgeColor','k','MarkerFaceColor','k');
Array Sizes
ans =
2352 1
ans =
2352 1
ans =
49 1
Error using scatter
X, Y, and size arguments must be vectors of the same length, matrices of the same size, or a mix of vectors and matrices where the length of
the vectors matches either the number of rows or columns of the matrices.
Error in vector3d/scatter (line 163)
h(i) = optiondraw(scatter(x(:),y(:),MarkerSize(:),'parent',sP(i).hgt,...
Error in Miller/scatter (line 60)
[varargout{1:nargout}] = scatter@vector3d(m,varargin{:},m.CS);
Error in vector3d/plot (line 99)
[varargout{1:nargout}] = v.scatter(varargin{:});
Error in indexing (line 20)
[varargout{1:nargout}] = builtin('subsref',v,s);
Error in orientation/plotIPDF (line 89)
[~,cax] = h.plot(repmat(data,1,length(rSym)),'symmetrised',...
What do you want to do? I'd like to plot some EBSD data onto an IPF Scatter Plot using the square root of the grainsize for the marker size. In this data set, I have only a few orientations that I'm trying to project (and trying to visually make the point that one shouldn't trust the contour plots due to the sparse data).
What result do you get
If there 'enough' data points, I get the expected plot (similar to https://mtex-toolbox.github.io/EBSDIPFMap.html). If there are too few orientations, I get the error message below. The boundary between enough and too few seems partially dependent on the distribution, but when I have 171 orientations it worked (m3m symmetry), but 49 it failed.
Error Message
I added some display commands to vector3d/scatter,
and found
The fact that it's off by a factor of 48 on m3m symmetry made me suspicious. I think the issue is that if there a lot of gaps in the data, the x and y values sometimes get filled with nans, but the MarkerSize does not get filled in.
What MTEX version do you use? 5.11.2