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

Figure.shift_origin: Revert back to the original plotting origin using a context manager #2509

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

seisman
Copy link
Member

@seisman seisman commented Apr 21, 2023

Description of proposed changes

New syntax:

# permanently shift the plotting origin
Figure.shift_origin(xshift="1c")  

# temporarily shift the plotting origin
with Figure.shift_origin(xshift="1c"):
    ...
    ...

Address #2401

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.
  • Use underscores (not hyphens) in names of Python files and directories.

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

@seisman seisman added the enhancement Improving an existing feature label Apr 21, 2023
@seisman seisman added this to the 0.10.0 milestone Apr 21, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 21, 2023

Summary of changed images

This is an auto-generated report of images that have changed on the DVC remote

Status Path
renamed pygmt/tests/baseline/test_figure_shift_origin.png -> pygmt/tests/baseline/test_shift_origin.png

Image diff(s)

Added images

Modified images

Path Old New

Report last updated at commit eab6adc

pygmt/src/shift_origin.py Outdated Show resolved Hide resolved
pygmt/src/shift_origin.py Outdated Show resolved Hide resolved
pygmt/src/shift_origin.py Outdated Show resolved Hide resolved
pygmt/src/shift_origin.py Outdated Show resolved Hide resolved
pygmt/src/shift_origin.py Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

Summary of changed images

This is an auto-generated report of images that have changed on the DVC remote

Status Path
renamed pygmt/tests/baseline/test_figure_shift_origin.png -> pygmt/tests/baseline/test_shift_origin.png

Image diff(s)

Added images

Modified images

Path Old New

Report last updated at commit 9f4ca3e

@seisman seisman modified the milestones: 0.10.0, 0.11.0 Sep 1, 2023
@seisman seisman modified the milestones: 0.11.0, 0.12.0 Dec 11, 2023
@seisman seisman removed this from the 0.12.0 milestone Feb 26, 2024
@seisman seisman self-assigned this Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants