mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
Limits correction back in place with KSI unit system
This commit is contained in:
@@ -166,8 +166,6 @@ class BasePlot(object):
|
||||
the keys 'kmax', 'label' and 'opts', those can be used for plotting
|
||||
as well.
|
||||
"""
|
||||
print(self)
|
||||
print(self.unit_system)
|
||||
if not kind.upper() in ['T', 'P']:
|
||||
raise ValueError(''.join(["Invalid input for determining the ",
|
||||
"saturation lines... Expected either ",
|
||||
@@ -190,7 +188,6 @@ class BasePlot(object):
|
||||
kind, sat_mesh)
|
||||
|
||||
if self.unit_system == 'KSI':
|
||||
print("got here")
|
||||
x_vals *= self.KSI_SCALE_FACTOR[self.graph_type[1]]
|
||||
y_vals *= self.KSI_SCALE_FACTOR[self.graph_type[0]]
|
||||
|
||||
|
||||
@@ -247,6 +247,11 @@ class IsoLines(BasePlot):
|
||||
limits[0][1] = min([limits[0][1], max(self.axis.get_xlim())])
|
||||
limits[1][0] = max([limits[1][0], min(self.axis.get_ylim())])
|
||||
limits[1][1] = min([limits[1][1], max(self.axis.get_ylim())])
|
||||
|
||||
# Limits correction in case of KSI unit_system
|
||||
if self.unit_system == 'KSI':
|
||||
limits[0] = [l*self.KSI_SCALE_FACTOR[self.graph_type[1]] for l in limits[0]]
|
||||
limits[1] = [l*self.KSI_SCALE_FACTOR[self.graph_type[0]] for l in limits[1]]
|
||||
|
||||
self.axis.set_xlim(limits[0])
|
||||
self.axis.set_ylim(limits[1])
|
||||
|
||||
Reference in New Issue
Block a user