Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plotting example on coolprop.org does not work - potentially related to issue #351 #747

Closed
bachc opened this issue Jul 24, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@bachc
Copy link

bachc commented Jul 24, 2015

I noticed this issue when trying the plotting example on http://www.coolprop.org/apidoc/CoolProp.Plots.Plots.html

It appears the the Ts plot uses kJ/kg, but the isolines use J/kg. Commenting out shows that the isolines are drawn, just in different units. See modified example code below. Hope this is a relatively easy fix.

from matplotlib import pyplot
from CoolProp.Plots import Ts, drawIsoLines
Ref = 'n-Pentane'
ax = Ts(Ref)

ax.set_xlim([-0.5, 1.5])

ax.set_ylim([300, 530])

quality = drawIsoLines(Ref, 'Ts', 'Q', [0.3, 0.5, 0.7, 0.8], axis=ax)
isobars = drawIsoLines(Ref, 'Ts', 'P', [100, 2000], num=5, axis=ax)
isochores = drawIsoLines(Ref, 'Ts', 'D', [2, 600], num=7, axis=ax)
pyplot.savefig('props_plot.png')
pyplot.show()
props_plot

@ibell
Copy link
Contributor

ibell commented Jul 26, 2015

The plotting code, while unloved for a long time, is getting a serious
overhaul: https://github.com/CoolProp/CoolProp/tree/draw_process

On Fri, Jul 24, 2015 at 12:57 PM, bachc notifications@github.com wrote:

I noticed this issue when trying the plotting example on
http://www.coolprop.org/apidoc/CoolProp.Plots.Plots.html

It appears the the Ts plot uses kJ/kg, but the isolines use J/kg.
Commenting out shows that the isolines are drawn, just in different units.
See modified example code below. Hope this is a relatively easy fix.

from matplotlib import pyplot
from CoolProp.Plots import Ts, drawIsoLines
Ref = 'n-Pentane'
ax = Ts(Ref)
#ax.set_xlim([-0.5, 1.5])
#ax.set_ylim([300, 530])
quality = drawIsoLines(Ref, 'Ts', 'Q', [0.3, 0.5, 0.7, 0.8], axis=ax)
isobars = drawIsoLines(Ref, 'Ts', 'P', [100, 2000], num=5, axis=ax)
isochores = drawIsoLines(Ref, 'Ts', 'D', [2, 600], num=7, axis=ax)
pyplot.savefig('props_plot.png')
pyplot.show()
[image: props_plot]
https://cloud.githubusercontent.com/assets/2520741/8882311/9407ecda-320b-11e5-80a5-35b56d593033.png


Reply to this email directly or view it on GitHub
#747.

@jowr
Copy link
Member

jowr commented Jul 27, 2015

Please also look at our discussion at #351

@bachc
Copy link
Author

bachc commented Jul 27, 2015

Looks great! Any idea on when this will be merged back (and the examples functional) with the main branch?

@jowr
Copy link
Member

jowr commented Jul 27, 2015

No, not really. I cannot work on it until September, but all are invited to continue the work in the meantime.

@jowr jowr added the plotting label Oct 8, 2015
@jowr jowr self-assigned this Oct 8, 2015
@jowr jowr added this to the v5.2 milestone Oct 8, 2015
@jowr jowr closed this as completed in 311596b Oct 8, 2015
@jowr jowr modified the milestones: v5.1.2, v5.2 Oct 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants