Skip to content

Instantly share code, notes, and snippets.

@lmmentel
Created May 22, 2017 20:51
Show Gist options
  • Select an option

  • Save lmmentel/688d0c5d4101a2cfdb3bb3913c9aa674 to your computer and use it in GitHub Desktop.

Select an option

Save lmmentel/688d0c5d4101a2cfdb3bb3913c9aa674 to your computer and use it in GitHub Desktop.
A heatmap of the simulated spatial and temporal coke evolution.
import matplotlib.pyplot as plt
import seaborn as sns
rcstyle = {'axes.linewidth': 1.0, 'axes.edgecolor': 'black','ytick.minor.size': 5.0}
sns.set(font_scale=2.0)
sns.set_style('ticks', rcstyle)
plt.figure(figsize=(18, 10))
ax = sns.heatmap(coke, cmap='magma_r', vmin=0.0, vmax=1.0)
plt.xticks(rotation=0);
plt.yticks(rotation=0);
ax.set_ylabel('Time')
ax.set_xticks(np.linspace(0, 200, 11))
ax.set_xticklabels(np.linspace(0.0, 1.0, 11))
ax.spines['left'].set_visible(True)
ax.spines['right'].set_visible(True)
ax.spines['bottom'].set_visible(True)
ax.spines['top'].set_visible(True)
ax.set_yticks([6*15*i + 78 for i in range(5)])
ax.set_yticklabels([50*i for i in reversed(range(5))])
ax.set_yticks([438 - 18*i for i in range(25)], minor=True)
ax.invert_yaxis()
plt.xlabel('Axial reactor coordinate')
plt.ylabel('TOS [min]')
plt.tight_layout()
plt.savefig('simulated_coke_profile.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment