-
Notifications
You must be signed in to change notification settings - Fork 224
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 inline example for blockmean #1729
Conversation
Co-authored-by: Will Schlitzer <schlitzer90@gmail.com>
Co-authored-by: Meghan Jones <meghanj@alum.mit.edu>
/format |
I was searching how to add -C (Use the center of the block as the output location) in pygmt.blockmean command line. |
Thanks @crystalratna for trying out PyGMT and apologizes for the late response! Currently, there is no alias available for If this comment is meant as a request for adding an alias for Please see the extended line example below: # sourec: https://www.pygmt.org/dev/api/generated/pygmt.blockmean.html#pygmt.blockmean
# last acces: 2022/11/06
import pygmt
# Load a table of ship observations of bathymetry off Baja California
data = pygmt.datasets.load_sample_data(name="bathymetry")
# Calculate block mean values within 5 by 5 minute bins
data_bmean = pygmt.blockmean(
data=data,
region=[245, 255, 20, 30],
spacing="5m",
C=True, # Use the center of the block as the output location
) |
@yvonnefroehlich Thank you. I tried and it seems to work. |
Co-authored-by: Will Schlitzer <schlitzer90@gmail.com> Co-authored-by: Meghan Jones <meghanj@alum.mit.edu> Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Description of proposed changes
Addresses #1686
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version