matplotlib设置轴标签
来源:互联网 发布:网络彩票推广员 编辑:程序博客网 时间:2024/05/21 07:52
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
plt.yticks(y,y_label,)
if __name__=='__main__':
plt.close('all')
x=np.arange(1,6)
y=np.arange(100,600,100)
print(y)
x_label=['e1','e2','e3','e4','e5']
#x_label=x
y_label=['w1','w2','w3','w4','w5']
#y_label=y
import numpy as np
import matplotlib.pyplot as plt
def x_y_axis_labeling(x,y,x_label,y_label,figure_no):
#设置图片生成顺序figure_no
plt.figure(figure_no)plt.plot(x,y)
plt.margins(0.2)
#rotatio设置文章标签方向
plt.xticks(x,x_label,rotation='vertical')plt.yticks(y,y_label,)
if __name__=='__main__':
plt.close('all')
x=np.arange(1,6)
y=np.arange(100,600,100)
print(y)
x_label=['e1','e2','e3','e4','e5']
#x_label=x
y_label=['w1','w2','w3','w4','w5']
#y_label=y
x_y_axis_labeling(x,y,x_label,y_label,1)
阅读全文
0 0
- matplotlib设置轴标签
- 演示MatPlotLib中如何设置坐标轴主刻度标签和次刻度标签
- Matplotlib的中文设置
- Matplotlib设置图例字体大小
- 【Matplotlib】 刻度设置(2)
- matplotlib设置中文显示
- 自定义 matplotlib 设置
- Matplotlib Line2D设置
- matplotlib设置坐标轴
- matplotlib画图坐标轴设置
- matplotlib字体大小相关设置
- Matplotlib 中文字体设置
- matplotlib时间坐标设置
- matplotlib marker 设置
- matplotlib--设置坐标轴
- 设置matplotlib中文显示
- pylab/matplotlib 日期标签控制
- matplotlib 中文标签乱码问题
- c# 托举
- 9、TensorFLow 中的决策函数
- defer的用法研究
- windows环境下学习googletest记录
- Python爬虫(六)爬京东商品图片
- matplotlib设置轴标签
- 【珍爱生命,远离苏宁】在天猫苏宁易购旗舰店买到有问题的ipad,点进来,一起维权!维权群号:567621779
- 接收并解析ICMP报文
- 10、TensorFLow 中的损失函数
- ORA-12560: TNS: 协议适配器错误
- 输出杨辉三角
- MFC中发送自定义消息机制,PostMessage和SendMessage方式
- 整形单链表中的最大值,结点个数,平均值
- HTTPS协议详解