%%
It seems that when i assgn the values to the hist, the label will be out of the figure box.
Then, I debug and step into the hist.m line 75 (if isNew, mtexFig.drawNow(varargin{:});end), comment it out like
min = grains.mineralList(idList);
legend(min{:})
% if isNew, mtexFig.drawNow(varargin{:});end
if nargout == 0, clear binId; end
Then I plot again with the hist(grains,grains.equivalentRadius);, this time when I change the label and title, they are inside the figure box. It seems this line 75 fix the figure position, or sth like this..
I don't know the exact reason of this line but it seems that it create some issues for changing the label.
Just for discussion..
Hi,
Issue about: grain2d/hist https://github.com/mtex-toolbox/mtex/blob/develop/EBSDAnalysis/%40grain2d/hist.m
Background: I am trying to plot a barplot to show the distribution of grains size.
% This situation, I can change the label, title to my setting. And the label is inside the figure box.
% However, in this situation, the label is outside the figure box.
%% It seems that when i assgn the values to the hist, the label will be out of the figure box. Then, I debug and step into the hist.m line 75 (if isNew, mtexFig.drawNow(varargin{:});end), comment it out like
min = grains.mineralList(idList); legend(min{:}) % if isNew, mtexFig.drawNow(varargin{:});end if nargout == 0, clear binId; end
Then I plot again with the hist(grains,grains.equivalentRadius);, this time when I change the label and title, they are inside the figure box. It seems this line 75 fix the figure position, or sth like this..
I don't know the exact reason of this line but it seems that it create some issues for changing the label. Just for discussion..
Best,