Get coordinates from the contour in matplotlib?

后端 未结 1 1049
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-29 14:13

Background

From the documentation example here, one can easily produce the following contour plot with the code snippet.

import matplotlib
import num         


        
1条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-29 14:42

    You can get the coordinates of the contours from the CS.allsegs list.

    Try:

    dat0= CS.allsegs[0][0]
    plt.plot(dat0[:,0],dat0[:,1])
    

    to plot the first (-1) contour level.

    0 讨论(0)
提交回复
热议问题