mtex-toolbox / mtex

MTEX is a free Matlab toolbox for quantitative texture analysis. Homepage:
http://mtex-toolbox.github.io/
GNU General Public License v2.0
281 stars 185 forks source link

micron bar #79

Closed kilir closed 9 years ago

kilir commented 9 years ago

Hi Ralf, on 4.1.beta6, the micronbar is back by default and setting it 'off' produces an error.

>> plot(ebsd,oM.orientation2color(ebsd.orientations),'micronbar','off')
Index exceeds matrix dimensions.

Error in mapPlot (line 62)
      mP.micronBar.visible = onOff{1+get_option(varargin,'micronbar',true)};

Error in newMapPlot (line 18)
    mP = mapPlot(ax,varargin{:});

Error in EBSD/plot (line 30)
mP = newMapPlot('scanUnit',ebsd.scanUnit,'parent',mtexFig.gca,varargin{:});
[~,mP] = plot(ebsd,oM.orientation2color(ebsd.orientations))
mP.micronBar.visible = 'off'

works. However would it be possible - or is it already possible - to set it with setMTEXpref in mtex_settings.m - instead of setting mapPlot.m line 62 to:

mP.micronBar.visible = onOff{1+get_option(varargin,'micronbar',false)};

?

All the best, Rüdiger

ralfHielscher commented 9 years ago

Hi Rüdiger,

I think showing the micronbar by default is a good idea. But introducing an MTEXpref is much better. You will find it in the next beta. For switching it off right now you can do

 plot(ebsd,oM.orientation2color(ebsd.orientations),'micronbar',false)

Matlab if quite inconsistent with this on/off or true/false. The later seems to be the newer - therefore I took this. However, in the next beta both will be working.

Ralf.

ralfHielscher commented 9 years ago

Its now in MTEX 4.1