Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to pass c/color and s/sizes to StereographicPlot.scatter() #393

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

hakonanes
Copy link
Member

@hakonanes hakonanes commented Sep 28, 2022

Signed-off-by: Håkon Wiik Ånes hwaanes@gmail.com

Description of the change

Fixes #380.

It is only in StereographicPlot.scatter() we hard-coded in passing c and s to matplotlib.axes.Axes.scatter(), so it is only there this is handled.

See #390.

Progress of the PR

Minimal example of the bug fix or new feature

The following raised errors before, but now works

>>> from orix import vector
>>> v = vector.Vector3d([[1, 1, 1], [1, 0, 0]])
>>> v.scatter(color=["C0", "C1"])  # Equivalent to passing c=["C0", "C1"]
>>> v.scatter(sizes=[10, 20])  # Equivalent to passing s=[10, 20]

For reviewers

  • The PR title is short, concise, and will make sense 1 year later.
  • New functions are imported in corresponding __init__.py.
  • New features, API changes, and deprecations are mentioned in the unreleased
    section in CHANGELOG.rst.
  • Contributor(s) are listed correctly in __credits__ in orix/__init__.py and in
    .zenodo.json.

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes hakonanes added the bug Something isn't working label Sep 28, 2022
@hakonanes hakonanes added this to the v0.10.1 milestone Sep 28, 2022
Copy link
Collaborator

@harripj harripj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I have just one comment for consideration.

orix/plot/stereographic_plot.py Show resolved Hide resolved
@hakonanes
Copy link
Member Author

Thank you for reviewing, @harripj! I'll merge this myself once the other two referenced PRs have been approved.

@pc494 pc494 mentioned this pull request Sep 30, 2022
5 tasks
@hakonanes
Copy link
Member Author

Since #394 is already merged, I'll just merge this as well.

@hakonanes hakonanes merged commit d30a9a8 into pyxem:main Sep 30, 2022
@hakonanes hakonanes deleted the fix-380 branch September 30, 2022 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants