【发布时间】:2019-06-24 11:01:40
【问题描述】:
我有方位角和地球属性大小的数据,想将其绘制在极地方位角直方图上(如玫瑰图)
这是数据的摘录:
degrees velocity
22.44903 9449.275
22.4512 9474.46
22.45321 9717.624
22.45537 9745.26
22.45739 9746.532
22.45953 9372.272
22.46157 9899.907
22.46369 9499.646
22.46581 9856.678
22.46786 9811.213
22.46999 9765.846
22.47202 9814.11
22.47418 9974.829
22.47619 10162.89
这是我尝试过的,但它产生的情节与我预期的不相似:
from physt import histogram, binnings, special
import numpy as np
import matplotlib.pyplot as plt
data = genfromtxt(file, delimiter=',')
x=data[:,0]
y=data[:,1]
hist = special.polar_histogram(x, y)
ax = hist.plot.polar_map()
我怀疑坐标转换可能存在问题。我想要的只是沿方位轴绘制的值的分布(直方图)
【问题讨论】:
-
什么是
special?我建议将import语句添加到您正在使用的软件包中。如果special是你自己的代码,那么对于这个问题添加是相当重要的。 -
您是否将角度从度数转换为弧度?
-
我试过转换,但还是一样