Skip to content
Advertisement

Pyplot: Plot a 3D figure in a 2D frame?

In my current project, I want to plot a 3D shape with pyplot. This is relatively straightforward:

enter image description here

The complication comes from the fact that I would like the figure to display in a straight 2D figure similar to this example:

enter image description here

That is to say, remove the 3D axes and ticks, the gridlines, and wrap everything in a flat 2D border. Is it possible to do this with Pyplot? You can find my code to generate the two figures below:

JavaScript

Advertisement

Answer

add these lines :

JavaScript

output:

1

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement