Colorplot that distinguishes between positive and negative values

前端 未结 2 1844
鱼传尺愫
鱼传尺愫 2021-01-12 09:25

As one can see in this sample code since 0 is somewhere in the spectrum it is hard to trace which points are negative and which are positive. Although my real plot is more c

2条回答
  •  礼貌的吻别
    2021-01-12 09:43

    there is a lot of good example material on simple self-defined segmented color bars on the matplotlib documentation pages

    for instance

    http://matplotlib.org/examples/api/colorbar_only.html http://matplotlib.org/examples/pylab_examples/contourf_demo.html

    EDIT:

    from what I understand, this might be the perfect example for what you are looking for:

    http://matplotlib.org/examples/pylab_examples/custom_cmap.html

提交回复
热议问题