You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree. I'm finishing #269 and I'll get on this. The whole low-level wrapper needs a refactor as well and some documentation. I wonder if GMT is looking for different things in the given data depending on what kind of plot it is.
I've opened up a pull request at #376 to tackle #321 (comment) and could fix this too (killing two birds with one stone), it would be a matter of casting everything in the list to a float once it is a numpy array (so that the data type is consistent). Edit: will maybe fix this another time.
The issue is caused by a GMT bug. See GenericMappingTools/gmt#3330 for the detailed bug report. The bug was already fixed in PR GenericMappingTools/gmt#3331 and the script above should work with the upcoming GMT 6.1.0 release.
I added an upstream label to this issue and keep the issue opening, as I don't think we can/should do any hacking on the PyGMT side.
Since plot() is one of the most commonly used functions, I propose that, when GMT 6.1.0 is released, we should:
release PyGMT v0.1.1 or v0.2.0, and bump the minimum required GMT version to 6.1.0
I just hit this problem when plotting some lines, it took me a while to figure out why I had strange horizontal lines (because the bug example above was plotting vertical lines)!
Turns out using x of dtype 'float32' and y of dtype 'float64' messes things up too, we should add test cases for all sorts of mixed type combinations (e.g. int32/float32, float32/float64, etc) once we start using GMT 6.1. This is how it should look like:
Activity
seisman commentedon Feb 6, 2019
I modified the code above to plot symbols instead lines:
The symbols are correctly plotted. It seems that the input passed to
plotis correct.seisman commentedon Feb 6, 2019
Using
datainstead ofxandyalso works.seisman commentedon Feb 18, 2019
@leouieda I think we should make this issue a high priority, since plot lines is the most used feature.
I tried to find the cause but failed and got totally confused how pygmt sends virtual file to gmt.
leouieda commentedon Feb 19, 2019
I agree. I'm finishing #269 and I'll get on this. The whole low-level wrapper needs a refactor as well and some documentation. I wonder if GMT is looking for different things in the given data depending on what kind of plot it is.
weiji14 commentedon Nov 8, 2019
The problem is that the object in x are floats, and those in y are integers. I.e. this works:
I've opened up a pull request at #376 to tackle #321 (comment) and could fix this too (killing two birds with one stone), it would be a matter of casting everything in the list to a float once it is a numpy array (so that the data type is consistent).Edit: will maybe fix this another time.seisman commentedon May 14, 2020
The issue is caused by a GMT bug. See GenericMappingTools/gmt#3330 for the detailed bug report. The bug was already fixed in PR GenericMappingTools/gmt#3331 and the script above should work with the upcoming GMT 6.1.0 release.
I added an upstream label to this issue and keep the issue opening, as I don't think we can/should do any hacking on the PyGMT side.
Since plot() is one of the most commonly used functions, I propose that, when GMT 6.1.0 is released, we should:
weiji14 commentedon Jun 18, 2020
I just hit this problem when plotting some lines, it took me a while to figure out why I had strange horizontal lines (because the bug example above was plotting vertical lines)!
Turns out using x of dtype 'float32' and y of dtype 'float64' messes things up too, we should add test cases for all sorts of mixed type combinations (e.g. int32/float32, float32/float64, etc) once we start using GMT 6.1. This is how it should look like: