File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
src/aiida/orm/nodes/data/array Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -1033,20 +1033,17 @@ def _prepare_gnuplot(
1033
1033
script .append (f'set ylabel "Dispersion ({ self .units } )"' )
1034
1034
1035
1035
if title :
1036
- script .append ('set title "{}"' . format ( title . replace ( '"' , '"' )) )
1036
+ script .append (f 'set title "{ title } "' )
1037
1037
1038
1038
# Plot, escaping filename
1039
+ filename = os .path .basename (dat_filename )
1039
1040
if len (x ) > 1 :
1040
1041
script .append (f'set xrange [{ x_min_lim } :{ x_max_lim } ]' )
1041
1042
script .append ('set grid xtics lt 1 lc rgb "#888888"' )
1042
- script .append ('plot "{}" with l lc rgb "#000000"' . format ( os . path . basename ( dat_filename ). replace ( '"' , '"' )) )
1043
+ script .append (f 'plot "{ filename } " with l lc rgb "#000000"' )
1043
1044
else :
1044
1045
script .append ('set xrange [-1.0:1.0]' )
1045
- script .append (
1046
- 'plot "{}" using ($1-0.25):($2):(0.5):(0) with vectors nohead lc rgb "#000000"' .format (
1047
- os .path .basename (dat_filename ).replace ('"' , '"' )
1048
- )
1049
- )
1046
+ script .append (f'plot "{ filename } " using ($1-0.25):($2):(0.5):(0) with vectors nohead lc rgb "#000000"' )
1050
1047
1051
1048
script_data = '\n ' .join (script ) + '\n '
1052
1049
extra_files = {dat_filename : raw_data }
You can’t perform that action at this time.
0 commit comments