【发布时间】:2020-10-27 11:28:59
【问题描述】:
我正在显示已转换为极坐标的数据点的分布,并正在使用直方图显示点的分布。如何将 x 轴更改为 pi 的倍数?
import numpy as np
import matplotlib.pyplot as plt
Phi_coords = []
# Extracting phi values from polars
for i in range(len(test_polars)):
Phi_coords.append(test_polars[i][1])
# matplotlib histogram
plt.hist(Phi_coords, color = 'blue', edgecolor = 'black', bins = 360)
# Add labels
plt.title('Distribution')
plt.xlabel('Phi Coordinate')
plt.ylabel('Number at Phi Coordinate')
【问题讨论】:
标签: python matplotlib graphing