Search code examples
gnuplot

How can I share an interactive 3d plot from gnuplot with someone else?


I have generated a surface plot in gnuplot (linux). I would like to send this plot to a colleague, but it's difficult to analyze without being able to see from different perspectives.

Is there a way to save the 3d plot in a format which retains interactivity or to save/load a plot so I could just send them a file to load in gnuplot?


Solution

  • You can save the current state of your gnuplot workspace to a file with save 'myfilename.txt'. All the variables (including settings) and the last plot command are saved. In a new gnuplot session you can load the file with load 'myfilename.txt'.

    If your plot command includes datafiles you have to include these when you share the gnuplot file, i.e. the data is not included in the file with the save command. The plot command is saved exactly like you typed it. Keep that in mind if you use absolute paths.