Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in plotPDF in Mtex 5.11.2 (OK in 5.11.1) #2148

Open
Fred-Ad opened this issue May 29, 2024 · 2 comments
Open

Error in plotPDF in Mtex 5.11.2 (OK in 5.11.1) #2148

Fred-Ad opened this issue May 29, 2024 · 2 comments

Comments

@Fred-Ad
Copy link

Fred-Ad commented May 29, 2024

Hi to all,

In 5.11.2 and Matlab R2020a, there's a bug with plotPDF. Here is my code :

odf = calcDensity(ebsd('indexed').orientations,'halfwidth',10*degree);
h = [Miller(0,0,0,1,ebsd.CS),Miller(-1,1,0,0,ebsd.CS),Miller(-1,2,-1,0,ebsd.CS)];
plotPDF(odf,h,'antipodal','silent');

In 5.11.1, the PDF are well plotted

In 5.11.2 there is this error related to clim :

Unrecognized function or variable 'clim'.

Error in vector3d/smooth (line 101)
    clim(sP(j).ax,colorRange);

Error in vector3d/plot (line 103)
    [varargout{1:nargout}] = v.smooth(varargin{:});

Error in S2Fun/plot (line 40)
    [ch,cax] = plot(plotNodes,values(:,j),'pcolor','hold',varargin{:});

Error in S2FunHarmonicSym/plot (line 26)
[varargout{1:nargout}] = sF.plot@S2Fun(sR,sF.s,varargin{:});

Error in SO3Fun/plotPDF (line 62)
  [~,cax] = plot(pdf,'smooth','doNotDraw','ensureNonNeg',varargin{:});

Error in SO3FunHarmonic/plotPDF (line 37)
plotPDF@SO3Fun(SO3F.subSet(1),h,varargin{:});
@Fred-Ad
Copy link
Author

Fred-Ad commented May 29, 2024

I found it :

I replaced clim by caxis in vector3d/smooth.m.

From Matlab R2022a clim replaced caxis...

Perhaps it is possible to add a condition about Matlab version to use the good working fonction ?

@ralfHielscher
Copy link
Member

Hi Fred,
thank you for pointing this out. We will fix this issue in MTEX 5.11.3.

Ralf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants