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()
import matplotlib matplotlib.use('Qt4Agg') from CoolProp.Plots.Plots import Ph, drawIsoLines from CoolProp.Plots.SimpleCycles import SimpleCycle from CoolProp.CoolProp import Props import matplotlib.pyplot as plt Ref = 'Propane' ax = Ph(Ref) SimpleCycle(Ref, 260, 320, 5, 5, 0.7) # ax.set_xlim([200,900]) # ax.set_ylim([300,530]) quality = drawIsoLines(Ref, 'ph', 'Q', [0.2, 0.4, 0.6, 0.8], axis=ax) isobars = drawIsoLines(Ref, 'ph', 'T', [250.0, 300.0], axis=ax) #isochores = drawIsoLines(Ref, 'Ts', 'D', [2, 600] , num=7, axis=ax) plt.show()