-
Notifications
You must be signed in to change notification settings - Fork 24
Error in running script, plot is not defined? #2
Comments
Hi, Try running the test with:
|
Hi,
I am using python 2.7 but I do not understand how to use python as I am a
beginner. How do I edit the code? I don’t know what the file has to include?
Can you advise me on how to run the program, please?
Thank you,
Henry
…On Tuesday, January 2, 2018, Mauricio Esguerra ***@***.***> wrote:
Hi,
It might be a python3 problem. Which python version are you using.
Try running the test with:
python2.7 test.py
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AhaTwuRCBeLzsrEMs_dF2XUfk7PKv5jrks5tGkSHgaJpZM4RQpkP>
.
|
You can see from your error message that You'll probably need some degree of Python knowledge to get this package to do what you'd like it to do. Here's a pretty well written introduction to how import works in Python. I'd start there. |
That's great thank you very much, I'll try this. What does the import * on line 6 mean? Do I have to change the * to something else? I'll have a read of that introduction, if you could advise me further I'd appreciate it very much. |
I have done as suggested but now cannot find the outputted file. Here is the code: `#! /usr/bin/python Boilerplateimport sys Plotp = plot([25.0,10.0],vbuf=10.0,hbuf=5.0,bgcolour=None, qualified='sortof') p + level(energy( 00, 'kjmol'), 1, '1', 0x0) p + edge( '1', 'EC1', 0x0, 0.4, 'normal') p + baseline(energy( 0.0, 'kjmol'),colour=0x0,mode='dashed',opacity=0.1) p.write()` The output from this code is attached - what have I done wrong? Please help! |
Hi, That is the expected result. |
Try this:
Then you should be able to see the svg file. |
It looks like the |
I have been trying to run the test.py script to see if it works and I keep getting 'NameError: plot is not defined'?
Can you help me on this please?
I have attached a screenshot of my terminal window and the script which I used.
Many Thanks,
Henry
`#! /usr/bin/python
Boilerplate
import sys
sys.path.insert(1,"C:\Users\Henry\rxnlvl") #
Plot
p = plot([25.0,10.0],vbuf=10.0,hbuf=5.0,bgcolour=None, qualified='sortof')
p + level(energy( 00, 'kjmol'), 1, '1', 0x0)
p + level(energy( -85.5, 'kjmol'), 2, 'EC1', 0x0)
p + level(energy( 244, 'kjmol'), 3, 'TS1a', 0xFF4444)
p + level(energy( 51, 'kjmol'), 3, 'TS1b', 0x0)
p + level(energy( -102, 'kjmol'), 4, 'DC1', 0x0)
p + level(energy( -82, 'kjmol'), 5, '2', 0x0)
p + level(energy( -111, 'kjmol'), 6, 'EC2', 0x0)
p + level(energy( -83, 'kjmol'), 7, 'TS2b', 0x0)
p + level(energy( 18, 'kjmol'), 7, 'TS2a', 0x44FF44)
p + level(energy( -103, 'kjmol'), 8, 'DC2', 0x0)
p + level(energy( 85, 'kjmol'), 9, '3', 0x0)
p + level(energy( 185, 'kjmol'), 10, '4', 0x0)
p + level(energy( 25, 'kjmol'), 11, '5', 0x0)
p + edge( '1', 'EC1', 0x0, 0.4, 'normal')
p + edge( 'EC1', 'TS1a', 0x0, 0.2, 'normal')
p + edge( 'EC1', 'TS1b', 0x0, 0.4, 'normal')
p + edge( 'TS1a', 'DC1', 0x0, 0.2, 'normal')
p + edge( 'TS1b', 'DC1', 0x0, 0.4, 'normal')
p + edge( 'DC1', '2', 0x0, 0.4, 'normal')
p + edge( '2', 'EC2', 0x0, 0.4, 'normal')
p + edge( 'EC2', 'TS2b', 0x0, 0.4, 'normal')
p + edge( 'EC2', 'TS2a', 0x0, 0.2, 'normal')
p + edge( 'TS2a', 'DC2', 0x0, 0.2, 'normal')
p + edge( 'TS2b', 'DC2', 0x0, 0.4, 'normal')
p + edge( 'DC2', '3', 0x0, 0.4, 'normal')
p + edge( '3', '4', 0x0, 0.4, 'normal')
p + edge( '4', '5', 0x0, 0.4, 'normal')
p + baseline(energy( 0.0, 'kjmol'),colour=0x0,mode='dashed',opacity=0.1)
p.write()
The text was updated successfully, but these errors were encountered: