pcolormesh with missing values?

前端 未结 3 994
[愿得一人]
[愿得一人] 2020-12-05 11:04

I have 3 1-D ndarrays: x, y, z

and the following code:

import numpy as np
import matplotlib.pyplot as plt
import scipy.interpolate as spinterp

## de         


        
3条回答
  •  情话喂你
    2020-12-05 11:35

    Note that the explicit masking is no longer necessary in matplotlib master as arrays are now masked automatically internally. Will be incorporated into matplotlib >2.1. See my merged pull request https://github.com/matplotlib/matplotlib/pull/5451

    So now it's as simple as

    plt.pcolormesh(X,Y,Z.T)
    

提交回复
热议问题