Skip to content

Conversation

@weiji14
Copy link
Member

@weiji14 weiji14 commented Nov 8, 2019

Description of proposed changes

Enables users to plot a single symbol easily by just giving an x and y coordinate e.g. fig.plot(x=1.2, y=1.4) instead of having to wrap things in a list (e.g. fig.plot(x=[1.2], y=[1.4]). This makes it consistent with pygmt.Figure.text.

Fixes #

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 adding new functionality, add an example to docstrings or tutorials.

Enables users to plot a single symbol easily by just giving an x and y coordinate e.g. `fig.plot(x=1.2, y=1.4)` instead of having to wrap things in a list (e.g. `fig.plot(x=[1.2], y=[1.4])`. This makes it consistent with `pygmt.Figure.text`.
@weiji14
Copy link
Member Author

weiji14 commented Nov 8, 2019

This should address your comment at #321 (comment) @liamtoney.

Copy link
Member

@liamtoney liamtoney 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, aligns with the text() method which makes sense.

@weiji14
Copy link
Member Author

weiji14 commented Nov 8, 2019

Cool, I'll just wait to hear back from #255.



@pytest.mark.mpl_image_compare
def test_plot_symbols():
Copy link
Member

Choose a reason for hiding this comment

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

Maybe a better name for this test, test_plot_scalar_xy?

@vercel vercel bot temporarily deployed to staging November 9, 2019 01:04 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants