Plot GOS along a line?

103 views
Skip to first unread message

grandr...@gmail.com

unread,
Feb 1, 2016, 1:53:08 PM2/1/16
to MTEX
Given an EBSD map, I would like to plot GOS (grain orientation spread) along a line.  I understand how to plot any property of the ebsd workspace variable by reducing it to a line using the spatialProfile command, but how can I do this for variables in the grains information set?


Regards, Jessica

Rüdiger Kilian

unread,
Feb 1, 2016, 3:49:27 PM2/1/16
to mtex...@googlegroups.com
Hi,
if your ebsd has a grainId, you can probably do

[xy] = ginput(2)
ebsd_line=spatialProfile(ebsd,xy)
grains_on_that_line = grains(unique(ebsd_line.grainId))

Cheers,
Rüdiger


From: mtex...@googlegroups.com [mtex...@googlegroups.com] on behalf of grandr...@gmail.com [grandr...@gmail.com]
Sent: Monday, February 01, 2016 7:53 PM
To: MTEX
Subject: {MTEX} Plot GOS along a line?

Given an EBSD map, I would like to plot GOS (grain orientation spread) along a line.  I understand how to plot any property of the ebsd workspace variable by reducing it to a line using the spatialProfile command, but how can I do this for variables in the grains information set?


Regards, Jessica

--
If you want to reduce the number of emails you get through this forum login to https://groups.google.com/forum/?fromgroups=#!forum/mtexmail, click "My membership" and select "Don't send me email updates". You can still get emails on selected topics by staring them.
---
You received this message because you are subscribed to the Google Groups "MTEX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mtexmail+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/mtexmail.
For more options, visit https://groups.google.com/d/optout.

grandr...@gmail.com

unread,
Feb 1, 2016, 9:46:28 PM2/1/16
to MTEX, ruedige...@unibas.ch
Thank you for your help, that got me a little farther, but in order to plot this spatially how do I get the position of the grains (in x) in a matrix the same size?


Here's the code so far
ebsd = ebsd('indexed');
[grains,ebsd.grainId,ebsd.mis2mean] = calcGrains(ebsd,'angle',10*degree);
figure;   plot(grains,grains.GOS);

[xy] = ginput(2)
ebsd_line=spatialProfile(ebsd,xy)
grains_on_that_line = grains(unique(ebsd_line.grainId))
plot(?????,grains_on_that_line.GOS);

Can I use the x position in centroid somehow?  I tried a variety of methods but I think my syntax is wrong...

Cheers, Jessica
Reply all
Reply to author
Forward
0 new messages