-3

Hi I am writing a code which uses ax.plot_surface() to plot data on a unit sphere for theta = linspace(0,pi,100) and phi = linspace(0,2*pi,100).

For some reason my image is distorted in the sense that the sphere is ahead of the axis. Does anyone have any idea of why this would be the case?

John Doe
  • 111
  • 6
  • 1
    could downvoters explain to help improve the qu? Although it could include example code to produce a specific problem, a quick look at the docs do not immediately explain any of the arguments asked about. So the question has merit, no? – Bonlenfum Mar 02 '18 at 11:16
  • The problem with this question is that it asks about parameters which are irrelevant to the problem. Either ask about the parameters (and be happy with the answer to it) or ask about the specific problem you have.. – ImportanceOfBeingErnest Mar 02 '18 at 13:10
  • @ImportanceOfBeingErnest I edited the question now in line with your suggestion. – John Doe Mar 02 '18 at 13:15
  • See [this question](https://stackoverflow.com/questions/44091229/trim-data-outside-3d-plot-in-matplotlib). – ImportanceOfBeingErnest Mar 02 '18 at 13:19
  • @ImportanceOfBeingErnest I don't think it's data outlier problem. It's just a visual perspective problem. Do you know how to by default display the set of axis in front of the graph? – John Doe Mar 02 '18 at 13:27
  • As I see it, it is exactly the same problem. The data is shown outside the axes. – ImportanceOfBeingErnest Mar 02 '18 at 13:29

1 Answers1

1

3D plotting isn't necessarily a good place to start learning how to use plotting libraries; the fundamentals are more often explained in simpler 2d plots. But to get started,

  • read the 3d tutorial
  • use the 3d examples for reference
  • experiment! Produce the same figure with different parameter settings.

The specific parameters you asked about:

Bonlenfum
  • 19,101
  • 2
  • 53
  • 56