A grid inside a triangle?

Hi guys! How are you doing?

I recently computed the densities for some QAP diagram compositions and I would like to plot it in GMT. But here I have 3 axis and (Q A and P ranging from 0% to 100%) and the Density for each point.

Is there a way to create a gridimage of something like this?

EpzSY

Hi Mariano. Not directly, but you could convert your a,b,c,z points to normalized x,y,z data via gmt ternary -M, make a grid of those (0/1/0/sqrt(3)*.5 and plot it after setting a triangular clip path.

Hi Paul!
Great. Let me give it a try and I’ll check back with you.

With the Julia wrapper one can now do

ternary("@ternary.txt", labels=("Clay","Silt","Sand"), image=true, marker=:p, show=true)

and more

1 Like

This is perfect Joaquim. Thanks!