Hello! I’m currently plotting some focal mechanisms on a map, and they all fall within a relatively small magnitude range so just the size of the focal mechanism scaling by magnitude isn’t quite as distinctive as I’d like. I want to change the compressive fill color of each focal mechanism by magnitude. However, I’m using a PSMECA file from SPUD and convention = ‘mt’ to plot the focal mechanisms, and it seems from the documentation (and my screwing around) that using the cmap command will only work to choose colors based on the depth, since that’s the third column in the PSMECA file. Is there a way to change the color by magnitude instead, or would I need to do this a different way (maybe without using the PSMECA file)?
Here are the relevant parts of my code, where I currently am coloring the focal mechanisms by depth. I have made a CPT for the magnitude range the same way as I did for the depths here (using a different file since the PSMECA format doesn’t have an explicit moment magnitude column), and would ideally like to use that as the cmap for the focal mechanisms instead of this depth one if possible.
# Use depth column from PSMECA file to make a cpt
psmeca = np.genfromtxt(psmeca_file, dtype = float)
psmeca_depths = psmeca[:,2]
pygmt.makecpt(cmap='viridis', series=[psmeca_depths.min(), psmeca_depths.max()], output = path + 'depth_cpt.cpt')
fig = pygmt.Figure()
region=[-133,-108,28,53]
fig.coast(region=region, projection='N12c', land='wheat3', water='lightcyan2', frame='afg')
fig.meca(spec = psmeca_file, convention = 'mt', scale = '0.6c', cmap = path + 'depth_cpt.cpt')
fig.show();