Pole Figure: How to change the labels and font size?

898 views
Skip to first unread message

MTEXNewbie

unread,
Aug 28, 2017, 7:14:51 AM8/28/17
to MTEX
Hi,

How can I change the text labels of the Pole Figure and change the Font size as well?

figure
h = [Miller(1,0,0,odf.CS),Miller(1,1,0,odf.CS),Miller(1,1,1,odf.CS)];
plotPDF(odf,h,'antipodal','silent')
CLim(gcm,'equal'); % set equal color range to all plots
mtexColorbar



MTEXNewbie

unread,
Aug 29, 2017, 7:03:36 AM8/29/17
to MTEX
I was hoping someone would be able to point me out how to change the labels and font size. I need to replace X & Y with RD & TD.

Filippe Ferreira

unread,
Aug 29, 2017, 7:45:17 AM8/29/17
to MTEX
Hi!
You can change the default values in the mtex_settings file:
run
edit mtex_settings
change (for me it's in line 38):
pfAnnotations = @(varargin) text([vector3d.X,vector3d.Y],{'X','Y'},...
 
'BackgroundColor','w','tag','axesLabels',varargin{:});
to:
pfAnnotations = @(varargin) text([vector3d.X,vector3d.Y],{'RD','ND'},...
'BackgroundColor','w','tag','axesLabels',varargin{:});
Run the file for the changes to take effect.

cheers,
Filippe

MTEXNewbie

unread,
Aug 29, 2017, 11:29:29 AM8/29/17
to MTEX
Hi Filippe,

Thanks for the instructions, any way to change the font size of vectors and Miller indices?

MTEXNewbie

unread,
Aug 30, 2017, 1:21:56 PM8/30/17
to MTEX
Just to update, the font size option is available on the same mtex_settings.m file.

I was wondering if there is any way we can change the labels in the MATLAB script file?

Ralf Hielscher

unread,
Aug 31, 2017, 4:08:30 AM8/31/17
to MTEX
you can do so. Simple but the code 

pfAnnotations = @(varargin) text([vector3d.X,vector3d.Y],{'X','Y'},...
 
'BackgroundColor','w','tag','axesLabels',varargin{:});


setMTEXpref
('pfAnnotations',pfAnnotations);

or something similar in your Matlab script.

Ralf.

MTEXNewbie

unread,
Aug 31, 2017, 7:36:56 AM8/31/17
to MTEX
Thanks, it worked.

I have used the below code to show the prime sign, is it right?

% set pole figure annotation
pfAnnotations = @(varargin) text([vector3d.X,vector3d.Y],{'\rm TD^{\prime}','\rm ND^{\prime}'},...
  'BackgroundColor','w','tag','axesLabels',varargin{:});
setMTEXpref('pfAnnotations',pfAnnotations);




MTEXNewbie

unread,
Aug 31, 2017, 2:51:03 PM8/31/17
to MTEX
And how to move the vector3d axis labels outside of the sphere boundary?





Ralf Hielscher

unread,
Sep 1, 2017, 4:22:31 AM9/1/17
to MTEX
I'm afraid there is no simple solution. Though I think it is possible.

Ralf.

MTEXNewbie

unread,
Sep 1, 2017, 1:28:46 PM9/1/17
to MTEX
Hi Ralf, Can this issue be addressed in the next MTEX release? I have opened an issue at Github repo.
Reply all
Reply to author
Forward
0 new messages