In [1]:
%run import.ipynb
import matplotlib.pyplot as plt
Example of using the Isotherm plotting function.
In [2]:
isotherm = next(i for i in isotherms_n2_77k if i.material=='MCM-41')
isotherm.print_info()
Several examples of isotherm plotting are presented here:
In [3]:
pygaps.plot_iso(
[isotherms_isosteric[0], isotherms_isosteric[1]],
branch = 'ads',
logx = True,
x_range=(None,1),
lgd_keys=['temperature'],
loading_unit='cm3(STP)',
color=['b', 'r']
)
plt.show()
In [4]:
import os
path = os.path.join(os.getcwd(), 'novel')
pygaps.plot_iso(
isotherm,
branch = 'all',
color=False,
fig_title='Novel Behaviour',
save_path=path,
marker=['X']
)
plt.show()
In [5]:
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12,6))
pygaps.plot_iso(
isotherms_calorimetry[1],
ax=ax1,
x_data='pressure',
y1_data='loading',
y2_data='enthalpy',
lgd_pos='none',
y2_range=(0,40),
y1_line_style=dict(markersize=0),
y2_line_style=dict(markersize=6)
)
pygaps.plot_iso(
isotherms_calorimetry[1],
ax=ax2,
x_data='loading',
y1_data='enthalpy',
y1_range=(0,40),
lgd_pos='right',
marker=['^'],
y2_line_style=dict(markersize=6)
)
plt.show()
In [6]:
pygaps.plot_iso(
isotherms_n2_77k,
branch='all-nol',
fig_title="Regular isotherms colour",
lgd_keys=['material'],
marker=5
)
plt.show()
In [7]:
pygaps.plot_iso(
isotherms_n2_77k,
branch='all-nol',
color=False,
fig_title="Black and white",
lgd_keys=['material'],
pressure_mode='relative'
)
plt.show()
In [8]:
pygaps.plot_iso(
isotherms_n2_77k,
branch='all-nol',
x_range=(0.2, 0.6),
y1_range=(3, 10),
fig_title="Ranges selected",
lgd_keys=['material']
)
plt.show()
In [9]:
pygaps.plot_iso(
isotherms_isosteric,
branch='ads',
pressure_mode='relative',
loading_unit='cm3(STP)',
fig_title="Different pressure mode or units",
lgd_keys=['adsorbate', 'temperature'],
color=3,
marker=False
)
plt.show()
In [10]:
pygaps.plot_iso(
isotherms_n2_77k,
branch='des',
fig_title="Only desorption branch",
lgd_keys=['material', 'user']
)
plt.show()