Issue with function "annotate", when annotating a pole figure within a GUI #2102
Unanswered
RellieGoddard
asked this question in
Ask Anything
Replies: 1 comment
-
You may want to change the function function annotate(obj,varargin)
% annotate to a existing figure
aS = getMTEXpref('annotationStyle');
plot(obj,aS{:},'add2all',varargin{:});
pause(0.01);
if ~isempty(gcm), drawNow(gcm); end
end |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently working on a GUI to simplify the application of a method my co-authors and I have developed. As part of the process I identify the n most common maxima in the c-axes of a collection of grains:
Where app.SF_1pg_001 is a spherical density function of the c-axis orientations (app.vec0001), and app.NooforientationsEditField.Value, is the number of maxima you want to select. I want to then plot the points using "annotate" on a pole figure, which is allocated/plotted in app.UIAxes. The code, which works when coding in Matlab normally, is as follows:
However, in the app I get the following error after only the first point is plotted:
When I explore the issue it appears that gcm is empty when trying to use annotate in the app, but contains the figure information when plotting in Matlab normally:
When using Matlab normally:
I've tried to set gcm to be app.UIAxes, but that doesn't fix the problem, and the data in gcm appears very differently, like so:
Please let me know if anything needs clarification. I should mention the data I am trying to plot on the pole figure are vectors, with x/y/z co-ordinates, hence plotPDF does not work.
I would appreciate any advice the community has, as I don't see many options in the help section of MTEX. If there are other, better, functions that annotate I'm happy to change!
Beta Was this translation helpful? Give feedback.
All reactions