Skip to content
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

Reversed direction in GMTgrid, v0.15.0 #345

Closed
hydrocoast opened this issue Feb 29, 2020 · 2 comments
Closed

Reversed direction in GMTgrid, v0.15.0 #345

hydrocoast opened this issue Feb 29, 2020 · 2 comments

Comments

@hydrocoast
Copy link
Contributor

Hi,

I found that functions that create GMT.GMTgrid (e.g. surface) of v0.15.0 show different illustration from those of v0.14.1.

For example, the following codes generate a figure:

using GMT

X = 0:100
Y = 0:50
Z = [sqrt(x^2+y^2) for y in Y, x in X]

G = surface([repeat(X,inner=(51,1)) repeat(Y,outer=(101,1)) vec(Z)], I=1, R="0/100/0/50")

cpt = makecpt(C=:rainbow, D=true, T="0/100")
grdimage(G, J="X10/5", R="0/100/0/50", C=cpt, Q=true, show=true)

Using v0.14.1, the output looks like:
v0 14 1

Using v0.15.0, the direction of the vertical axis is reversed:
v0 15 0

I think the behavior of v0.14.1 is proper, so I am looking for what part of modification from v0.14.1 to v0.15.0 causes the difference.

The environment is as follows:
OS: Ubuntu 18.04 LTS
Julia version: v1.3.1
GMT version: 6.0.0

Thank you,

@joa-quim
Copy link
Member

@hydrocoast Thank you for catching this. It was a bug in the commit that replaced global by const global. Fixed and will tag a 0.16.0 soon.

And, BTW, to quick visualize a grid G you can just do imshow(G)

@hydrocoast
Copy link
Contributor Author

Thank you for the quick response and update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants