Ethan Merritt - 2023-07-16

First thoughts:

I do not fully understand your workflow or your speed requirements, but let me suggest a possible alternative to your described use of qt or wxt followed by export to svg or pdf. Suppose you want to create a standalone pdf file with latex labels. I will use a plot of the complex Airy function from the gnuplot demo set as an example. The file airy.gp is here after some fiddling to change the label text to latex:

set terminal tikz standalone size 5in,3in
set output 'airy.tex'
#
set border -1 front lt black linewidth 1.000 dashtype solid
set view 45, 51, 0.9, 1
set samples 51, 51
set isosamples 51, 51
set xyplane relative 0
unset cbtics
set title '{$\Re( Ai(x+iy) )$}'
set xrange [ -4.00000 : 4.00000 ]
set xlabel '$x$'
set yrange [ -4.00000 : 4.00000 ]
set ylabel '$iy$'
set zrange [ -4.00000 : 2.00000 ]
set cbrange [-pi:pi]
set cblabel '${\left\vert Ai(x + iy) \right\vert}$'
set pm3d border lt black linewidth 0.5
set pm3d lighting primary 0.5 specular 0.5 spec2 0
set palette defined ( 0 0.5451 0 0, 1 1 0.8431 0 )
#
splot '++' using 1:2:(real(Ai(x + y*I))):(arg(Ai(x + y*I))) notitle with pm3d

# Run pdflatex to update the display
unset output
!pdflatex airy
  • Running gnuplot on this file, e.g. gnuplot airy.gp will produce an output file airy.pdf.
  • Display this file and leave the viewer open, e.g. okular airy.pdf&.
  • To do further work, tweak the labels, change the plot, whatever, reopen the file airy.gp in the editor. Make your changes and - still from inside the editor - rerun gnuplot on the edited file.
  • gnuplot will reexecute the commnds, invoke pdflatex, and the displayed pdf will update in the viewer.

On my klunky old desktop machine at home it takes approximately 6 seconds from the time I invoke gnuplot the editor to the time that the display updates with the revised file. That's not instantaneous, but then again using the export widget to produce a separate file is not instantaneous either.

 

Last edit: Ethan Merritt 2023-07-16