簡體   English   中英

如何繪制極坐標直方圖?

[英]How to plot polar historgram?

我有方位角數據和地球屬性的大小,並想將其繪制在極地方位角直方圖上(如玫瑰圖)

這是數據的摘錄:

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()

我懷疑坐標轉換可能有問題。 我想要的只是沿方位軸繪制的值的分布(直方圖)

嘗試使用 seaborn 包裝

import seaborn as sns
sns.barplot(x,y)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM