Files
CoolProp/dev/Tickets/SF-73.py
Matthis Thorade 526cb198a4 autopep8 whitespace (#1613)
* autopep8 whitespace only:

--select="E101,W1,W2"

* revert single file: web2py_online.py

Should this be a .py file at all?

* revert file Tickets/1443.py because the diff looked strange:

maybe there is an encoding problem?

* Rename web2py_online.py to web2py_online.rst
2017-12-12 08:32:38 -07:00

24 lines
805 B
Python

import matplotlib
matplotlib.use('Qt4Agg')
import matplotlib.pyplot
from CoolProp.Plots.Plots import drawIsoLines,getIsoLines,drawLines
fluid = "n-Pentane"
fig, ((ax1, ax2)) = matplotlib.pyplot.subplots(1, 2, sharey='row')
drawIsoLines(fluid, 'Ts', 'Q', iValues=[0.0, 1.0], axis=ax1) # for predefined styles
drawIsoLines(fluid, 'Ts', 'Q', iValues=[0.3, 0.7], axis=ax1) # for predefined styles
# Get the data points
saturation = getIsoLines(fluid, 'Ts', 'Q', [0.0, 1.0 ], axis=ax2)
quality = getIsoLines(fluid, 'Ts', 'Q', [0.3, 0.7 ], axis=ax2)
# define custom styles
plt_kwargs = {"color": "green","linewidth": 1.5}
drawLines(fluid,saturation,ax2,plt_kwargs=plt_kwargs)
plt_kwargs = {"color": "red","linewidth": 0.75}
drawLines(fluid,quality,ax2,plt_kwargs=plt_kwargs)
matplotlib.pyplot.show()