-
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
Fill positive areas in ploting (add GMT wiggle module) #1114
Comments
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct. |
It's not included in PyGMT yet but your request sounds similar to GMT's wiggle module. Can you take a look at the documentation for wiggle and let us know if this suites your request? If so, we can convert this into a feature request for a wiggle method in PyGMT. Here's the output from an example in the GMT docs: |
Hi Meghan, |
Hi Zhendong, |
Hi Meghan, |
@zhen-dong-zhang you could still use wiggle in PyGMT even though we have wrapped it. See an example below modified from Examples GMT command line:
PyGMT import pygmt
from pygmt.clib import Session
import numpy as np
# Create (x, y, z) which is equal to the gmt math above
x = np.arange(-8, 7, 0.1)
y = np.zeros(x.size)
z = 50 * np.exp(-(x/3)**2) * np.cos(2*np.pi*x)
fig = pygmt.Figure()
fig.basemap(region=[-10, 10, -1, 1], projection="X15c", frame=["WSne", "xa2f1", "ya0.5"])
with pygmt.helpers.GMTTempFile() as temp_file:
np.savetxt(temp_file.name, np.column_stack((x, y, z)))
with Session() as session:
session.call_module("wiggle", "{} -Z10c -DjRM+w100+lnT -T0.5p -Gred+p+n -W0.5p".format(temp_file.name))
fig.show() BTW, I am going to wrap |
Hi,
I'm new to pygmt and wondering how to fill the positive areas in plotting?
Please find the figure below for more information:
Thanks for your attention.
Best Regards,
Zhendong
The text was updated successfully, but these errors were encountered: