Plot pole figure from matlab vectors / matrix

227 views
Skip to first unread message

Rémy Bretin

unread,
Mar 20, 2018, 5:31:17 PM3/20/18
to mtex...@googlegroups.com
Hi,

I have a matrix of euler angles on matlab such as :
EA=[ 
phi1_1 Phi_1 phi2_1;
         phi1_2 Phi_2 phi2_2;
         phi1_3 Phi_3 phi2_3;
         phi1_4 Phi_4 phi2_4];

And for each orientation, I have an associated value :
V=[V_1;
      V_2;
      V_3;
      V_4];

I would like to know first how to plot those values with a colormap on a pole figure (or inverse pole figure) and then how to reduce it to the symmetry triangle in the case of a cubic structure.

I thank you in advance,
Rémy 

ruediger Kilian

unread,
Mar 20, 2018, 5:43:21 PM3/20/18
to mtex...@googlegroups.com
Hi Remy,
just define an orientation (have a look at help orientation/orientation) - assuming you also have a crystalSymmetry (see help crystalSymmetry), define a crystal direction (have a look at help Miller) to plot pole figures using plotPDF or define a vector3d (have a look at help vector3d) to plot inverse pole figures with plotIPDF. Second argument for plotPDF or plotIPDF (help orientation/plotIPDF and help orientation/plotPDF) is interpreted as the property used for colorcoding points.

For example:
cs=crystalSymmetry('432')
o = orientation('Euler',EA*degree,cs)
plotIPDF(o,V,vector3d(1,2,3))

Hope this helps.
Cheers,
Rüdiger


> On 20 Mar 2018, at 10:31 PM, Rémy Bretin <breti...@gmail.com> wrote:
>
> Hi,
>
> I have a matrix of euler angles on matlab such as :
> EA=[ phi1_1 Phi_1 phi2_1;
> phi1_2 Phi_2 phi2_2;
> phi1_3 Phi_3 phi2_3;
> phi1_4 Phi_4 phi2_4];
>
> And for each orientation, I have an associated value :
> V=[V_1;
> V_2;
> V_3;
> V_4];
>
> I would like to know first how to plot those values with a colormap on a the pole figure (or inverse pole figure) and then how to reduce it to the symmetry triangle in the case of a cubic structure.
>
> I thank you in advance,
> Rémy
>
> --
> 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.

Rémy Bretin

unread,
Mar 20, 2018, 9:18:25 PM3/20/18
to mtex...@googlegroups.com
Thank you a lot for the fast and right answer. It works! :)

Now I have a new problem: how do I add a latex title to the colorbar? And how do I add a 90° rotation to the title too?
mtexColorbar('title','\boldmath$\Delta\varepsilon^{A^{eff}}_{B~33}$','Interpreter','latex') doesn,t work :/

Thanks again,
Rémy

Rüdiger Kilian

unread,
Mar 21, 2018, 5:02:33 AM3/21/18
to mtex...@googlegroups.com
Good Morning,
this is some sort of bug because if you use \epsilon it works.

Here's a workaround for now:

cb = mtexColorbar;
cb.Label.Interpreter ='latex'
cb.Label.String='\boldmath$\Delta\varepsilon^{A^{eff}}_{B~33}$'

Cheers,
Rüdiger


Rémy Bretin

unread,
Mar 21, 2018, 9:42:34 AM3/21/18
to MTEX
Good morning,

Thank you for the fast answer, it works as well.

Cheers,
Rémy 
Reply all
Reply to author
Forward
0 new messages