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 usage of z value in ternary dataset #2227

Merged
merged 6 commits into from
Dec 10, 2022
Merged

Add usage of z value in ternary dataset #2227

merged 6 commits into from
Dec 10, 2022

Conversation

michaelgrund
Copy link
Member

@michaelgrund michaelgrund commented Dec 5, 2022

Description of proposed changes

Just noticed that @yvonnefroehlich made an overlooked comment right before PR #2211 was merged in.

Maybe I am missing here some context.

Do I understand it correctly that this dataset should be used for the ternary gallery example in PR #2138 which is based on the corresponding GMT upstream example https://docs.generic-mapping-tools.org/dev/ternary.html#examples? In this case, the fourth column of the dataset is need for the color-coding, i.e., the fill color of the symbols, currently circles (-C orcmap=True).

This dataset seems to be taken from this MATLAB file exchange record https://de.mathworks.com/matlabcentral/fileexchange/7210-ternary-plots?s_tid=mwa_osa_a. There, the fourth column is listed as the "effective dielectric permittivity" (following the header of termain.m).

At the moment I am wondering if the column names are correct: We read 0->water, 1->air, 2->limestone. In the MATLAB file, they say 1->solid/limestone 2->water 3->gas/air (following the header of termain.m)?

I double checked this point and indeed the convention was not correct. Additonally, the z value of the table (permittivity) is used in the gallery example in PR #2138 for coloring. Also a point which we should change in upstream GMT although it's only an example dataset to show the usage of ternary plots.

#2223 needs to be merged first before adding the permittivity column to tests.

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • 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

@michaelgrund michaelgrund added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Dec 5, 2022
@michaelgrund michaelgrund added this to the 0.8.0 milestone Dec 5, 2022
@michaelgrund
Copy link
Member Author

/format

@seisman
Copy link
Member

seisman commented Dec 6, 2022

I can't access the Matlab file so can't verify it.

Also a point which we should change in upstream GMT although it's only an example dataset to show the usage of ternary plots.

Please submit an upstream fix first.

@michaelgrund
Copy link
Member Author

/format

pygmt/datasets/samples.py Outdated Show resolved Hide resolved
pygmt/tests/test_datasets_samples.py Outdated Show resolved Hide resolved
michaelgrund and others added 2 commits December 9, 2022 10:23
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
@seisman seisman added the final review call This PR requires final review and approval from a second reviewer label Dec 9, 2022
@seisman seisman merged commit a1855a2 into main Dec 10, 2022
@seisman seisman deleted the update-sample-ternary branch December 10, 2022 02:05
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Dec 10, 2022
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants