I am attempting to simplify the presentation of my rotation data from a plot of every single point to a connected arrow hitting every, say, tenth point.
I'm using the orientation measured along a line through a selected deformed grain. An example snippet is below:
aust_sym = crystalSymmetry('432', [4 4 4], 'mineral', 'Austenite', 'color', [0.53 0.81 0.98])
angles = [70.6491, 41.3549, 5.15433;
70.6669, 41.3756, 5.03974;
70.7769, 41.3011, 4.84436;
70.6721, 41.3515, 5.12568;
71.1963, 40.9086, 4.51548;]
ori = orientation.byEuler(angles*degree, aust_sym)
plotIPDF(ori(1), vector3d.Y, 'antipodal', 'MarkerSize', 4)
hold on;
for i = 1:4
plotIPDF(ori(i+1), vector3d.Y, 'antipodal', 'MarkerSize', 4)
hold on;
if i == 4
plotIPDF([ori(i), ori(i+1)], vector3d.Y,'arrow', 'tipAngle', 5)
hold on;
else
plotIPDF([ori(i), ori(i+1)], vector3d.Y,'arrow', 'tipAngle', 0)
hold on;
end
end
But when you run the code all of the arrows overshoot, as shown in the image below.
I was playing around in debug mode, trying to see how the arrows were drawn, and I stumbled across a fix: if one zooms in after the first point is drawn (so breakpoint at the beginning of the for loop, then zoom in on the first plotted point, then run the loop), the issue resolved. The lines draw properly.
This is where it gets stranger. When I repeated the test, I didn't zoom in quite as much and some of the arrows drew incorrectly. I tried to come up with a repeatable measurement, so I zoomed using MATLAB's figure zoom button in the top right corner of the figure:
Using that, I found that the arrows will appear to draw correctly if one clicks zoom 6x after the IPDF has been created, but before drawing any arrows. At 5x, errors will exist but will be small. At 4x, they will grow larger. So on until the no magnification case presented above. See images below. Also note that all images have been zoomed in to the same scale after all arrows were drawn for comparability.
I am attempting to simplify the presentation of my rotation data from a plot of every single point to a connected arrow hitting every, say, tenth point.
I'm using the orientation measured along a line through a selected deformed grain. An example snippet is below:
But when you run the code all of the arrows overshoot, as shown in the image below.
I was playing around in debug mode, trying to see how the arrows were drawn, and I stumbled across a fix: if one zooms in after the first point is drawn (so breakpoint at the beginning of the for loop, then zoom in on the first plotted point, then run the loop), the issue resolved. The lines draw properly.
This is where it gets stranger. When I repeated the test, I didn't zoom in quite as much and some of the arrows drew incorrectly. I tried to come up with a repeatable measurement, so I zoomed using MATLAB's figure zoom button in the top right corner of the figure:
Using that, I found that the arrows will appear to draw correctly if one clicks zoom 6x after the IPDF has been created, but before drawing any arrows. At 5x, errors will exist but will be small. At 4x, they will grow larger. So on until the no magnification case presented above. See images below. Also note that all images have been zoomed in to the same scale after all arrows were drawn for comparability.
5x:![ipdf_zoomed_5x](https://github.com/mtex-toolbox/mtex/assets/155621257/e5339414-51f3-4e6f-a707-d776a7291f64)
4x:![ipdf_zoomed_4x](https://github.com/mtex-toolbox/mtex/assets/155621257/469994e7-3467-456c-9227-8330d9fdd914)
I'm using MTEX 5.0.3.