我正在使用Matplotlib来可视化三维数组.我几乎按照我想要的方式得到了它,除了一个小小的障碍...请参阅下面的插图和描述我可以做什么以及我想要它做什么...
我希望你们能帮助我:)请参阅下面的来源.
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
from matplotlib import rcParams
import numpy as np
rcParams['axes.labelsize'] = 14
rcParams['axes.titlesize'] = 16
rcParams['xtick.labelsize'] = 14
rcParams['ytick.labelsize'] = 14
rcParams['legend.fontsize'] = 14
rcParams['font.family'] = 'serif'
rcParams['font.serif'] = ['Computer Modern Roman']
rcParams['text.usetex'] = True
rcParams['grid.alpha'] = 0.0
def make_cube():
""" A Cube consists of a bunch of planes..."""
planes = {
"top" : ( [[0,1],[0,1]], [[0,0],[1,1]], [[1,1],[1,1]] ),
"bottom" : ( [[0,1],[0,1]], [[0,0],[1,1]], [[0,0],[0,0]] ),
"left" : …
Run Code Online (Sandbox Code Playgroud)