File tree Expand file tree Collapse file tree
src/aiida/orm/nodes/data/array Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1033,20 +1033,17 @@ def _prepare_gnuplot(
10331033 script .append (f'set ylabel "Dispersion ({ self .units } )"' )
10341034
10351035 if title :
1036- script .append ('set title "{}"' . format ( title . replace ( '"' , '"' )) )
1036+ script .append (f 'set title "{ title } "' )
10371037
10381038 # Plot, escaping filename
1039+ filename = os .path .basename (dat_filename )
10391040 if len (x ) > 1 :
10401041 script .append (f'set xrange [{ x_min_lim } :{ x_max_lim } ]' )
10411042 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"' )
10431044 else :
10441045 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"' )
10501047
10511048 script_data = '\n ' .join (script ) + '\n '
10521049 extra_files = {dat_filename : raw_data }
You can’t perform that action at this time.
0 commit comments