Python的matplotlib/plotly/bokeh中的三轴极轴投影?(蜂巢图)

Python的matplotlib/plotly/bokeh中的三轴极轴投影?(蜂巢图),python,matplotlib,networkx,plotly,bokeh,Python,Matplotlib,Networkx,Plotly,Bokeh,是否对极轴投影进行了允许3轴的调整?我猜可能是一个3D散点图倾斜到2D,所以它像这样排列 我最近发现了,我想尝试编写一个,这样我就可以在哮喘患者身上有更多的自由活动空间,让它看起来更像。我开始试着做一个,但我能想到的唯一方法就是用这样的极坐标 我的问题: 有没有办法在matplotlib、plotly或bokeh中获取三轴极坐标? 如果不是的话 有没有办法修复3D绘图以获得这种类型的结构? fig = plt.figure(figsize=(10,10)) ax = plt.subplot(11

是否对极轴投影进行了允许3轴的调整?我猜可能是一个3D散点图倾斜到2D,所以它像这样排列

我最近发现了,我想尝试编写一个,这样我就可以在哮喘患者身上有更多的自由活动空间,让它看起来更像。我开始试着做一个,但我能想到的唯一方法就是用这样的极坐标

我的问题: 有没有办法在matplotlib、plotly或bokeh中获取三轴极坐标? 如果不是的话 有没有办法修复3D绘图以获得这种类型的结构?

fig = plt.figure(figsize=(10,10))
ax = plt.subplot(111, polar=True)
ax.plot(2*[np.pi/2], [0,1], color="black", linewidth=3)
ax.plot(2*[5*np.pi/4], [0,1], color="black", linewidth=3)
ax.plot(2*[7*np.pi/4], [0,1], color="black", linewidth=3)

也许是一个开始,但我想看看matplotlib 2.0,看看3D现在是否更好

import numpy as np

from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt

def Lin3dSeg(a,b):
    '''
    if a, b are spherical coordinate vector tuples, then it
    returns list of spherical coordinate points of a linear in r, theta, phi
    3D spiral segment connecting them   
    ''' 
    return [np.linspace(start, stop) for start, stop in zip(a,b)]

def Sphere2Cart(sphere_pt): # no particular convention, just thrown together
    x = sphere_pt[0] * np.sin(sphere_pt[1])
    y = sphere_pt[0] * np.cos(sphere_pt[1])
    z = sphere_pt[0] * np.cos(sphere_pt[2])
    return (x, y, z)

def SphereSegCarts(seg):
    return [Sphere2Cart(pt) for pt in zip(*Lin3dSeg(*seg))]

seg_a =((10, 0, 0),(5, np.pi/2, 0))
seg_b =((10, np.pi/2, 0),(1, 0, np.pi/2))
seg_c =((3, 0, np.pi/2),(10, np.pi/2, np.pi/2))


fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.view_init(elev=45, azim=45)

ax.plot(*zip(*SphereSegCarts(seg_a)), c='r')
ax.plot(*zip(*SphereSegCarts(seg_b)), c='g')
ax.plot(*zip(*SphereSegCarts(seg_c)), c='b')

plt.show()