Skip to content

Specifying a colourmap on ternary plots with image=true adds a large grey square #952

@lucpaoli

Description

@lucpaoli

Sample code from

https://www.generic-mapping-tools.org/GMT.jl/stable/gallery/ternary/ternary/

# Make use of the knowledge that z ranges berween 0 and 71 (gmtinfo module is a friend)
C = makecpt(T=(0,71));
ternary("@ternary.txt", marker=:p, image=true, clockwise=true,
        frame=(annot=:auto, grid=:a, ticks=:a, alabel="Clay", blabel="Silt", clabel="Sand", suffix=" %"),
        show=true)

This produces a large grey square surrounding the ternary diagram

image

If image=false, then

# Make use of the knowledge that z ranges berween 0 and 71 (gmtinfo module is a friend)
C = makecpt(T=(0,71));
ternary("@ternary.txt", marker=:p, image=false, clockwise=true, cmap=C,
        frame=(annot=:auto, grid=:a, ticks=:a, alabel="Clay", blabel="Silt", clabel="Sand", suffix=" %"),
        show=true)

image

cmap then has to be specified for the colourmap to be applied. Note that inputting the cmap explicitly as cmap=C in the first example still produces said grey square.

If you have any advice on what may fix this, it would be much appreciated. I've tried the bg parameters specified at

https://www.generic-mapping-tools.org/GMT.jl/stable/makecpt/

but these do not seem to have helped.

Many Thanks,
Luc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions