The tutorials use a plot
function to plot profiles - but when I try to replicate their examples i.e. plot('ENET.PD.[GW];scatter;[6.5;2.5;4]')
, an error is returned (NameError: name 'plot' is not defined
). Is there a package that I need to import first before I can use the plot
function? Or is my syntax incorrect?
Hi @emmacooper,
We’re sorry to hear that you’ve had some trouble with an error occurring when following along with the Tutorials. The plot
function should work just fine out-of-the-box with no need to import anything.
I tried to reproduce this error with the following steps:
- I opened the ENET39 network
- I opened the PCM_PEAK_DEMAND_WEEK scenario
- I opened a new IronPythong script with
View -> Script -> Create New IronPython Script
- I entered the command
plot('ENET.PD.[GW];scatter;[6.5;2.5;4]')
in the script - I executed the script by clicking the hourglass button in the top-left
This resulted in the expected behavior: a new window popping up with a scatter plot. I also got the same result by entering this command directly in the Command Window.
If these steps are different from what you did, could you try to follow these steps exactly to see if you can reproduce the same behavior? Thank you in advance!
Thank you, Will! I think my mistake was attempting to use SAInt-specific functions in a Python IDE, as opposed to the IronPython module integrated into SAInt.
Hi @emmacooper,
I’m happy to hear this is resolved, apologies for the confusion!
It is possible to access SAInt from a Python IDE via the SAInt API, however the SAInt API is not typically included in our Free Trial licenses and anyways you should have everything you need for your project accessible via the GUI.
Thanks!