zoukankan      html  css  js  c++  java
  • plt.rcParams参数设置

    import matplotlib.pyplot as plt
    plt.rcParams['font.sans-serif']=['SimHei'] # 用来显示中文标签
    plt.rcParams['axes.unicode_minus']=False # 用来显示负号
    plt.rcParams['figure.figsize'] = (16.0, 10.0) # 调整生成的图表最大尺寸
    plt.rcParams['figure.dpi'] = 300 # 每英寸点数

    调用plt.rcParams.keys()可获取rcParams的全部参数以及默认值。
    例如:

    'figure.dpi': 100.0   每英寸点数
    'figure.figsize': [6.0, 4.0]  生成的图表最大尺寸
    'font.size': 10.0  字体大小
    'hist.bins': 10  直方图分箱个数
    'lines.linewidth': 1.5  线宽
    'lines.marker': 'None'  标记样式
    'savefig.format': 'png'  保存图片的格式
    'savefig.jpeg_quality': 95  图片质量
    'text.color': 'black'  文本颜色
    'timezone': 'UTC'  时区格式
  • 相关阅读:
    leetcode297
    leetcode4
    leetcode23
    leetcode72
    leetcode239
    leetcode42
    leetcode128
    leetcode998
    SAP MM GR-based IV, 无GR不能IV?
    小科普:机器学习中的粒子群优化算法!
  • 原文地址:https://www.cnblogs.com/psztswcbyy/p/11579055.html
Copyright © 2011-2022 走看看