mtex icon indicating copy to clipboard operation
mtex copied to clipboard

why is plottingConvention a handle class?

Open vtvivian opened this issue 1 year ago • 0 comments

What do you want to do? Load EBSD data with different plotting conventions

What data do you have? EBSD maps from multiple SEMs and manufacturers

What code do you use? Please provide minimalist code with code in the following form

% load the data
ebsd1 = EBSD.load('file1.txt');
ebsd1.plottingConvention.east = -xvector;
ebsd1.plottingConvention.outOfScreen = zvector;

ebsd2 = EBSD.load('file2.txt');
ebsd2.plottingConvention.north= vector3d.X;
ebsd2.plottingConvention.outOfScreen=vector3d.Z;

What result do you get when I set the plotting convention for ebsd2, ebsd1 changes as well, because plottingConvention is defined as a handle class

ebsd1.plottingConvention

ans = plottingConvention
 
  outOfScreen: (0,0,1) 
  north      : (1,0,0) 
  east       : (0,-1,0)

ebsd2.plottingConvention

ans = plottingConvention
 
  outOfScreen: (0,0,1) 
  north      : (1,0,0) 
  east       : (0,-1,0)

What result do you expect ebsd1 and ebsd2 are independent objects and should store their plotting conventions independently

ebsd1.plottingConvention

ans = plottingConvention
 
  outOfScreen: (0,0,1) 
  north      : (0,-1,0)
  east       : (-1,0,0)

ebsd2.plottingConvention

ans = plottingConvention
 
  outOfScreen: (0,0,1) 
  north      : (1,0,0) 
  east       : (0,-1,0)

What MTEX version do you use? 6.0.beta2

vtvivian avatar Jan 24 '24 15:01 vtvivian