Closed hakonanes closed 1 year ago
Sorry @hakonanes, I should have reviewed this. Can I get it sometime next week once the conflicts (also my fault) have been resolved?
No problem, sounds good! Will fix the conflicts.
By 'no problem', I mean thanks for reviewing :)
Conflicts fixed, should be ready for review!
@pc494 feel free to merge!
Great, thank you guys for having a look! Will merge once the Python 3.7 build succeeds.
Description of the change
This PR improves plotting of vector labels in the stereographic projection by:
orix.plot.format_labels(v, brackets=("", ""), use_latex=True)
accepting an array of vectors and returning an array of strings, one integer label per vector.offset=None
parameter inStereographicPlot.text()
to control offset in stereographic coordinates (X, Y). When plotting withVector3d.scatter(..., vector_labels=labels)
, this offset can be passed viatext_kwargs={"offset": (0, 0.02)}"
.This makes labeling a pole figure much easier and nicer.
We can consider "extending" the
vector_labels
inMiller.scatter()
by allowing it to beTrue
, which then automatically creates the labels and adds them accordingly with the correct brackets (hkl/uvw). The danger is that this labeling assumes integer coordinates which might not be true for all vectors. If we add this, a warning should be raised in the case where rounding introduces an error in the coordinate labels above a certain threshold.Progress of the PR
Minimal example of the bug fix or new feature
Create three sets of direct lattice vectors \<uvw> and plot them in the stereographic projection with labels and one color per family of directions
For reviewers
__init__.py
.CHANGELOG.rst
.__credits__
inorix/__init__.py
and in.zenodo.json
.