Skip to content

Instantly share code, notes, and snippets.

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))
@lmmentel
lmmentel / coke_profile_heatmap.py
Created May 22, 2017 20:51
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)
@lmmentel
lmmentel / coke_animation.py
Created May 22, 2017 16:51
Animation of the deactivation profile of a reactor filled with catalyst.
import matplotlib.pyplot as plt
from matplotlib import animation
fig, ax = plt.subplots(figsize=(16, 2))
ax.get_xaxis().set_visible(False)
ax.get_yaxis().set_visible(False)
z = coke[0, :]
profile = ax.pcolormesh(z[np.newaxis, :], vmin=0.0, vmax=1.0, cmap='magma_r')
@lmmentel
lmmentel / slides.md
Created January 20, 2017 08:35 — forked from aaronwolen/slides.md
Pandoc template to generate reveal.js slideshows.

% Title % Name % Date

My first slide

List

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname