Https://stackoverflow.com/questions/50100583/r-how-to-draw-a-3d-sphere-with-a-3d-surface-plot-as-the-spheres-surface

I have this structure z , in the following code:

n#equals some number that can be bigger or smaller than 360,or equalto360
z=list(vertical_degree=sample(0:360, n),horizontal_degree=sample(-90:90,n), value=sample(1:10, n))

I want to have a 3d sphere that corresponds to each dimension’s degree value, and have a surface plot as the sphere’s area corresponding to the sample value on each degree.

Please pardon my English, if you see any mistakes.

Basically, roughly like this picture, only in three dimensions instead of two. The barplot is exchanged with a surface plot, and the “value circle” with a “value sphere”.