Formatting 3D subplots in pyplot


#1

I’ve run code which creates the following figure:

Now I want to make a 2 by 2 matrix of subplots showing the same figure from multiple views. My first problem is whether or not it’s possible to simply copy the same figure as opposed to drawing it on each subplot individually. After some research it seems like this isn’t possible and I’m just going to have to live with the slight lag as it loops through the code. If this is incorrect, someone please enlighten me.
The other problem is when I try to draw the figure on a subplot using the same code used to produce the figure above, the formatting no longer works. For reference here’s my formatting code:
ax=gca()
ax[:set_ylim]]([-limit2/3,limit4/3])
ax[:set_zlim]]([-limit,limit])
ax[:set_xlim]]([-limit,limit])
ax:tick_params
ax[:set_axis_off]]()
*note that I added brackets to prevent the commenter from misinterpreting my code as hypertext
And here’s the figure the for loop produces:


#2

Sorry, this reply isn’t helpful - it just reminded me that something similar can be done in GLVisualize in what I find to be a very impressive demonstration: https://vimeo.com/180307247


#3

Following one of the examples here you can try something like this:

fig=figure()
ax1=fig[:add_subplot](2,1,1,projection="3d")
ax1[:plot_wireframe](x,y,z)
ax1[:set_axis_off]()
ax2=fig[:add_subplot](2,1,2,projection="3d")
ax2[:plot_wireframe](x,y,z)
ax2[:set_axis_off]()

Yes, the API is inconsistent (with single plots or 2D), because, well, it’s the Pythonic way?

For future reference, just put verbatim Julia code in sections fenced by triple backticks (see under Github Markdown). HTH


#4

Thank You!