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

Lines plotted incorrectly on ternary diagrams when clockwise is specified #954

Open
lucpaoli opened this issue Jul 20, 2022 · 1 comment

Comments

@lucpaoli
Copy link

When clocwise is specified within the call to ternary() the lines are plotted in the incorrect location

b = 0:0.01:0.3
c1 = (1 .- b).^3 .- 0.7^3
c2 = (1 .- 2*b).^2 .- 0.4^2

# Generate the coordinates of two lines.
t1 = GMT.tern2cart([(1 .- b .- c1) b c1])    # Note that GMT.jl function expects a Mx3 matrix
t2 = GMT.tern2cart([(1 .- b .- c2) b c2])

GMT.ternary(labels=("A", "B", "C"), clockwise=true)

GMT.plot!(t1, lw=2, lc=:red, ls="line& (a) &")	# line style -> fancy stuff
GMT.plot!(t2, lw=2, lc=:blue)
GMT.text!(GMT.tern2cart([0.3 0.4 0.3]), text="Umbilicus", font=18, show=true)

image

This occurs whether clockwise is specified as true or false. I suspect this is because clockwise=false appears to have an identical affect to clockwise=true.

@joa-quim
Copy link
Member

joa-quim commented Jul 20, 2022

Hmm, very tricky. The problem is that plot and text know nothing about ternary clockwise, and can never know. That will have to be a job of tern2cart

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