Closed ZMAlt closed 1 month ago
That is because -l
is an option available only in GMT's modern mode, whilest label
is the attempt to reproduce l
in classic mode. That is, they are different options trying to achieve the same result.
gmtbegin("test2.pdf")
plot([2 2], J = "X3c", S = "c2p", R = "1/5/1/5", B = "af", l = "pos")
gmtend()
The code above does produce a legend. However, the warning remains.
I think the warning should be removed, or make l
and label
acceptable in any mode.
Checking the code, l
or label
were intended to work in both modes but it was not fully working. Hopefully it is now in master.
At the moment, It‘s still not fully working in master as follows.
There is a legend with either l
or label
in classic mode. The warning remains for l
.
julia> plot([2 2], J = "X3c", S = "c2p", R = "1/5/1/5", B = "af", l = "pos", savefig = "test.png")
Warning: the following options were not consumed in psxy => [:l]
julia> plot([2 2], J = "X3c", S = "c2p", R = "1/5/1/5", B = "af", label = "pos", savefig = "test.png")
julia>
In modern mode, there is no legend with label
julia> gmtbegin("test.png")
julia> plot([2 2], J = "X3c", S = "c2p", R = "1/5/1/5", B = "af", l = "pos")
julia> gmtend()
julia> gmtbegin("test.png")
julia> plot([2 2], J = "X3c", S = "c2p", R = "1/5/1/5", B = "af", label = "pos")
Warning: the following options were not consumed in plot => [:label]
julia> gmtend()
julia>
l
label
Will look again when finished another issue I'm working in.
I have fixed some of those cases, but not the last. l
is an alias to legend
, not to label
.
I see. I think it works well. Time to close this. Thank you.