
Python可视化
文章平均质量分 53
小基基o_O
GitHub:https://github.com/AryeYellow
码云:https://gitee.com/arye
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Superset部署+连接MySQL8+省份地图可视化
ERROR: (MySQLdb._exceptions.OperationalError) (2059, "Authentication plugin 'caching_sha2_password' cannot be loaded:so: cannot open shared object file: No such file or directory")Superset是否具有动态可视化功能?原创 2022-02-19 17:10:00 · 4641 阅读 · 2 评论 -
Python不调包实现条形图
Python手写条形图Python不调包实现条形图Python打印条形图原创 2021-11-23 18:30:54 · 294 阅读 · 1 评论 -
区间[0,1]的各种函数图像(不定更)
对称轴x=0.5from matplotlib import pyplot as mpdef quadratic(x, n=2): return (2 * x - 1) ** nw = [i / 400 for i in range(401)]mp.figure(figsize=(5, 5))mp.scatter([0, .5, 1], [1, 0, 1], s=75, color='b', alpha=.3)mp.plot(w, [quadratic(i) for i in w],原创 2020-06-27 19:02:02 · 5784 阅读 · 0 评论 -
Excel单元格部分字体颜色Python实现
文章目录原创 2020-03-03 16:05:01 · 8147 阅读 · 7 评论 -
Python【print】常用颜色(复制用)
字体颜色# redprint('\033[031m')print('\033[0m')# yellowprint('\033[033m')# blueprint('\033[034m')# purpleprint('\033[035m')蓝绿色计时器背景色原创 2018-06-18 11:43:57 · 4071 阅读 · 1 评论 -
Python程序员表白
画心心形线爱心原创 2019-10-25 14:45:34 · 2638 阅读 · 0 评论 -
Python高亮文本中的关键词
文章目录csvexcelhtmlcsvexcelhtmldef save_html(ls_of_ls, prefix): fname = prefix + '.html' with open(fname, 'a', encoding='utf-8') as f: f.write('<html><head><meta charse...原创 2019-09-09 10:18:56 · 6907 阅读 · 5 评论 -
Python【词云】《长恨歌》
from gensim import corpora, models, similaritiesimport jieba# 分词函数,返回分词列表def cut(sentence): generator = jieba.cut(sentence) return [word for word in generator]# 文本集text1 = '多数学院已经放学,但多数学生...原创 2018-07-16 23:21:02 · 1159 阅读 · 0 评论 -
Python网络图【networkx】极简代码
文章目录安装简介示例无多重边无向图有多重边有向图安装Anaconda Prompt下输入conda install networkx简介import jieba.posseg as jp, networkx as nx# 创建图G = nx.Graph() # 无多重边无向图G = nx.DiGraph() # 无多重边有向图G = nx.MultiGraph() # 有多重...原创 2020-04-21 15:37:05 · 7287 阅读 · 4 评论 -
1、matplotlib 画图基础步骤
1、创建数据import numpy as np# 创建多项式函数x = np.linspace(-10, 10, 101)f = np.poly1d([1., 0., -1., 0.])y = f(x)2、画图步骤import matplotlib.pyplot as mp# 创建图形窗口(标题、颜色)mp.figure(num='title', facecolor='l...原创 2018-05-31 15:22:16 · 1769 阅读 · 0 评论 -
2、matplotlib 基本图表大全(极简)
1、热力图、等高线图、3d曲面图1.1、创建数据import numpy as npimport matplotlib.pyplot as mpa = np.linspace(-3, 3, 999)x, y = np.meshgrid(a, a)z = (1 - x / 2 + x ** 5 + y ** 3) * np.exp(-x ** 2 - y ** 2)1.2、热力图...原创 2018-06-07 12:57:55 · 2361 阅读 · 0 评论 -
4、matplotlib 坐标轴
1、创建数据,此处为三角函数为例import numpy as npx = np.linspace(-np.pi, np.pi, 999)cos_y = np.cos(x)sin_y = np.sin(x)2、设置坐标轴范围import matplotlib.pyplot as mpmp.xlim( x.min() * 1.1, x.max() * 1.1)...原创 2018-06-04 09:36:18 · 1936 阅读 · 0 评论 -
5、matplotlib 图例
import numpy as npimport matplotlib.pyplot as mp# 数据源(三角函数) ----------------------------------------x = np.linspace(-np.pi, np.pi, 999)cos_y = np.cos(x)sin_y = np.sin(x) / 2# 设置坐标范围 ------------...原创 2018-06-04 09:51:28 · 512 阅读 · 0 评论 -
3、matplotlib 子图
import matplotlib.pyplot as mpimport matplotlib.gridspec as mg# 创建figure对象mp.figure(facecolor='lightgray')# 3行3列gs = mg.GridSpec(3, 3)for i in range(3): for j in range(3): # 传入参数 ...原创 2018-06-05 09:11:33 · 676 阅读 · 0 评论 -
6、matplotlib 数据标注
数据标注text(x, y, s, fontdict=None, withdash=False, **kwargs) x, y : scalars data coordinates s : string textimport numpy as npimport matplotlib.pyplot as mp# 创建数据n = 12x...原创 2018-06-05 09:59:18 · 3781 阅读 · 0 评论