-
Notifications
You must be signed in to change notification settings - Fork 225
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
Convenient methods to plot horizontal and vertical lines #670
Comments
Is there any way to get |
I think this function is what you need: Line 1374 in 6bad810
|
Thanks! I assume you're talking about extract_region()? |
Yes. |
Are you still working on that issue @willschlitzer? If not and if it's ok for you I would like to continue with that 😉 |
@michaelgrund Haven't made any progress lately; by all means have a stab at it! |
As discussed in #670 here's a new module (**hlines**) to plot a single or a set of horizontal lines with only defining the desired y-value(s). For discussion I only add the module for horizontal lines at the moment, however, the adjustments to prepare the same for vertical lines is done very quickly.
Just two quick questions:
|
I think we should put them in
Do you mean |
Hello! Thank you for the continued communication with our team (@cklima616 @munzekm @noorbuchi and I) as we decide where to go next in our class. I would just like to inquire about the availability of this issue? It seems very interesting and we would consider working on it if it is available still. Thanks again, we really do appreciate the cooperation. |
Hey @nathandloria, I'm currently working on this in #923, so maybe you can find another interesting topic or issue like #549 (Add tutorial for plotting datetime inputs) as suggested by @weiji14 ? |
@michaelgrund, are you planning to add vlines after #923? If so, I'll remove the help-wanted label. |
@daroari is going to work on the vlines function to complement @michaelgrund's hlines function in pull request #923 |
A gallery example was added in #3755. Closing. |
Description of the desired feature
matplotlib provides two methods, hlines and vlines, for plotting horizontal and vertical lines.
In PyGMT, we can plot any lines using the
plot()
method. However, for plotting horizontal and vertical lines, we have to prepare the input x and y arrays, which is not elegant.Expected syntax:
An expected
hlines
example:Expected output:
![image](https://user-images.githubusercontent.com/3974108/97088604-fa975e80-15ff-11eb-9205-a16dedee8150.png)
The above script is equivalent to the following script:
Are you willing to help implement and maintain this feature? Yes
The text was updated successfully, but these errors were encountered: