• 第3章 决策树


    createPlot.ax1.text(xMid, yMid, txtString)

    createPlot.ax1 是表示: ax1 是函数 createPlot 的一个属性,这个可以在函数里面定义也可以在函数定义后加入也可以
    example:
    def fun():
    fun.x =1
    当你在python的命令窗口下,运行一次fun()后,x 就是 fun()的一个属性,你在命令窗口下输入
    fun.x 后面会显示 1

    也可以 在 函数定义完后加入 属性 如 fun.y = 2,在使用 dir(fun),你就会发现fun有 x,y 这两个属性


    subplot:

    Keyword

    Description

    loc

    a location code

    prop

    the font property (matplotlib.font_manager.FontProperties 对象)

    eg

    song_font = matplotlib.font_manager.FontProperties(fname='simsun.ttc', size=8)

    fontsize

    the font size (和prop互斥,不可同时使用)

    markerscale

    the relative size of legend markers vs. original

    numpoints

    the number of points in the legend for line

    scatterpoints

    the number of points in the legend for scatter plot

    scatteryoffsets

    a list of yoffsets for scatter symbols in legend

    frameon

    if True, draw a frame around the legend. If None, use rc

    fancybox

    if True, draw a frame with a round fancybox. If None, use rc

    shadow

    if True, draw a shadow behind legend

    ncol

    number of columns

    borderpad

    the fractional whitespace inside the legend border

    labelspacing

    the vertical space between the legend entries

    handlelength

    the length of the legend handles

    handleheight

    the length of the legend handles

    handletextpad

    the pad between the legend handle and text

    borderaxespad

    the pad between the axes and legend border

    columnspacing

    the spacing between columns

    title

    the legend title

    bbox_to_anchor

    the bbox that the legend will be anchored.

    bbox_transform

    the transform for the bbox. transAxes if None.

     
  • 相关阅读:
    爬取某人的微博信息
    Scrapy 爬取新浪微博
    《python3网络爬虫开发实战》--Scrapy
    《python3网络爬虫开发实战》--pyspider
    《python3网络爬虫开发实战》--APP爬取
    《python3网络爬虫开发实战》--模拟登陆
    《python3网络爬虫开发实战》--代理的使用
    用selenium爬取淘宝商品
    《python3网络爬虫开发实战》--动态渲染页面爬取
    Ajax爬取今日头条街拍美图
  • 原文地址:https://www.cnblogs.com/captain-dl/p/9510818.html
Copyright © 2020-2023  润新知