Hi! Very nice and useful initiative. I'm implementing laser altimetry simulations in python and happen to need the GMT grdtrack function to extract elevation data from a topography basemap. Is this function already implemented in pygmt or do you plan to implement it at some point? Thanks!
Hi @steo85it, I'm using grdtrack myself and would be happy to implement it. Already have some code and will submit an issue and pull request which you're more than welcome to contribute to :)
projection="W8i". For people who are only interested in running pygmt in a notebook, the size of the image isn't too important: just as you don't specify an image size when using things like imshow, it would probably be best to set this to some default value. Perhaps a better way to specify the options would be to use something like
pygmt.clibmodule. I'm not very happy with it and I think you both probably have noticed that it has some design flaws. A priority for me for the following months is to see what could be done about it. Since that's the core of our package, it would be great to have that be pretty stable for our 0.1 release after GMT 6 is finally out. What do you think?
dahas three dimensions:
y. You should be able to use
da.squeeze()to remove the length-1 dimension
band. Then your
grdimagecommand should work since you'll have a legitimately 2D array.
xarraydocs are not great on this, so here's the docs for the equivalent
numpycommand documentation. Let me know if that helps!
xarraymay be able to handle some of the cases you use xyz2grd for, I'd recommend checking it out.
legendmodule has just been implemented today (thanks @liamtoney!) and
colorbaris just awaiting review (see GenericMappingTools/pygmt#332) before it gets merged in so hopefully soon. As for
xyz2grd, if you'd like to open an feature request on Github here we can start working on it (though I must warn you it might take a while...). Depending on your use case though, @liamtoney is right that
xarraymight have a way to do it.