上一页 1 ··· 149 150 151 152 153 154 155 156 157 ··· 164 下一页
摘要: 默认b蓝色; 八中内建颜色: b:blue 蓝色 g:green 绿色 r:red 红色 c:cyan 青色 m:magenta 品红 y:yellow 黄色 k:black 黑色 w:white 白色 其它三种表示方法: plt.plot(data,color='0.2') 灰度表示法 #在col 阅读全文
posted @ 2019-03-28 12:23 天子骄龙 阅读(1529) 评论(0) 推荐(0)
摘要: o圆形默认; 其它看官网 https://matplotlib.org/api/markers_api.html?highlight=markers#module-matplotlib.markers 阅读全文
posted @ 2019-03-28 12:20 天子骄龙 阅读(382) 评论(0) 推荐(0)
摘要: 散点图: 阅读全文
posted @ 2019-03-28 12:18 天子骄龙 阅读(247) 评论(0) 推荐(0)
摘要: 【matplotlib的安装需要VS编译器的支持,电脑一般会装64位VS,所以如果是64位python,可以python -m pip install matplotlib;但是如果是32位python,这时电脑没有32位VS,就不能python -m pip install matplotlib, 阅读全文
posted @ 2019-03-28 12:17 天子骄龙 阅读(9193) 评论(0) 推荐(3)
摘要: matplotlib的安装和 允许中文及几种字体 阅读全文
posted @ 2019-03-28 12:05 天子骄龙 阅读(184) 评论(0) 推荐(0)
摘要: try{ 可能引发异常的语句 } catch(异常类型1){ 针对异常类型1数据的处理 } catch(异常类型2){ 针对异常类型2数据的处理 } ... 异常抛出throw #include<iostream> int func(int x) { if (x == -1) { throw -1; 阅读全文
posted @ 2019-03-25 11:30 天子骄龙 阅读(545) 评论(0) 推荐(0)
摘要: #include <stdio.h> #define PI 3.14159 //宏 文本替换 //在C99之前没有const,只能用define #define FORMAT "%f\n" //编译时会用"%f\n"替换FORMAT //名字必须是一个单词,值可以是各种东西 //完全的文本替换 in 阅读全文
posted @ 2019-03-23 14:45 天子骄龙 阅读(339) 评论(0) 推荐(0)
摘要: 在普通类成员函数的参数表后面(花括号前面)加上const,这个成员函数就是常成员函数 格式:返回类型 函数名(参数表) const {函数体} 常成员函数中的this指针是一个常量指针,一般不能在常成员函数中修改成员变量值 #include <iostream> #include<string> u 阅读全文
posted @ 2019-03-23 09:22 天子骄龙 阅读(361) 评论(0) 推荐(0)
摘要: 格式:~类名(void){ } 没有参数,没有返回值,不能被重载,一个类只能有一个析构函数 对象销毁时自动执行 主要负责清理对象生命周期中的动态资源 #include <iostream>using namespace std; class A {public: A(int i = 0) { m_p 阅读全文
posted @ 2019-03-22 14:53 天子骄龙 阅读(540) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> //声明结构体(struct)数据类型 //struct可以在main()之内也可以在外,他们的作用域不同 struct student { char name[50]; int age; int achievement; 阅读全文
posted @ 2019-03-18 09:24 天子骄龙 阅读(515) 评论(0) 推荐(0)
上一页 1 ··· 149 150 151 152 153 154 155 156 157 ··· 164 下一页