Skip to content

Adding a xmap.plot("color") method #622

@argerlt

Description

@argerlt

I think the Phase class should have some sort of method for creating colormaps within the class.

currently, we do this (just like MTEX does)

import orix.data as oda
import orix.plot as opl
import orix.vector as ove

xmap = oda.sdss_ferrite_austenite(allow_download=True)
ckey_m3m = opl.IPFColorKeyTSL(
    xmap.phases["austenite"].point_group, direction=ove.Vector3d.zvector()
)
rgb_au = ckey_m3m.orientation2color(xmap["austenite"].orientations)
rgb_fe = ckey_m3m.orientation2color(xmap["ferrite"].orientations)
xmap['ferrite'].plot(rgb_fe)

Which works well enough, but being able to just directly do

xmap = oda.sdss_ferrite_austenite(allow_download=True)
xmap.plot('tsl')

would (I think) be better.

Open question on if it should be an addition to Phase, or a function in orix.plot.CrystalMapPlot. Former seems more useful, since it can be used for simplifying IPF plots as well, but the latter is maybe better from a "dividing up modules" point of view.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions