Created
May 23, 2017 12:59
-
-
Save lmmentel/5ef001dece7165f71d4b114fbe43c2a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D | |
from matplotlib.ticker import LinearLocator, FormatStrFormatter | |
x = np.linspace(0.0, 1.0, coke.shape[1]) | |
y = np.linspace(0.0, 240.0, coke.shape[0]) | |
xx, yy = np.meshgrid(x, y) | |
fig = plt.figure(figsize=(18, 14)) | |
ax = fig.gca(projection='3d') | |
surf = ax.plot_surface(xx, yy, coke, rstride=1, cstride=1, cmap='magma_r', | |
linewidth=0, antialiased=False) | |
ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f')) | |
cbar = fig.colorbar(surf, aspect=20, shrink=0.8) | |
cbar.ax.tick_params(labelsize=16) | |
ax.view_init(30, 230) | |
ax.tick_params(axis='x', labelsize=16) | |
ax.tick_params(axis='y', labelsize=16) | |
ax.tick_params(axis='z', labelsize=16, pad=10) | |
ax.set_xlabel('Axial reactor coordinate', fontsize=18, labelpad=20) | |
ax.set_ylabel('Time on stream TOS [min]', fontsize=18, labelpad=20) | |
ax.set_zlabel('Coke coverage', fontsize=18, labelpad=20) | |
plt.tight_layout() | |
plt.savefig('simulated_coke_profile_3d.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment