Discussion:
plot energy level
(too old to reply)
alberto
2020-04-22 15:42:11 UTC
Permalink
Hi,
I would plot some energy level
My file is so formatted

# Ver02 @ MSN
# vector orbital energy [hartree]
Vector 1 2.000000 -1.889210D+01
Vector 2 2.000000 -1.887116D+01
Vector 3 2.000000 -1.885154D+01
Vector 4 2.000000 -1.884983D+01
Vector 5 2.000000 -1.884464D+01
Vector 6 2.000000 -1.884440D+01

set term pngcairo enhanced
set output "eigen.png"
set encoding iso_8859_1
set xlabel "wavelength [nm]"
set ylabel "Energy"
set title "energy Ver @ MSN"
set key top right
set xrange [-10:10]

#color set
# '#000000' --> black
# '#FF0000' --> red
# '#0000FF' --> blue
# '#9B10FF' --> violet
# '#006000' --> dark green

plot 'eigenval_TPP_02_on_MSN.txt' using (2):($4) with boxes lc rgb '#FF0000' lw 2 title "visudyne 01"


set term wxt enhanced persist
replot

I would plot

_____ level1

_____ level2

_____ level3

regards

Al
Jörg Buchholz
2020-04-23 05:13:31 UTC
Permalink
Post by alberto
plot 'eigenval_TPP_02_on_MSN.txt' using (2):($4) with boxes lc rgb '#FF0000' lw 2 title "visudyne 01"
set term wxt enhanced persist
replot
I would plot
_____ level1
_____ level2
_____ level3
I'm not sure, you want to have something like this?

set errorbars small
plot 'eigenval_TPP_02_on_MSN.txt' using (2):4:(2) with xerrorbar


Jörg
alberto
2020-04-23 08:50:45 UTC
Permalink
Post by Jörg Buchholz
Post by alberto
plot 'eigenval_TPP_02_on_MSN.txt' using (2):($4) with boxes lc rgb '#FF0000' lw 2 title "visudyne 01"
set term wxt enhanced persist
replot
I would plot
_____ level1
_____ level2
_____ level3
I'm not sure, you want to have something like this?
set errorbars small
plot 'eigenval_TPP_02_on_MSN.txt' using (2):4:(2) with xerrorbar
Jörg
Hi,
thanks for your reply
I would plot something like this
https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.chemguide.co.uk%2Fatoms%2Fproperties%2F&psig=AOvVaw2c0vXGdXEL5vYU5kWljcYb&ust=1587717949253000&source=images&cd=vfe&ved=0CAIQjRxqFwoTCJD9-raU_ugCFQAAAAAdAAAAABAN

where the horizontal lines are my energy values

regards

Al
Jörg Buchholz
2020-04-23 19:12:35 UTC
Permalink
Post by Jörg Buchholz
Post by alberto
plot 'eigenval_TPP_02_on_MSN.txt' using (2):($4) with boxes lc
rgb '#FF0000' lw 2 title "visudyne 01"
set term wxt enhanced persist replot
I would plot
_____ level1
_____ level2
_____ level3
I'm not sure, you want to have something like this?
set errorbars small plot 'eigenval_TPP_02_on_MSN.txt' using
(2):4:(2) with xerrorbar
Jörg
Hi, thanks for your reply I would plot something like this
https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.chemguide.co.uk%2Fatoms%2Fproperties%2F&psig=AOvVaw2c0vXGdXEL5vYU5kWljcYb&ust=1587717949253000&source=images&cd=vfe&ved=0CAIQjRxqFwoTCJD9-raU_ugCFQAAAAAdAAAAABAN
where the horizontal lines are my energy values
set xrange [-10:10]
set style textbox opaque
plot 'eigenval_TPP_02_on_MSN.txt' u (0):4:(10) w xerrorbar pt 0 t
"visudyne 01",\
'' u (0):4:(sprintf("Level %.0f",$2)) w labels boxed center offset first
-5 notitle

Then you have horizontal lines from -10 to 10 at your level (given in
colloumn 4) and a label "Level 1 ...." at the horizontal lines.

Jörg
alberto
2020-04-24 16:29:07 UTC
Permalink
Post by alberto
Post by Jörg Buchholz
Post by alberto
plot 'eigenval_TPP_02_on_MSN.txt' using (2):($4) with boxes lc
rgb '#FF0000' lw 2 title "visudyne 01"
set term wxt enhanced persist replot
I would plot
_____ level1
_____ level2
_____ level3
I'm not sure, you want to have something like this?
set errorbars small plot 'eigenval_TPP_02_on_MSN.txt' using
(2):4:(2) with xerrorbar
Jörg
Hi, thanks for your reply I would plot something like this
https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.chemguide.co.uk%2Fatoms%2Fproperties%2F&psig=AOvVaw2c0vXGdXEL5vYU5kWljcYb&ust=1587717949253000&source=images&cd=vfe&ved=0CAIQjRxqFwoTCJD9-raU_ugCFQAAAAAdAAAAABAN
where the horizontal lines are my energy values
set xrange [-10:10]
set style textbox opaque
plot 'eigenval_TPP_02_on_MSN.txt' u (0):4:(10) w xerrorbar pt 0 t
"visudyne 01",\
'' u (0):4:(sprintf("Level %.0f",$2)) w labels boxed center offset first
-5 notitle
Then you have horizontal lines from -10 to 10 at your level (given in
colloumn 4) and a label "Level 1 ...." at the horizontal lines.
Jörg
Hi,
thanks for your reply.
I'm trying your code, but i recive this error

plot [:][:] 'eigenval_TPP_02_on_MSN.txt' u (-8):($4):(2) w xerrorbar pt 0 lc rgb '#FF0000' lw 2 t 'visudyne 01' "u (0):4:(sprintf("Level %.0f",$2)) w labels boxed center offset first -5 notitle "
^
"VER_eigenval_HOMO_LUMO.gnu", line 20: unexpected or unrecognized token

How could I fix it?

regards

Al
Jörg Buchholz
2020-04-24 18:15:24 UTC
Permalink
Post by alberto
Post by alberto
Post by Jörg Buchholz
Post by alberto
plot 'eigenval_TPP_02_on_MSN.txt' using (2):($4) with boxes lc
rgb '#FF0000' lw 2 title "visudyne 01"
set term wxt enhanced persist replot
I would plot
_____ level1
_____ level2
_____ level3
I'm not sure, you want to have something like this?
set errorbars small plot 'eigenval_TPP_02_on_MSN.txt' using
(2):4:(2) with xerrorbar
Jörg
Hi, thanks for your reply I would plot something like this
https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.chemguide.co.uk%2Fatoms%2Fproperties%2F&psig=AOvVaw2c0vXGdXEL5vYU5kWljcYb&ust=1587717949253000&source=images&cd=vfe&ved=0CAIQjRxqFwoTCJD9-raU_ugCFQAAAAAdAAAAABAN
where the horizontal lines are my energy values
set xrange [-10:10]
set style textbox opaque
plot 'eigenval_TPP_02_on_MSN.txt' u (0):4:(10) w xerrorbar pt 0 t
"visudyne 01",\
'' u (0):4:(sprintf("Level %.0f",$2)) w labels boxed center offset first
-5 notitle
Then you have horizontal lines from -10 to 10 at your level (given in
colloumn 4) and a label "Level 1 ...." at the horizontal lines.
Jörg
Hi,
thanks for your reply.
I'm trying your code, but i recive this error
plot [:][:] 'eigenval_TPP_02_on_MSN.txt' u (-8):($4):(2) w xerrorbar pt 0 lc rgb '#FF0000' lw 2 t 'visudyne 01' "u (0):4:(sprintf("Level %.0f",$2)) w labels boxed center offset first -5 notitle "
^
"VER_eigenval_HOMO_LUMO.gnu", line 20: unexpected or unrecognized token
How could I fix it?
regards
Al
The plot commands must be separated with a , or with a ,\ for a line
break. And there is a different between a " (double quote ) and two ''
(single quote)

plot [:][:] 'eigenval_TPP_02_on_MSN.txt' u (-8):($4):(2) w xerrorbar pt
0 lc rgb '#FF0000' lw 2 t 'visudyne 01', '' u (0):4:(sprintf("Level
%.0f",$2)) w labels boxed center offset first -5 notitle

This is only a single line, the line breaks are done by the newsreader
/ e-mail Software.

Jörg
Jörg Buchholz
2020-04-27 07:56:46 UTC
Permalink
Post by Jörg Buchholz
Post by alberto
plot 'eigenval_TPP_02_on_MSN.txt' using (2):($4) with boxes lc
rgb '#FF0000' lw 2 title "visudyne 01"
set term wxt enhanced persist replot
I would plot
_____ level1
_____ level2
_____ level3
I'm not sure, you want to have something like this?
set errorbars small plot 'eigenval_TPP_02_on_MSN.txt' using
(2):4:(2) with xerrorbar
Jörg
Hi, thanks for your reply I would plot something like this
https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.chemguide.co.uk%2Fatoms%2Fproperties%2F&psig=AOvVaw2c0vXGdXEL5vYU5kWljcYb&ust=1587717949253000&source=images&cd=vfe&ved=0CAIQjRxqFwoTCJD9-raU_ugCFQAAAAAdAAAAABAN
where the horizontal lines are my energy values
A other solution is to get the tics from your datafile.

set xrange [0:10]
unset xtics
set grid lt -1
plot 'filename' u (0):4:ytic(sprintf("Level %.0f",$2)) w p


Jörg
alberto
2020-04-27 13:21:26 UTC
Permalink
Post by Jörg Buchholz
Post by Jörg Buchholz
Post by alberto
plot 'eigenval_TPP_02_on_MSN.txt' using (2):($4) with boxes lc
rgb '#FF0000' lw 2 title "visudyne 01"
set term wxt enhanced persist replot
I would plot
_____ level1
_____ level2
_____ level3
I'm not sure, you want to have something like this?
set errorbars small plot 'eigenval_TPP_02_on_MSN.txt' using
(2):4:(2) with xerrorbar
Jörg
Hi, thanks for your reply I would plot something like this
https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.chemguide.co.uk%2Fatoms%2Fproperties%2F&psig=AOvVaw2c0vXGdXEL5vYU5kWljcYb&ust=1587717949253000&source=images&cd=vfe&ved=0CAIQjRxqFwoTCJD9-raU_ugCFQAAAAAdAAAAABAN
where the horizontal lines are my energy values
A other solution is to get the tics from your datafile.
set xrange [0:10]
unset xtics
set grid lt -1
plot 'filename' u (0):4:ytic(sprintf("Level %.0f",$2)) w p
Jörg
Hi
thanks for your help. It's works!!
regards

Al

Loading...