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

Add a gallery example to show coloring of points by categories #1006

Merged
merged 39 commits into from
Mar 12, 2021

Conversation

michaelgrund
Copy link
Member

@michaelgrund michaelgrund commented Mar 4, 2021

To close the >2 year old issue #244 here's a gallery example highlighting the coloring of points by categories.

Closes #244.

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

To close the >2 year old issue #244  here's a gallery example highlighting the coloring of points by categories.
@michaelgrund
Copy link
Member Author

/format

@michaelgrund michaelgrund added the documentation Improvements or additions to documentation label Mar 4, 2021
@michaelgrund michaelgrund added this to the 0.3.1 milestone Mar 4, 2021
@michaelgrund michaelgrund linked an issue Mar 4, 2021 that may be closed by this pull request
@michaelgrund michaelgrund marked this pull request as draft March 4, 2021 17:22
examples/gallery/plot/points-categorial.py Outdated Show resolved Hide resolved
examples/gallery/plot/points-categorial.py Outdated Show resolved Hide resolved
examples/gallery/plot/points-categorial.py Outdated Show resolved Hide resolved
@michaelgrund
Copy link
Member Author

/format

examples/gallery/plot/points-categorial.py Outdated Show resolved Hide resolved
examples/gallery/plot/points-categorial.py Outdated Show resolved Hide resolved
examples/gallery/plot/points-categorial.py Outdated Show resolved Hide resolved
examples/gallery/plot/points-categorial.py Outdated Show resolved Hide resolved
examples/gallery/plot/points-categorial.py Outdated Show resolved Hide resolved
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
michaelgrund and others added 5 commits March 6, 2021 10:09
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
examples/gallery/plot/points-categorical.py Outdated Show resolved Hide resolved
examples/gallery/plot/points-categorical.py Outdated Show resolved Hide resolved
examples/gallery/plot/points-categorical.py Outdated Show resolved Hide resolved
examples/gallery/plot/points-categorical.py Outdated Show resolved Hide resolved
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
@michaelgrund
Copy link
Member Author

The PR is almost done, but we still need to wait for #995.

BTW, please rename the file name using underscores (see #1034 (comment)), i.e., rename it to examples/gallery/plot/points_categorical.py

Done!

@michaelgrund
Copy link
Member Author

michaelgrund commented Mar 11, 2021

I think this PR looks good. BTW, you could consider updating a little about 3D scatter plots later based on some revisions in this PR.

Will do that after the whole gallery reorganization is done @core-man !

Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

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

FYI, I just moved this example to the "gallery/symbols" directory.

This PR is good to me.

examples/gallery/symbols/points_categorical.py Outdated Show resolved Hide resolved
examples/gallery/symbols/points_categorical.py Outdated Show resolved Hide resolved
@seisman seisman requested review from weiji14 and core-man March 12, 2021 05:51
@seisman seisman marked this pull request as ready for review March 12, 2021 05:51
@core-man
Copy link
Member

I think this PR is great. No further comments~

@seisman seisman changed the title Provide gallery example to show coloring of points by categories Add a gallery example to show coloring of points by categories Mar 12, 2021
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
michaelgrund and others added 2 commits March 12, 2021 08:36
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

🚀

@weiji14 weiji14 merged commit a8a8781 into master Mar 12, 2021
@weiji14 weiji14 deleted the gallery-points-cat branch March 12, 2021 09:14
michaelgrund added a commit that referenced this pull request Mar 15, 2021
According to the comments and review suggestions in #1006, here's an update for the documentation of the scatter3d gallery example. It now follows the documentation of the recently deployed [Color points by categories]
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
…icMappingTools#1006)

Provide gallery example to show coloring of points by categories.
Uses the Palmer Penguins example dataset loaded into a pandas
DataFrame, with the categorical dtype column converted to int type.

Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Yao Jiayuan <coreman.seism@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coloring points by categories
5 participants