Skip to content

Commit

Permalink
plotTDF should be a polar plot
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfHielscher committed Nov 7, 2024
1 parent 8a15c1a commit 82f6c3a
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions tools/misc_tools/plotTDF.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
% linestyle -
%

[mtexFig,isNew] = newMtexFigure(varargin{:});

p1 = polar(bc,pd,'parent',mtexFig.gca);
p1 = polarplot(bc,pd);
% set linewidth
p1.LineWidth = get_option(varargin,'linewidth',2);
% set linecolor
Expand All @@ -30,34 +28,10 @@
% fix FontSize
txA = findall(gca,'type','text');
for k=1:length(txA)
txA(k).FontSize=getMTEXpref('FontSize')-4;
txA(k).FontSize = getMTEXpref('FontSize')-4;
end

if check_option(varargin,'nogrid')
% find all of the lines in the polar plot
h = findall(gcf,'type','line');
for k=1:length(h)
id_del(k) = ~strcmp(h(k).Tag,'doNotDelete');
% delete all other lines excet our plot
end
delete(h(id_del));
end

if check_option(varargin,'nolabels')
% find and remove the radial text labels in the polar plot
tx=findall(gcf,'type','text');
for k=1:length(tx)
id_delt(k) = strcmp(tx(k).HorizontalAlignment,'left');
end
delete(tx(id_delt));
end

% although it's inside an mtexFigure we need to set plotting conventions
mtexFig.setCamera('xAxisDirection',getMTEXpref('xAxisDirection'));
mtexFig.setCamera('zAxisDirection',getMTEXpref('zAxisDirection'));

%
if isNew, mtexFig.drawNow(varargin{:});end
%
%
end

0 comments on commit 82f6c3a

Please sign in to comment.