GenericMappingTools / GenericMappingTools/GMT.jl

Lines plotted incorrectly on ternary diagrams when clockwise is specified

Open
#954 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
221
Forks
36
Avg merge
1h 36m
Merged PRs (30d)
17

Description

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

```julia
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](https://user-images.githubusercontent.com/39316550/180002622-8a5b98a4-342f-4607-9384-67254296ef92.png)

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``.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.