zoukankan      html  css  js  c++  java
  • plt.contour 与 plt.contourf

    contour:轮廓,等高线。

    • 为等高线上注明等高线的含义:

      cs = plt.contour(x, y, z)
      plt.clabel(cs, inline=1, fontsize=10)
    • plt.contourf 与 plt.contour 区别:

      • f:filled,也即对等高线间的填充区域进行填充(使用不同的颜色);
      • contourf:将不会再绘制等高线(显然不同的颜色分界就表示等高线本身),
    • 增加 colorbar;

      cb = plt.colorbar()
      cb.set_label('meters')

      默认 colorbar 是竖直放置,通过 orientation 关键字参数,可将其设置为水平放置;

      cb = plt.colorbar(orientation='horizontal')
  • 相关阅读:
    POJ 1451
    LightOJ 1224
    POJ 2001
    HDU 2072
    POJ 3764
    CH 1602
    CH 1601
    Gym 101873K
    CH 1201
    Gym 101873C
  • 原文地址:https://www.cnblogs.com/mtcnn/p/9421648.html
Copyright © 2011-2022 走看看